mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-03 23:21:21 +00:00
Update models.cpp
- Removed a useless bool - Fixed an issue with model containers having less models than their smf total models amount using the smaller amount
This commit is contained in:
parent
e2778ba442
commit
83077b6f95
1 changed files with 4 additions and 3 deletions
|
@ -280,7 +280,8 @@ void RenderFrameModels(FModelRenderer *renderer, FLevelLocals *Level, const FSpr
|
||||||
//[SM] - if we added any models for the frame to also render, then we also need to update modelsAmount for this smf
|
//[SM] - if we added any models for the frame to also render, then we also need to update modelsAmount for this smf
|
||||||
if (actor->modelData != nullptr)
|
if (actor->modelData != nullptr)
|
||||||
{
|
{
|
||||||
modelsamount = actor->modelData->modelIDs.Size();
|
if (actor->modelData->modelIDs.Size() > modelsamount)
|
||||||
|
modelsamount = actor->modelData->modelIDs.Size();
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray<FTextureID> surfaceskinids;
|
TArray<FTextureID> surfaceskinids;
|
||||||
|
@ -293,10 +294,10 @@ void RenderFrameModels(FModelRenderer *renderer, FLevelLocals *Level, const FSpr
|
||||||
FTextureID skinid; skinid.SetInvalid();
|
FTextureID skinid; skinid.SetInvalid();
|
||||||
|
|
||||||
surfaceskinids.Clear();
|
surfaceskinids.Clear();
|
||||||
bool surfaceskinsswapped = false;
|
|
||||||
if (actor->modelData != nullptr)
|
if (actor->modelData != nullptr)
|
||||||
{
|
{
|
||||||
modelid = actor->modelData->modelIDs[i];
|
if (i < (int)actor->modelData->modelIDs.Size())
|
||||||
|
modelid = actor->modelData->modelIDs[i];
|
||||||
|
|
||||||
if (i < (int)actor->modelData->modelFrameGenerators.Size())
|
if (i < (int)actor->modelData->modelFrameGenerators.Size())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue