1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-07-03 06:24:32 +00:00

Fix oversight in texture loading that could cause the cape to appear as white blorb. Thx Daxar.

This commit is contained in:
fgenesis 2015-06-10 01:49:12 +02:00
parent 1af3a580ed
commit 8bd40be8aa
3 changed files with 14 additions and 8 deletions

View file

@ -1328,9 +1328,10 @@ bool RenderObject::setTexture(const std::string &n)
if(texture && name == texture->name)
return true; // no texture change
CountedPtr<Texture> tex = core->addTexture(name);
TextureLoadResult res = TEX_FAILED;
CountedPtr<Texture> tex = core->addTexture(name, &res);
setTexturePointer(tex);
return !!tex;
return !!tex && res != TEX_FAILED;
}
float RenderObject::getSortDepth()