Added NoTrim support for ANIMDEFS, same syntax as TEXTURES outside a definition.

This commit is contained in:
Major Cooke 2021-12-14 07:42:44 -06:00 committed by Christoph Oelckers
parent bbd91be5d5
commit b4c74fabd3

View file

@ -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)