mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Look up named frames using the Animation ID (if any).
This commit is contained in:
parent
91d3c4b606
commit
9ad7b8a048
1 changed files with 4 additions and 0 deletions
|
@ -820,6 +820,10 @@ static void ParseModelDefLump(int Lump)
|
||||||
if (smf.modelIDs[index] != -1)
|
if (smf.modelIDs[index] != -1)
|
||||||
{
|
{
|
||||||
FModel *model = Models[smf.modelIDs[index]];
|
FModel *model = Models[smf.modelIDs[index]];
|
||||||
|
if (smf.animationIDs[index] != -1)
|
||||||
|
{
|
||||||
|
model = Models[smf.animationIDs[index]];
|
||||||
|
}
|
||||||
smf.modelframes[index] = model->FindFrame(sc.String);
|
smf.modelframes[index] = model->FindFrame(sc.String);
|
||||||
if (smf.modelframes[index]==-1) sc.ScriptError("Unknown frame '%s' in %s", sc.String, type->TypeName.GetChars());
|
if (smf.modelframes[index]==-1) sc.ScriptError("Unknown frame '%s' in %s", sc.String, type->TypeName.GetChars());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue