2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-22 09:57:21 +01:00

Restore global time on Save/Restore.

Same as https://github.com/ValveSoftware/halflife/issues/3065.
This commit is contained in:
Andrey Akhmichin 2021-04-04 22:26:27 +05:00
parent 4ba54bdcdc
commit a07acb3d14

View File

@ -255,6 +255,8 @@ void DispatchSave( edict_t *pent, SAVERESTOREDATA *pSaveData )
{
ENTITYTABLE *pTable = &pSaveData->pTable[pSaveData->currentIndex];
gpGlobals->time = pSaveData->time;
if( pTable->pent != pent )
ALERT( at_error, "ENTITY TABLE OR INDEX IS WRONG!!!!\n" );
@ -307,6 +309,9 @@ int DispatchRestore( edict_t *pent, SAVERESTOREDATA *pSaveData, int globalEntity
Vector oldOffset;
CRestore restoreHelper( pSaveData );
gpGlobals->time = pSaveData->time;
if( globalEntity )
{
CRestore tmpRestore( pSaveData );