From 9ad7b8a04801aeb6bc1362a34b051aa4a08b3c13 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Wed, 30 Nov 2022 14:22:22 +0100 Subject: [PATCH] Look up named frames using the Animation ID (if any). --- src/r_data/models.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/r_data/models.cpp b/src/r_data/models.cpp index 8ed3e57f2..b58dfaa47 100644 --- a/src/r_data/models.cpp +++ b/src/r_data/models.cpp @@ -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()); }