diff --git a/src/playsim/actor.h b/src/playsim/actor.h index 8b7b64344..87d4fb926 100644 --- a/src/playsim/actor.h +++ b/src/playsim/actor.h @@ -142,7 +142,7 @@ enum ActorFlag MF_DROPOFF = 0x00000400, // allow jumps from high places MF_PICKUP = 0x00000800, // for players to pick up items MF_NOCLIP = 0x00001000, // player cheat - MF_INCHASE = 0x00002000, // [RH] used by A_Chase and A_Look to avoid recursion + MF_SLIDE = 0x00002000, // Not used anymore but needed for MBF21 flag checkers. MF_FLOAT = 0x00004000, // allow moves to any height, no gravity MF_TELEPORT = 0x00008000, // don't cross lines or look at heights MF_MISSILE = 0x00010000, // don't hit same species, explode on block @@ -167,9 +167,6 @@ enum ActorFlag MF_NOLIFTDROP = 0x20000000, // [RH] Used with MF_NOGRAVITY to avoid dropping with lifts MF_STEALTH = 0x40000000, // [RH] Andy Baker's stealth monsters MF_ICECORPSE = 0x80000000, // a frozen corpse (for blasting) [RH] was 0x800000 - - // --- dummies for unknown/unimplemented Strife flags --- - MF_STRIFEx8000000 = 0, // seems related to MF_SHADOW }; // --- mobj.flags2 --- @@ -399,6 +396,7 @@ enum ActorFlag7 MF7_FORCEZERORADIUSDMG = 0x10000000, // passes zero radius damage on to P_DamageMobj, this is necessary in some cases where DoSpecialDamage gets overrideen. MF7_NOINFIGHTSPECIES = 0x20000000, // don't start infights with one's own species. MF7_FORCEINFIGHTING = 0x40000000, // overrides a map setting of 'no infighting'. + MF7_INCHASE = 0x80000000, // [RH] used by A_Chase and A_Look to avoid recursion }; enum ActorFlag8 { diff --git a/src/playsim/p_enemy.cpp b/src/playsim/p_enemy.cpp index 6881ae789..16c565c70 100644 --- a/src/playsim/p_enemy.cpp +++ b/src/playsim/p_enemy.cpp @@ -1964,7 +1964,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx) } // Let the self wander around aimlessly looking for a fight - if (!(self->flags & MF_INCHASE)) + if (!(self->flags7 & MF7_INCHASE)) { if (seestate) { @@ -2040,7 +2040,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx) } } - if (self->target && !(self->flags & MF_INCHASE)) + if (self->target && !(self->flags7 & MF7_INCHASE)) { if (!(flags & LOF_NOJUMP)) { @@ -2204,15 +2204,14 @@ nosee: void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missilestate, bool playactive, bool nightmarefast, bool dontmove, int flags) { - if (actor->flags5 & MF5_INCONVERSATION) return; - if (actor->flags & MF_INCHASE) + if (actor->flags7 & MF7_INCHASE) { return; } - actor->flags |= MF_INCHASE; + actor->flags7 |= MF7_INCHASE; // [RH] Andy Baker's stealth monsters if (actor->flags & MF_STEALTH) @@ -2325,7 +2324,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi } if (P_LookForPlayers (actor, true, NULL) && actor->target != actor->goal) { // got a new target - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; return; } if (actor->target == NULL) @@ -2336,14 +2335,14 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi if (actor->target == NULL) { if (!dontmove) A_Wander(actor); - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; return; } } else { actor->SetIdle(); - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; return; } } @@ -2362,7 +2361,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi //over and over again. if (flags & CHF_STOPIFBLOCKED) actor->movecount = pr_trywalk() & 15; - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; return; } @@ -2410,7 +2409,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi actor->flags4 |= MF4_INCOMBAT; actor->SetIdle(); } - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; actor->goal = newgoal; return; } @@ -2461,7 +2460,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi S_Sound (actor, CHAN_WEAPON, 0, actor->AttackSound, 1, ATTN_NORM); actor->SetState (meleestate); - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; return; } @@ -2479,7 +2478,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi actor->SetState (missilestate); actor->flags |= MF_JUSTATTACKED; actor->flags4 |= MF4_INCOMBAT; - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; return; } } @@ -2505,7 +2504,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi } if (gotNew && actor->target != oldtarget) { - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; return; // got a new target } } @@ -2555,7 +2554,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi actor->PlayActiveSound (); } - actor->flags &= ~MF_INCHASE; + actor->flags7 &= ~MF7_INCHASE; } //========================================================================== diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index 28ed925c9..bd2579244 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -81,7 +81,7 @@ extern float BackbuttonAlpha; // internal flags. These do not get exposed to actor definitions but scripts need to be able to access them as variables. static FFlagDef InternalActorFlagDefs[]= { - DEFINE_FLAG(MF, INCHASE, AActor, flags), + DEFINE_FLAG(MF7, INCHASE, AActor, flags7), DEFINE_FLAG(MF, UNMORPHED, AActor, flags), DEFINE_FLAG(MF2, FLY, AActor, flags2), DEFINE_FLAG(MF2, ONMOBJ, AActor, flags2),