diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 9095b1d4ab6de440e131a4fbfd1aaf2ffb2c90b5..cf142396da91482d3332baf4611c7fdecc6b5364 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
g_rlayer_water: Boolean = true;
g_rlayer_fore: Boolean = true;
+ wNeedTimeReset: Boolean = false;
procedure g_ResetDynlights ();
procedure g_AddDynLight (x, y, radius: Integer; r, g, b, a: Single);
gDelayedEvents[n].DENum := Num;
gDelayedEvents[n].DEStr := Str;
if DEType = DE_GLOBEVENT then
- gDelayedEvents[n].Time := (sys_GetTicks() {div 1000}) + Time
+ gDelayedEvents[n].Time := (GetTickCount64() {div 1000}) + Time
else
gDelayedEvents[n].Time := gTime + Time;
Result := n;
g_Game_SetLoadingText(Format('Doom 2D: Forever %s', [GAME_VERSION]), 0, False);
g_Game_SetLoadingText('', 0, False);
- g_Game_SetLoadingText(_lc[I_LOAD_CONSOLE], 0, False);
- r_Console_Init;
- g_Console_Init();
-
g_Game_SetLoadingText(_lc[I_LOAD_MODELS], 0, False);
- r_PlayerModel_Initialize;
-
// load models from all possible wad types, in all known directories
// this does a loosy job (linear search, ooph!), but meh
for wext in wadExtensions do
g_Sound_CreateWADEx('MUSIC_ROUNDMUS', GameWAD+':MUSIC\ROUNDMUS', True, True);
g_Sound_CreateWADEx('MUSIC_STDENDMUS', GameWAD+':MUSIC\ENDMUS', True);
-{$IFNDEF HEADLESS}
- g_Game_SetLoadingText(_lc[I_LOAD_MENUS], 0, False);
- g_Menu_Init();
-{$ENDIF}
-
gMusic := TMusic.Create();
gMusic.SetByName('MUSIC_MENU');
gMusic.Play();
KeyPress(IK_F10);
end;
- Time := sys_GetTicks() {div 1000};
+ Time := GetTickCount64() {div 1000};
// Обработка отложенных событий:
if gDelayedEvents <> nil then
g_Game_StopAllSounds(True);
gMusic.Free();
g_Game_FreeData();
- r_PlayerModel_Finalize;
g_PlayerModel_FreeData();
g_Texture_DeleteAll();
g_Frames_DeleteAll();
gGameOn := True;
DisableCheats();
- ResetTimer();
+ wNeedTimeReset := True;
if gGameSettings.GameMode = GM_CTF then
begin