diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 90ab166f6..a128ded91 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,8 @@ December 6, 2007 +- Fixed: Using the freeze command would make the Revenant missiles switch + their seekingness. The only sane way to deal with this seemed to be to + sync the freeze changes with the timer check in A_Tracer(), so that's what + I did: Freeze mode only changes every four tics now. - Added IWAD-based [*.Autoload] ini support for games that have more than one IWAD. They are: * [Doom1.Autoload] diff --git a/src/b_bot.h b/src/b_bot.h index ddc8f06d0..1dd48864b 100644 --- a/src/b_bot.h +++ b/src/b_bot.h @@ -110,8 +110,9 @@ public: bool IsDangerous (sector_t *sec); DArgs *getspawned; //Array of bots (their names) which should be spawned when starting a game. - bool botingame[MAXPLAYERS]; - bool freeze; //Game in freeze mode. + bool botingame[MAXPLAYERS]; + BYTE freeze:1; //Game in freeze mode. + BYTE changefreeze:1; //Game wants to change freeze mode. int botnum; botinfo_t *botinfo; int spawn_tries; diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index 9d0041c6f..f35c0ed0f 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -401,15 +401,14 @@ void cht_DoCheat (player_t *player, int cheat) break; case CHT_FREEZE: - if (bglobal.freeze) + bglobal.changefreeze ^= 1; + if (bglobal.freeze ^ bglobal.changefreeze) { - bglobal.freeze = false; - msg = "Freeze mode off"; + msg = "Freeze mode on"; } else { - bglobal.freeze = true; - msg = "Freeze mode on"; + msg = "Freeze mode off"; } break; } diff --git a/src/p_tick.cpp b/src/p_tick.cpp index 5e4b0a74a..3d6c3a20d 100644 --- a/src/p_tick.cpp +++ b/src/p_tick.cpp @@ -75,6 +75,16 @@ void P_Ticker (void) if (paused || (playerswiping && !demoplayback) || P_CheckTickerPaused()) return; + // [RH] Frozen mode is only changed every 4 tics, to make it work with A_Tracer(). + if ((level.time & 3) == 0) + { + if (bglobal.changefreeze) + { + bglobal.freeze ^= 1; + bglobal.changefreeze = 0; + } + } + // [BC] Do a quick check to see if anyone has the freeze time power. If they do, // then don't resume the sound, since one of the effects of that power is to shut // off the music.