Look up named frames using the Animation ID (if any).

This commit is contained in:
Marisa the Magician 2022-11-30 14:22:22 +01:00 committed by Christoph Oelckers
parent 91d3c4b606
commit 9ad7b8a048

View file

@ -820,6 +820,10 @@ static void ParseModelDefLump(int Lump)
if (smf.modelIDs[index] != -1)
{
FModel *model = Models[smf.modelIDs[index]];
if (smf.animationIDs[index] != -1)
{
model = Models[smf.animationIDs[index]];
}
smf.modelframes[index] = model->FindFrame(sc.String);
if (smf.modelframes[index]==-1) sc.ScriptError("Unknown frame '%s' in %s", sc.String, type->TypeName.GetChars());
}