From aeee07218c9e2bbcf027e30184fbbf78cd4a7d5a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 28 Nov 2007 13:53:55 +0000 Subject: [PATCH] - 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. - forgot to save p_lnspec.cpp before last commut. SVN r574 (trunk) --- docs/rh-log.txt | 5 +++++ src/actor.h | 1 + src/p_enemy.cpp | 10 +++++----- src/p_lnspec.cpp | 2 +- src/p_mobj.cpp | 3 ++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index f7e0d39aa..9372faecc 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 3f8961eee..60b503c00 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 b1e2508f1..f65744249 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 14d54b385..e16dfdd3f 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 a5817a003..82da04689 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 ()) {