Bladeren bron

fixes for issue #994 (wildhouse.zip not found)

Stephen Gold 6 jaren geleden
bovenliggende
commit
3c3e3f4af2

+ 4 - 4
jme3-examples/src/main/java/jme3test/asset/TestManyLocators.java

@@ -47,9 +47,9 @@ public class TestManyLocators {
                            UrlLocator.class);
 
         am.registerLocator("town.zip", ZipLocator.class);
-        am.registerLocator("http://jmonkeyengine.googlecode.com/files/wildhouse.zip",
-                           HttpZipLocator.class);
-        
+        am.registerLocator(
+                    "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/wildhouse.zip", 
+                    HttpZipLocator.class);       
         
         am.registerLocator("/", ClasspathLocator.class);
         
@@ -78,7 +78,7 @@ public class TestManyLocators {
             System.out.println("Found zip image: " + b.toString());
 
         if (c == null)
-            System.out.println("Failed to load from wildhouse.zip on googlecode.com");
+            System.out.println("Failed to load from wildhouse.zip on googleapis.com");
         else
             System.out.println("Found online zip image: " + c.toString());
 

+ 3 - 1
jme3-examples/src/main/java/jme3test/post/TestMultiplesFilters.java

@@ -79,7 +79,9 @@ public class TestMultiplesFilters extends SimpleApplication {
         // create the geometry and attach it
         // load the level from zip or http zip
         if (useHttp) {
-            assetManager.registerLocator("http://jmonkeyengine.googlecode.com/files/wildhouse.zip", HttpZipLocator.class);
+            assetManager.registerLocator(
+                    "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/wildhouse.zip", 
+                    HttpZipLocator.class);
         } else {
             assetManager.registerLocator("wildhouse.zip", ZipLocator.class);
         }

+ 8 - 4
jme3-examples/src/main/java/jme3test/water/TestPostWaterLake.java

@@ -47,11 +47,13 @@ import java.io.File;
 
 public class TestPostWaterLake extends SimpleApplication {
 
-    // set default for applets
-    private static boolean useHttp = true;
+    private static boolean useHttp = false;
 
     public static void main(String[] args) {
-     
+        File file = new File("wildhouse.zip");
+        if (!file.exists()) {
+            useHttp = true;
+        }     
         TestPostWaterLake app = new TestPostWaterLake();
         app.start();
     }
@@ -74,7 +76,9 @@ public class TestPostWaterLake extends SimpleApplication {
         // create the geometry and attach it
         // load the level from zip or http zip
         if (useHttp) {
-            assetManager.registerLocator("http://jmonkeyengine.googlecode.com/files/wildhouse.zip", HttpZipLocator.class);
+            assetManager.registerLocator(
+                    "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/wildhouse.zip", 
+                    HttpZipLocator.class);
         } else {
             assetManager.registerLocator("wildhouse.zip", ZipLocator.class);
         }