Fix A_ChangeModel serialization

I overlooked this part on my first A_ChangeModel fix
This commit is contained in:
Ricardo Luís Vaz Silva 2024-03-17 17:47:53 -03:00
commit ce479e09ff
10 changed files with 95 additions and 76 deletions

View file

@ -506,7 +506,7 @@ void RenderFrameModels(FModelRenderer *renderer, FLevelLocals *Level, const FSpr
skinid = smf->skinIDs[i];
}
if (modelid >= 0)
if (modelid >= 0 && modelid < Models.size())
{
FModel * mdl = Models[modelid];
auto tex = skinid.isValid() ? TexMan.GetGameTexture(skinid, true) : nullptr;