mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- Duke: Do not reset the global ticker.
The new main loop code cannot handle that. Instead set a start value for gameclock so that gameclock can be based on an arbitrary time value instead of directly representing global time.
This commit is contained in:
parent
34510ae9b3
commit
49106c5b5e
3 changed files with 5 additions and 4 deletions
|
@ -95,7 +95,7 @@ GameInterface* gi;
|
|||
int myconnectindex, numplayers;
|
||||
int connecthead, connectpoint2[MAXMULTIPLAYERS];
|
||||
auto vsnprintfptr = vsnprintf; // This is an inline in Visual Studio but we need an address for it to satisfy the MinGW compiled libraries.
|
||||
int gameclock;
|
||||
int gameclock, gameclockstart;
|
||||
int lastTic;
|
||||
|
||||
int automapMode;
|
||||
|
|
|
@ -219,4 +219,5 @@ extern int automapMode;
|
|||
extern bool automapFollow;
|
||||
extern bool sendPause;
|
||||
extern int gameclock;
|
||||
extern int gameclockstart;
|
||||
extern int lastTic;
|
||||
|
|
|
@ -294,7 +294,7 @@ void GameTicker()
|
|||
gameupdatetime.Clock();
|
||||
|
||||
int const currentTic = I_GetTime();
|
||||
gameclock = I_GetBuildTime();
|
||||
gameclock = I_GetBuildTime() - gameclockstart;
|
||||
|
||||
while (playrunning() && currentTic - lastTic >= 1)
|
||||
{
|
||||
|
@ -361,8 +361,8 @@ void startmainmenu()
|
|||
|
||||
void resetGameClock()
|
||||
{
|
||||
I_ResetTime();
|
||||
lastTic = -1;
|
||||
I_SetFrameTime();
|
||||
gameclockstart = I_GetTime();
|
||||
gameclock = 0;
|
||||
cloudclock = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue