Explorar el Código

Fix loadTexture

trethaller hace 7 años
padre
commit
07e5ace22b
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      h3d/prim/ModelCache.hx

+ 3 - 1
h3d/prim/ModelCache.hx

@@ -35,7 +35,9 @@ class ModelCache {
 	}
 
 	public function loadTexture( model : hxd.res.Model, texturePath ) : h3d.mat.Texture {
-		var fullPath = model.entry.path + "@" + texturePath;
+		var fullPath = texturePath;
+		if(model != null)
+			fullPath = model.entry.path + "@" + fullPath;
 		var t = textures.get(fullPath);
 		if( t != null )
 			return t;