- 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
|
|
@ -3505,18 +3505,15 @@ void AActor::Tick ()
|
|||
// apply velocity
|
||||
// ensure that the actor is not linked into the blockmap
|
||||
|
||||
if (!(flags5 & MF5_NOTIMEFREEZE))
|
||||
//Added by MC: Freeze mode.
|
||||
if (isFrozen())
|
||||
{
|
||||
//Added by MC: Freeze mode.
|
||||
if (bglobal.freeze || Level->flags2 & LEVEL2_FROZEN)
|
||||
// Boss cubes shouldn't be accelerated by timefreeze
|
||||
if (flags6 & MF6_BOSSCUBE)
|
||||
{
|
||||
// Boss cubes shouldn't be accelerated by timefreeze
|
||||
if (flags6 & MF6_BOSSCUBE)
|
||||
{
|
||||
special2++;
|
||||
}
|
||||
return;
|
||||
special2++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Vel.isZero() || !(flags & MF_NOBLOCKMAP))
|
||||
|
|
@ -3555,27 +3552,16 @@ void AActor::Tick ()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!(flags5 & MF5_NOTIMEFREEZE))
|
||||
if (isFrozen())
|
||||
{
|
||||
// Boss cubes shouldn't be accelerated by timefreeze
|
||||
if (flags6 & MF6_BOSSCUBE)
|
||||
{
|
||||
special2++;
|
||||
}
|
||||
//Added by MC: Freeze mode.
|
||||
if (bglobal.freeze && !(player && player->Bot == NULL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Apply freeze mode.
|
||||
if ((Level->flags2 & LEVEL2_FROZEN) && (player == NULL || player->timefreezer == 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (effects & FX_ROCKET)
|
||||
{
|
||||
if (++smokecounter == 4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue