Skip to content

Commit 969d497

Browse files
saml1ercodenulls
andauthored
Add vehicle dff leak fix back (#1640)
Co-authored-by: saml1er <[email protected]>
1 parent 928da16 commit 969d497

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

Client/game_sa/CRenderWareSA.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,6 @@ void CRenderWareSA::ReplaceModel(RpClump* pNew, unsigned short usModelID, DWORD
388388

389389
CBaseModelInfoSAInterface* pModelInfoInterface = pModelInfo->GetInterface();
390390
CBaseModelInfo_SetClump(pModelInfoInterface, pNewClone);
391-
392-
// CClumpModelInfo::SetClump will increment CTxdStore reference count.
393-
// We must remove it again to avoid TXD leaks.
394-
// UPDATE: This is disabled due to a crash reported in issue #1617
395-
// CTxdStore_RemoveRef(pModelInfoInterface->usTextureDictionary);
396391
RpClumpDestroy(pOldClump);
397392
}
398393
}

Client/mods/deathmatch/logic/luadefs/CLuaEngineDefs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ int CLuaEngineDefs::EngineReplaceModel(lua_State* luaVM)
513513
ushort usModelID = CModelNames::ResolveModelID(strModelName);
514514
if (usModelID != INVALID_MODEL_ID)
515515
{
516-
// This is disabled due to a crash reported in issue #1617
517-
// m_pDFFManager->RestoreModel(usModelID);
516+
// Fixes vehicle dff leak problem with engineReplaceModel
517+
m_pDFFManager->RestoreModel(usModelID);
518518
if (pDFF->ReplaceModel(usModelID, bAlphaTransparency))
519519
{
520520
lua_pushboolean(luaVM, true);

0 commit comments

Comments
 (0)