- Fixed: The pointer cleanup code must also check a sector's sky box pointers.

- Fixed: Right after teleporting P_SlideMove could cause player movement.
  Added a check for reactiontime to prevent that.
- Fixed: PainChances and Damagefactors were never freed.
- Added option to A_Chase that prevents the monster from moving.
- Fixed: The stained glass shards were missing the HEXENBOUNCE flag.
- Added some NULL pointer checks to AActor::GiveAmmo.
- Fixed: The FSwordMissile was missing the special damage handling that
  reduces damage when hitting a player.

SVN r555 (trunk)
This commit is contained in:
Christoph Oelckers 2007-10-29 20:27:40 +00:00
commit b15767c26f
17 changed files with 149 additions and 54 deletions

View file

@ -1766,7 +1766,7 @@ nosee:
//=============================================================================
#define CLASS_BOSS_STRAFE_RANGE 64*10*FRACUNIT
void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missilestate, bool playactive, bool nightmarefast)
void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missilestate, bool playactive, bool nightmarefast, bool dontmove)
{
int delta;
@ -1879,7 +1879,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
A_Look (actor);
if (actor->target == NULL)
{
A_Wander (actor);
if (!dontmove) A_Wander (actor);
actor->flags &= ~MF_INCHASE;
return;
}
@ -1961,7 +1961,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
// it can be just as easily handled by a simple flag so the monsters
// can take advantage of all the other enhancements of A_Chase.
if (fastchase)
if (fastchase && !dontmove)
{
if (actor->special2 > 0)
{
@ -2057,7 +2057,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
//
// class bosses don't do this when strafing
if (!fastchase || !actor->special2)
if ((!fastchase || !actor->special2) && !dontmove)
{
// CANTLEAVEFLOORPIC handling was completely missing in the non-serpent functions.
fixed_t oldX = actor->x;
@ -2274,7 +2274,8 @@ enum ChaseFlags
CHF_FASTCHASE = 1,
CHF_NOPLAYACTIVE = 2,
CHF_NIGHTMAREFAST = 4,
CHF_RESURRECT = 8
CHF_RESURRECT = 8,
CHF_DONTMOVE = 16,
};
void A_Chase (AActor *actor)
@ -2289,23 +2290,23 @@ void A_Chase (AActor *actor)
FState *missile = StateParameters[index+1]==0? NULL : P_GetState(actor, CallingState, StateParameters[index+1]);
A_DoChase(actor, !!(flags&CHF_FASTCHASE), melee, missile, !(flags&CHF_NOPLAYACTIVE),
!!(flags&CHF_NIGHTMAREFAST));
!!(flags&CHF_NIGHTMAREFAST), !!(flags&CHF_DONTMOVE));
}
else // this is the old default A_Chase
{
A_DoChase (actor, false, actor->MeleeState, actor->MissileState, true, !!(gameinfo.gametype & GAME_Raven));
A_DoChase (actor, false, actor->MeleeState, actor->MissileState, true, !!(gameinfo.gametype & GAME_Raven), false);
}
}
void A_FastChase (AActor *actor)
{
A_DoChase (actor, true, actor->MeleeState, actor->MissileState, true, true);
A_DoChase (actor, true, actor->MeleeState, actor->MissileState, true, true, false);
}
void A_VileChase (AActor *actor)
{
if (!P_CheckForResurrection(actor, true))
A_DoChase (actor, false, actor->MeleeState, actor->MissileState, true, !!(gameinfo.gametype & GAME_Raven));
A_DoChase (actor, false, actor->MeleeState, actor->MissileState, true, !!(gameinfo.gametype & GAME_Raven), false);
}
void A_ExtChase(AActor * self)
@ -2318,7 +2319,7 @@ void A_ExtChase(AActor * self)
EvalExpressionI (StateParameters[index], self) ? self->MeleeState:NULL,
EvalExpressionI (StateParameters[index+1], self) ? self->MissileState:NULL,
EvalExpressionN (StateParameters[index+2], self),
!!EvalExpressionI (StateParameters[index+3], self));
!!EvalExpressionI (StateParameters[index+3], self), false);
}
//=============================================================================