From c6bb443c63930f204e3c3ffe8a31dc9b4b8f100e Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Mon, 14 Jun 2010 21:59:41 +0000 Subject: [PATCH] Resetting GameTime, Next/Last_flare/laser/missile_time in reset_time() together so GameTime-rollover-fallbacks will not create a massive delay when starting a new level --- CHANGELOG.txt | 4 ++++ main/game.c | 4 ++-- main/gameseq.c | 2 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ad0fa8e85..d28d2baa9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20100615 +-------- +main/game.c, main/gameseq.c: Resetting GameTime, Next/Last_flare/laser/missile_time in reset_time() together so GameTime-rollover-fallbacks will not create a massive delay when starting a new level + 20100614 -------- include/args.h, include/physfsx.h, main/newmenu.h, main/inferno.c, main/menu.c, main/songs.c, main/songs.h, main/config.c, main/config.h, main/gameseq.c, main/digiobj.c, main/digi.h, main/game.c, main/gamecntl.c, misc/args.c, d1x.ini, arch/sdl/digi_mixer.c, arch/sdl/digi_mixer_music.c, arch/sdl/init.c, arch/sdl/jukebox.c, arch/sdl/digi.c, arch/sdl/digi_audio.c, arch/include/digi_audio.h, arch/include/digi_mixer.h, arch/include/digi_mixer_music.h, arch/include/jukebox.h: Increased SDL_mixer music abilities to play non-hmp from HOGs, having Level-music path to play, options to specify non-level tracks and added various playing order methods; Abstracted SDL_mixer- and Redbook-interfaces; Simplified program flow through all music functions diff --git a/main/game.c b/main/game.c index 399b880d6..524f6a118 100644 --- a/main/game.c +++ b/main/game.c @@ -145,6 +145,7 @@ int Game_turbo_mode = 0; int Game_mode = GM_GAME_OVER; int Global_laser_firing_count = 0; int Global_missile_firing_count = 0; +fix Next_flare_fire_time = 0; // Function prototypes for GAME.C exclusively. @@ -443,6 +444,7 @@ void FixedStepCalc() void reset_time() { + GameTime = Next_flare_fire_time = Last_laser_fired_time = Next_laser_fire_time = Next_missile_fire_time = 0; last_timer_value = timer_get_fixed_seconds(); } @@ -698,8 +700,6 @@ int allowed_to_fire_laser(void) return 1; } -fix Next_flare_fire_time = 0; - int allowed_to_fire_flare(void) { if (Next_flare_fire_time > GameTime) diff --git a/main/gameseq.c b/main/gameseq.c index 40459e1fe..9d5c9193e 100644 --- a/main/gameseq.c +++ b/main/gameseq.c @@ -1262,8 +1262,6 @@ void StartNewLevel(int level_num) { hide_menus(); - GameTime = FrameTime; - load_custom_data(get_level_file(level_num)); if (!(Game_mode & GM_MULTI)) {