- fixed: Texture precaching for sprites had some inverted logic and deleted everything that was still required.

This commit is contained in:
Christoph Oelckers 2016-05-10 20:51:23 +02:00
parent 0cc57c6141
commit 15933f9c72

View file

@ -315,13 +315,13 @@ void FHardwareTexture::Clean(bool all)
void FHardwareTexture::CleanUnused(SpriteHits &usedtranslations)
{
if (usedtranslations.CheckKey(0) != nullptr)
if (usedtranslations.CheckKey(0) == nullptr)
{
glDefTex.Delete();
}
for (int i = glTex_Translated.Size()-1; i>= 0; i--)
{
if (usedtranslations.CheckKey(glTex_Translated[i].translation) != nullptr)
if (usedtranslations.CheckKey(glTex_Translated[i].translation) == nullptr)
{
glTex_Translated[i].Delete();
glTex_Translated.Delete(i);