diff --git a/src/gamedata/textures/animations.cpp b/src/gamedata/textures/animations.cpp index ab3363293d0..3aa467aaa8f 100644 --- a/src/gamedata/textures/animations.cpp +++ b/src/gamedata/textures/animations.cpp @@ -309,12 +309,9 @@ void FTextureAnimator::InitAnimatedTextures() if (i == 0) { TexMan.ReplaceTexture(picnum, newtex, true); + picnum = newtex.GetID(); } - FTextureID textureId = TexMan.AddGameTexture(newtex); - if (i == 0) - { - picnum = textureId; - } + FTextureID textureId = (i == 0) ? newtex.GetID() : TexMan.AddGameTexture(newtex); FAnimDef::FAnimFrame animFrame; animFrame.SpeedMin = image->GetDurationOfFrame(i + 1); animFrame.SpeedRange = 0;