From b4c74fabd3847e35a80c072ff0aad485950faab6 Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Tue, 14 Dec 2021 07:42:44 -0600 Subject: [PATCH] Added NoTrim support for ANIMDEFS, same syntax as TEXTURES outside a definition. --- src/gamedata/textures/animations.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gamedata/textures/animations.cpp b/src/gamedata/textures/animations.cpp index 55dcf060c4..dd963cc909 100644 --- a/src/gamedata/textures/animations.cpp +++ b/src/gamedata/textures/animations.cpp @@ -455,6 +455,17 @@ void FTextureAnimator::ParseAnim (FScanner &sc, ETextureType usetype) defined = 1; ani = ParseRangeAnim (sc, picnum, usetype, missing); } + else if (sc.Compare("notrim")) + { + if (picnum.isValid()) + { + auto tex = TexMan.GetGameTexture(picnum); + + if (tex) tex->SetNoTrimming(true); + else sc.ScriptError("NoTrim: %s not found", sc.String); + } + else sc.ScriptError("NoTrim: %s is not a sprite", sc.String); + } else if (sc.Compare ("pic")) { if (defined == 1)