- added two new things which can set a sector's color without the need of tags

or scripts. ColorSetter (#9038) sets the sector's color and FadeSetter (#9039)
  sets the fog color.
- added new flags MF5_ALWAYSFAST and MF5_NEVERFAST. These flags unconditionally
  enable or disable fast movement logic, regardless of skill settings.
- added an abstraction layer for skill related settings. This is a preparation
  for implementing custom skill definitions but right now all it does is
  returning the original values but keeping the related information all in one
  place


SVN r557 (trunk)
This commit is contained in:
Christoph Oelckers 2007-10-29 22:15:46 +00:00
commit 170b633e91
19 changed files with 185 additions and 104 deletions

View file

@ -331,7 +331,8 @@ bool AActor::SuggestMissileAttack (fixed_t dist)
if (flags4 & MF4_MISSILEMORE) dist >>= 1;
if (flags4 & MF4_MISSILEEVENMORE) dist >>= 3;
return pr_checkmissilerange() >= MIN<int> (dist >> FRACBITS, MinMissileChance);
int mmc = FixedMul(MinMissileChance, G_SkillProperty(SKILLP_Aggressiveness));
return pr_checkmissilerange() >= MIN<int> (dist >> FRACBITS, mmc);
}
//=============================================================================
@ -1804,8 +1805,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
}
}
if (nightmarefast &&
(gameskill == sk_nightmare || (dmflags & DF_FAST_MONSTERS)))
if (nightmarefast && G_SkillProperty(SKILLP_FastMonsters))
{ // Monsters move faster in nightmare mode
actor->tics -= actor->tics / 2;
if (actor->tics < 3)
@ -1897,7 +1897,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
if (actor->flags & MF_JUSTATTACKED)
{
actor->flags &= ~MF_JUSTATTACKED;
if ((gameskill != sk_nightmare) && !(dmflags & DF_FAST_MONSTERS))
if (!actor->isFast())
{
P_NewChaseDir (actor);
}
@ -2009,8 +2009,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
// check for missile attack
if (missilestate)
{
if (gameskill < sk_nightmare
&& actor->movecount && !(dmflags & DF_FAST_MONSTERS))
if (!actor->isFast() && actor->movecount)
{
goto nomissile;
}