From c05ef397181d480951175880ef43c17106a132aa Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 3 Aug 2019 15:42:06 +0300 Subject: [PATCH] - do not set use type on font texture if it is used as a sprite Setting texture use type in this case would break actors that use the corresponding sprite https://forum.zdoom.org/viewtopic.php?t=65509 --- src/gamedata/fonts/specialfont.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gamedata/fonts/specialfont.cpp b/src/gamedata/fonts/specialfont.cpp index 1d3c92c23..c87c49241 100644 --- a/src/gamedata/fonts/specialfont.cpp +++ b/src/gamedata/fonts/specialfont.cpp @@ -102,7 +102,10 @@ FSpecialFont::FSpecialFont (const char *name, int first, int count, FTexture **l if (charlumps[i] != nullptr) { - charlumps[i]->SetUseType(ETextureType::FontChar); + // If texture is used as a sprite, do not set use type + // Changing it would break actors that use this sprite + if (charlumps[i]->GetUseType() != ETextureType::Sprite) + charlumps[i]->SetUseType(ETextureType::FontChar); Chars[i].OriginalPic = charlumps[i]; if (!noTranslate)