- Update scripting branch to trunk.
SVN r3758 (scripting)
This commit is contained in:
commit
562cf04db2
614 changed files with 63691 additions and 31256 deletions
|
|
@ -2,10 +2,11 @@
|
|||
|
||||
#include "info.h"
|
||||
#include "gi.h"
|
||||
#include "r_data.h"
|
||||
#include "a_pickups.h"
|
||||
#include "templates.h"
|
||||
#include "g_level.h"
|
||||
#include "d_player.h"
|
||||
#include "farchive.h"
|
||||
|
||||
|
||||
IMPLEMENT_CLASS (AArmor)
|
||||
|
|
@ -114,7 +115,7 @@ void ABasicArmor::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
|||
{
|
||||
int saved;
|
||||
|
||||
if (damageType != NAME_Drowning)
|
||||
if (!DamageTypeDefinition::IgnoreArmor(damageType))
|
||||
{
|
||||
int full = MAX(0, MaxFullAbsorb - AbsorbCount);
|
||||
if (damage < full)
|
||||
|
|
@ -170,13 +171,13 @@ void ABasicArmor::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
|||
if ((damage > 0) && (ArmorType != NAME_None)) // BasicArmor is not going to have any damage factor, so skip it.
|
||||
{
|
||||
// This code is taken and adapted from APowerProtection::ModifyDamage().
|
||||
// The differences include not checking for the NAME_None key (doesn't seem appropriate here),
|
||||
// not using a default value, and of course the way the damage factor info is obtained.
|
||||
// The differences include not using a default value, and of course the way
|
||||
// the damage factor info is obtained.
|
||||
const fixed_t *pdf = NULL;
|
||||
DmgFactors *df = PClass::FindActor(ArmorType)->DamageFactors;
|
||||
if (df != NULL && df->CountUsed() != 0)
|
||||
{
|
||||
pdf = df->CheckKey(damageType);
|
||||
pdf = df->CheckFactor(damageType);
|
||||
if (pdf != NULL)
|
||||
{
|
||||
damage = newdamage = FixedMul(damage, *pdf);
|
||||
|
|
@ -489,7 +490,7 @@ bool AHexenArmor::AddArmorToSlot (AActor *actor, int slot, int amount)
|
|||
|
||||
void AHexenArmor::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
||||
{
|
||||
if (damageType != NAME_Drowning)
|
||||
if (!DamageTypeDefinition::IgnoreArmor(damageType))
|
||||
{
|
||||
fixed_t savedPercent = Slots[0] + Slots[1] + Slots[2] + Slots[3] + Slots[4];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue