diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f7e0d39aa1..9372faecc6 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +November 28, 2007 (Changes by Graf Zahl) +- after looking at the most recent Vavoom update I realized that A_FastChase should not + use the multi-purpose special2 as counter for strafing so I added a new variable + for this purpose. + November 24, 2007 (Changes by Graf Zahl) - added Floor_MoveToValue and Ceiling_MoveToValue action specials. diff --git a/src/actor.h b/src/actor.h index 3f8961eeed..60b503c005 100644 --- a/src/actor.h +++ b/src/actor.h @@ -692,6 +692,7 @@ public: fixed_t bouncefactor; // Strife's grenades use 50%, Hexen's Flechettes 70. int bouncecount; // Strife's grenades only bounce twice before exploding fixed_t gravity; // [GRB] Gravity factor + int FastChaseStrafeCount; // a linked list of sectors where this object appears struct msecnode_s *touching_sectorlist; // phares 3/14/98 diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index b1e2508f19..f657442497 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -1963,13 +1963,13 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi if (fastchase && !dontmove) { - if (actor->special2 > 0) + if (actor->FastChaseStrafeCount > 0) { - actor->special2--; + actor->FastChaseStrafeCount--; } else { - actor->special2 = 0; + actor->FastChaseStrafeCount = 0; actor->momx = 0; actor->momy = 0; fixed_t dist = P_AproxDistance (actor->x - actor->target->x, actor->y - actor->target->y); @@ -1982,7 +1982,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi else ang -= ANGLE_90; actor->momx = 13 * finecosine[ang>>ANGLETOFINESHIFT]; actor->momy = 13 * finesine[ang>>ANGLETOFINESHIFT]; - actor->special2 = 3; // strafe time + actor->FastChaseStrafeCount = 3; // strafe time } } } @@ -2056,7 +2056,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi // // class bosses don't do this when strafing - if ((!fastchase || !actor->special2) && !dontmove) + if ((!fastchase || !actor->FastChaseStrafeCount) && !dontmove) { // CANTLEAVEFLOORPIC handling was completely missing in the non-serpent functions. fixed_t oldX = actor->x; diff --git a/src/p_lnspec.cpp b/src/p_lnspec.cpp index 14d54b3857..e16dfdd3fc 100644 --- a/src/p_lnspec.cpp +++ b/src/p_lnspec.cpp @@ -2798,7 +2798,7 @@ lnSpecFunc LineSpecials[256] = LS_ClearForceField, LS_Floor_RaiseByValueTimes8, LS_Floor_LowerByValueTimes8, - LS_Floor_MoveToValue + LS_Floor_MoveToValue, LS_Ceiling_Waggle, LS_Teleport_ZombieChanger, LS_Ceiling_LowerByValue, diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index a5817a0030..82da046899 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -315,7 +315,8 @@ void AActor::Serialize (FArchive &arc) << meleethreshold << meleerange << DamageType - << gravity; + << gravity + << FastChaseStrafeCount; if (arc.IsStoring ()) {