diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 69dd04cb9..5bcf83e6e 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -1210,11 +1210,11 @@ void bail2dos(const char *fmt, ...) void faketimerhandler() { - if (((int)totalclock < ototalclock + 1) || bInMove) + if ((totalclock < ototalclock + 1) || bInMove) return; - ototalclock++; + ototalclock = ototalclock + 1; - if (!(ototalclock&3) && moveframes < 4) + if (!((int)ototalclock&3) && moveframes < 4) moveframes++; PlayerInterruptKeys(); @@ -2946,6 +2946,7 @@ LOOP3: CONTROL_ClearButton(gamefunc_Escape); // MENU2: CONTROL_BindsEnabled = 0; + bInMove = kTrue; nMenu = menu_Menu(1); switch (nMenu) @@ -2970,6 +2971,9 @@ LOOP3: } break; } + + totalclock = ototalclock = tclocks; + bInMove = kFalse; CONTROL_BindsEnabled = 1; RefreshStatus(); } diff --git a/source/exhumed/src/init.cpp b/source/exhumed/src/init.cpp index 61373da34..0cb852cbf 100644 --- a/source/exhumed/src/init.cpp +++ b/source/exhumed/src/init.cpp @@ -32,7 +32,7 @@ enum kTagRamses = 61, }; -int ototalclock = 0; +ClockTicks ototalclock = 0; int initx, inity, initz; short inita, initsect; @@ -418,7 +418,7 @@ void ResetEngine() resettiming(); totalclock = 0; - ototalclock = (int)totalclock; + ototalclock = totalclock; localclock = (int)totalclock; numframes = 0; diff --git a/source/exhumed/src/init.h b/source/exhumed/src/init.h index 1848f635b..3344f10d4 100644 --- a/source/exhumed/src/init.h +++ b/source/exhumed/src/init.h @@ -11,7 +11,7 @@ enum { kSectLava = 0x4000, }; -extern int ototalclock; +extern ClockTicks ototalclock; extern int initx; extern int inity;