- Added damage factors that allows to make monsters more or less resistant

to specific damage types.
- Changed Dehacked parser to use the DECORATE symbol tables for code pointers
  instead of creating its own ones.
- Removed the HandleNoSector hack and changed A_Look so that it uses the sector's
  sound target for actors with MF_NOSECTOR regardless of compatibility settings.
- Moved initialization of weapon slots after the actor initialization.
  With default weapons exported to DECORATE it can't be done earlier.
- Converted Doom weapons to DECORATE.
- Changed backpack definition so that Doom's backpack is no longer the base
  class that implements its functionality. Now there is an abstract base class
  all backpack-like items derive from. Also moved the actual definition of Doom's
  backpack to DECORATE.


SVN r519 (trunk)
This commit is contained in:
Christoph Oelckers 2007-04-28 09:06:32 +00:00
commit ea4f160e35
29 changed files with 785 additions and 735 deletions

View file

@ -885,10 +885,26 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
return;
}
}
// to be removed and replaced by an actual damage factor
// once the actors using it are converted to DECORATE.
if (mod == NAME_Fire && target->flags4 & MF4_FIRERESIST)
{
damage /= 2;
}
else
{
DmgFactors * df = target->GetClass()->ActorInfo->DamageFactors;
if (df != NULL)
{
fixed_t * pdf = df->CheckKey(mod);
if (pdf != NULL)
{
damage = FixedMul(damage, *pdf);
if (damage <= 0) return;
}
}
}
damage = inflictor->DoSpecialDamage (target, damage);
if (damage == -1)
{