- sanitized the 'frozen level' code.
This had two different flags that were checked totally inconsistently, and one was not even saved. Moved everything into a few subfunctions so that these checks do not have to be scattered all over the code.
This commit is contained in:
parent
3721771934
commit
259ae41774
25 changed files with 124 additions and 65 deletions
|
|
@ -99,6 +99,7 @@ void P_Ticker (void)
|
|||
{
|
||||
if (bglobal.changefreeze)
|
||||
{
|
||||
level.frozenstate ^= 2;
|
||||
bglobal.freeze ^= 1;
|
||||
bglobal.changefreeze = 0;
|
||||
}
|
||||
|
|
@ -134,8 +135,7 @@ void P_Ticker (void)
|
|||
P_ThinkParticles(); // [RH] make the particles think
|
||||
|
||||
for (i = 0; i<MAXPLAYERS; i++)
|
||||
if (playeringame[i] &&
|
||||
/*Added by MC: Freeze mode.*/!(bglobal.freeze && players[i].Bot != NULL))
|
||||
if (playeringame[i])
|
||||
P_PlayerThink (&players[i]);
|
||||
|
||||
// [ZZ] call the WorldTick hook
|
||||
|
|
@ -145,13 +145,13 @@ void P_Ticker (void)
|
|||
DThinker::RunThinkers ();
|
||||
|
||||
//if added by MC: Freeze mode.
|
||||
if (!bglobal.freeze && !(level.flags2 & LEVEL2_FROZEN))
|
||||
if (!level.isFrozen())
|
||||
{
|
||||
P_UpdateSpecials (&level);
|
||||
P_RunEffects (); // [RH] Run particle effects
|
||||
}
|
||||
|
||||
// for par times
|
||||
// for par times
|
||||
level.time++;
|
||||
level.maptime++;
|
||||
level.totaltime++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue