Skip to content

Commit

Permalink
Synchronize changes from 1.6 master branch [ci skip]
Browse files Browse the repository at this point in the history
b52500e Fix engineFreeModel regression caused by #1802 (#3190)
  • Loading branch information
github-actions[bot] committed Sep 19, 2023
2 parents 190deea + b52500e commit 09ce056
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Client/mods/deathmatch/logic/CClientModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ bool CClientModel::DeallocateDFF(CModelInfo* pModelInfo)
// Restore DFF/TXD
g_pClientGame->GetManager()->GetDFFManager()->RestoreModel(m_iModelID);

// Remove model info
pModelInfo->DeallocateModel();

return true;
}

Expand Down
1 change: 1 addition & 0 deletions Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ int CLuaEngineDefs::EngineRequestModel(lua_State* luaVM)
int iModelID = m_pManager->GetModelManager()->GetFirstFreeModelID();
if (iModelID != INVALID_MODEL_ID) {
std::shared_ptr<CClientModel> pModel = m_pManager->GetModelManager()->Request(m_pManager, iModelID, eModelType);
m_pManager->GetModelManager()->Add(pModel);

ushort usParentID = -1;

Expand Down

0 comments on commit 09ce056

Please sign in to comment.