mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
Fixed freeze after saving game when cl_waitforsave CVAR set to false
Restored assertions that help to spot incorrect usage of I_FreezeTime() function https://forum.zdoom.org/viewtopic.php?t=59672
This commit is contained in:
parent
d0ec6ef1d4
commit
ac47166894
2 changed files with 5 additions and 1 deletions
|
@ -2388,7 +2388,9 @@ void G_DoSaveGame (bool okForQuicksave, FString filename, const char *descriptio
|
||||||
level.info->Snapshot.Clean();
|
level.info->Snapshot.Clean();
|
||||||
|
|
||||||
insave = false;
|
insave = false;
|
||||||
I_FreezeTime(false);
|
|
||||||
|
if (cl_waitforsave)
|
||||||
|
I_FreezeTime(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -187,10 +187,12 @@ void I_FreezeTime(bool frozen)
|
||||||
{
|
{
|
||||||
if (frozen)
|
if (frozen)
|
||||||
{
|
{
|
||||||
|
assert(FreezeTime == 0);
|
||||||
FreezeTime = GetClockTimeNS();
|
FreezeTime = GetClockTimeNS();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
assert(FreezeTime != 0);
|
||||||
FirstFrameStartTime += GetClockTimeNS() - FreezeTime;
|
FirstFrameStartTime += GetClockTimeNS() - FreezeTime;
|
||||||
FreezeTime = 0;
|
FreezeTime = 0;
|
||||||
I_SetFrameTime();
|
I_SetFrameTime();
|
||||||
|
|
Loading…
Reference in a new issue