From 9e86e83da877b2f165a39f6b62c08820200870e7 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 29 Jan 2020 11:35:51 +0000 Subject: [PATCH] Use ClockTicks class for the timer values saved and restored when creating a savegame git-svn-id: https://svn.eduke32.com/eduke32@8537 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/duke3d/src/savegame.cpp --- source/duke3d/src/savegame.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/duke3d/src/savegame.cpp b/source/duke3d/src/savegame.cpp index ab4fe7627..019a84e50 100644 --- a/source/duke3d/src/savegame.cpp +++ b/source/duke3d/src/savegame.cpp @@ -486,16 +486,16 @@ int32_t G_LoadPlayer(FSaveGameNode *sv) ////////// TIMER SAVING/RESTORING ////////// static struct { - int32_t totalclock, totalclocklock; // engine - int32_t ototalclock, lockclock; // game + ClockTicks totalclock, totalclocklock; // engine + ClockTicks ototalclock, lockclock; // game } g_timers; static void G_SaveTimers(void) { - g_timers.totalclock = (int32_t) totalclock; - g_timers.totalclocklock = (int32_t) totalclocklock; - g_timers.ototalclock = (int32_t) ototalclock; - g_timers.lockclock = (int32_t) lockclock; + g_timers.totalclock = totalclock; + g_timers.totalclocklock = totalclocklock; + g_timers.ototalclock = ototalclock; + g_timers.lockclock = lockclock; } static void G_RestoreTimers(void) @@ -550,7 +550,6 @@ bool G_SavePlayer(FSaveGameNode *sv) Net_WaitForServer(); G_RestoreTimers(); - ototalclock = totalclock; VM_OnEvent(EVENT_POSTSAVEGAME, g_player[myconnectindex].ps->i, myconnectindex);