- added a CANUSEWALLS flag which allows a monster to activate 'use' specials

like doors. This flag is on by default for any monster which was the
  previous behavior.
- Optimized the DECORATE flag parser so it can more efficiently handle
  the deprecated flags. As a side effect of this optimization the deprecated
  flags became usable in A_ChangeFlag again.
- Changed LONGMELEERANGE flag into a MeleeThreshold property.
- Changed SHORTMISSILERANGE flag into a MaxTargetRange property.
- Added Thing_Stop action special.


SVN r517 (trunk)
This commit is contained in:
Christoph Oelckers 2007-04-22 21:01:35 +00:00
commit 9deec29b34
11 changed files with 154 additions and 49 deletions

View file

@ -324,10 +324,10 @@ bool AActor::SuggestMissileAttack (fixed_t dist)
// Making these values customizable is not necessary and in most case more confusing than
// helpful because no value here translates into anything really meaningful.
if (flags4 & MF4_SHORTMISSILERANGE && dist>14*64*FRACUNIT)
return false; // The Arch Vile's special behavior turned into a flag
if (maxtargetrange > 0 && dist > maxtargetrange)
return false; // The Arch Vile's special behavior turned into a property
if (flags4 & MF4_LONGMELEERANGE && dist < 196*FRACUNIT)
if (dist < meleethreshold)
return false; // From the Revenant: close enough for fist attack
if (flags4 & MF4_MISSILEMORE) dist >>= 1;
@ -521,8 +521,8 @@ bool P_Move (AActor *actor)
while (spechit.Pop (ld))
{
// [RH] let monsters push lines, as well as use them
if (P_ActivateLine (ld, actor, 0, SPAC_USE) ||
((actor->flags & MF2_PUSHWALL) && P_ActivateLine (ld, actor, 0, SPAC_PUSH)))
if (((actor->flags4 & MF4_CANUSEWALLS) && P_ActivateLine (ld, actor, 0, SPAC_USE)) ||
((actor->flags2 & MF2_PUSHWALL) && P_ActivateLine (ld, actor, 0, SPAC_PUSH)))
{
good |= ld == BlockingLine ? 1 : 2;
}