- ... and finally the push flag.

This commit is contained in:
Christoph Oelckers 2016-01-06 02:05:39 +01:00
parent 3ffcec3eb3
commit d34077a3ba
4 changed files with 12 additions and 5 deletions

View file

@ -176,12 +176,10 @@ typedef enum {
// [RH] Equivalents for BOOM's generalized sector types
#ifndef SECRET_MASK
#define DAMAGE_MASK 0x0300
#define SECRET_MASK 0x0400
#define FRICTION_MASK 0x0800
#define PUSH_MASK 0x1000
#endif
struct line_t;
class AActor;

View file

@ -418,7 +418,11 @@ void P_SerializeWorld (FArchive &arc)
{
sec->Flags |= SECF_FRICTION;
}
sec->special &= ~(SECRET_MASK|FRICTION_MASK);
if (sec->special & PUSH_MASK)
{
sec->Flags |= SECF_PUSH;
}
sec->special &= ~(SECRET_MASK|FRICTION_MASK|PUSH_MASK);
}
arc << sec->interpolations[0]
<< sec->interpolations[1]

View file

@ -1197,7 +1197,11 @@ void P_SpawnSpecials (void)
{
sector->Flags |= SECF_FRICTION;
}
sector->special &= ~(SECRET_MASK|FRICTION_MASK);
if (sector->special & PUSH_MASK)
{
sector->Flags |= SECF_PUSH;
}
sector->special &= ~(SECRET_MASK|FRICTION_MASK|PUSH_MASK);
switch (sector->special & 0xff)
{
@ -2184,7 +2188,7 @@ void DPusher::Tick ()
// Be sure the special sector type is still turned on. If so, proceed.
// Else, bail out; the sector type has been changed on us.
if (!(sec->special & PUSH_MASK))
if (!(sec->Flags & SECF_PUSH))
return;
// For constant pushers (wind/current) there are 3 situations:

View file

@ -356,6 +356,7 @@ enum
SECF_FLOORDROP = 4, // all actors standing on this floor will remain on it when it lowers very fast.
SECF_NORESPAWN = 8, // players can not respawn in this sector
SECF_FRICTION = 16, // sector has friction enabled
SECF_PUSH = 32, // pushers enabled
SECF_WASSECRET = 1 << 30, // a secret that was discovered