mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-24 05:44:16 +00:00
engine: server: reset edict in ParseSaveTables like GoldSrc does which fixes messed up entities in mods that have advanced save-restore system (thanks to vasiavasiavasia95 for figuring out this bug)
This commit is contained in:
parent
4c3c3529e9
commit
2d2e03f235
@ -984,7 +984,10 @@ static void ParseSaveTables( SAVERESTOREDATA *pSaveData, SAVE_HEADER *pHeader, i
|
|||||||
InitEntityTable( pSaveData, pSaveData->tableCount );
|
InitEntityTable( pSaveData, pSaveData->tableCount );
|
||||||
|
|
||||||
for( i = 0; i < pSaveData->tableCount; i++ )
|
for( i = 0; i < pSaveData->tableCount; i++ )
|
||||||
|
{
|
||||||
svgame.dllFuncs.pfnSaveReadFields( pSaveData, "ETABLE", &pSaveData->pTable[i], gEntityTable, ARRAYSIZE( gEntityTable ));
|
svgame.dllFuncs.pfnSaveReadFields( pSaveData, "ETABLE", &pSaveData->pTable[i], gEntityTable, ARRAYSIZE( gEntityTable ));
|
||||||
|
pSaveData->pTable[i].pent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
pSaveData->pBaseData = pSaveData->pCurrentData;
|
pSaveData->pBaseData = pSaveData->pCurrentData;
|
||||||
pSaveData->size = 0;
|
pSaveData->size = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user