More fixes

- Let's fill the holes of serialized data so it can properly be removed instead of leaving undefined behavior behind.
- Added CMDL_HIDEMODEL flag. This makes a model index invisible.
This commit is contained in:
Shiny Metagross 2022-07-01 11:49:13 -07:00 committed by Christoph Oelckers
commit ec3d81a34f
3 changed files with 17 additions and 17 deletions

View file

@ -285,7 +285,7 @@ void RenderFrameModels(FModelRenderer *renderer, FLevelLocals *Level, const FSpr
{
if (i < (int)actor->modelData->modelIDs.Size())
{
if(actor->modelData->modelIDs[i] >= 0)
if(actor->modelData->modelIDs[i] != -1)
tempModelIDs[i] = actor->modelData->modelIDs[i];
}
if (i < (int)actor->modelData->skinIDs.Size())
@ -294,7 +294,7 @@ void RenderFrameModels(FModelRenderer *renderer, FLevelLocals *Level, const FSpr
tempSkinIDs[i] = actor->modelData->skinIDs[i];
}
}
if (tempModelIDs[i] != -1)
if (tempModelIDs[i] >= 0)
{
FModel * mdl = Models[tempModelIDs[i]];
auto tex = tempSkinIDs[i].isValid() ? TexMan.GetGameTexture(tempSkinIDs[i], true) : nullptr;