mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 06:24:32 +00:00
Fix rare texture loading problems introduced in 8bd40be8aa
and f0d580d873
.
This commit is contained in:
parent
198f0353d5
commit
62c949f640
5 changed files with 29 additions and 32 deletions
|
@ -1365,13 +1365,12 @@ bool RenderObject::setTexture(const std::string &n)
|
|||
if (name.empty())
|
||||
return false;
|
||||
|
||||
if(texture && name == texture->name)
|
||||
if(texture && texture->getLoadResult() == TEX_SUCCESS && name == texture->name)
|
||||
return true; // no texture change
|
||||
|
||||
TextureLoadResult res = TEX_FAILED;
|
||||
CountedPtr<Texture> tex = core->addTexture(name, &res);
|
||||
CountedPtr<Texture> tex = core->addTexture(name);
|
||||
setTexturePointer(tex);
|
||||
return !!tex && res != TEX_FAILED;
|
||||
return tex && tex->getLoadResult() == TEX_SUCCESS;
|
||||
}
|
||||
|
||||
float RenderObject::getSortDepth()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue