mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix textures not loading in certain cases
This commit is contained in:
parent
ee65e733e5
commit
e6d01130d4
1 changed files with 18 additions and 0 deletions
|
|
@ -619,6 +619,15 @@ class DifBuilder {
|
|||
return true;
|
||||
}
|
||||
|
||||
prevDir = Path.directory(prevDir);
|
||||
|
||||
if (ResourceLoader.exists(prevDir + "/" + tex + ".jpg")) {
|
||||
return true;
|
||||
}
|
||||
if (ResourceLoader.exists(prevDir + "/" + tex + ".png")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
function tex(tex:String):String {
|
||||
|
|
@ -642,6 +651,15 @@ class DifBuilder {
|
|||
return prevDir + "/" + tex + ".png";
|
||||
}
|
||||
|
||||
var prevDir = Path.directory(prevDir);
|
||||
|
||||
if (ResourceLoader.exists(prevDir + "/" + tex + ".jpg")) {
|
||||
return prevDir + "/" + tex + ".jpg";
|
||||
}
|
||||
if (ResourceLoader.exists(prevDir + "/" + tex + ".png")) {
|
||||
return prevDir + "/" + tex + ".png";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
var loadtexs = [];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue