- base the turbo turn timer on the actual level tic rate

This has a threshold that could lead to different behavior, depending on whether synchronized or unsynchronized input is used, it also used an undefined state of gameclock for its calculations.

By basing this on the levelclock consistency is ensured.
This commit is contained in:
Christoph Oelckers 2020-08-31 19:23:05 +02:00
parent 71c3441b1e
commit a8bb6ba515

View file

@ -624,8 +624,8 @@ static void checkCrouchToggle(player_struct* p)
int getticssincelastupdate()
{
int tics = lastcontroltime == 0 || gameclock < lastcontroltime ? 0 : gameclock - lastcontroltime;
lastcontroltime = gameclock;
int tics = lastcontroltime == 0 || ud.levelclock < lastcontroltime ? 0 : ud.levelclock - lastcontroltime;
lastcontroltime = ud.levelclock;
return tics;
}