mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-17 17:41:23 +00:00
- shouldn't have committed without testing...
SVN r1258 (trunk)
This commit is contained in:
parent
402d0e5fa1
commit
c800d1ec2c
1 changed files with 4 additions and 2 deletions
|
@ -1475,10 +1475,11 @@ void APowerDamage::ModifyDamage(int damage, FName damageType, int &newdamage, bo
|
||||||
static const fixed_t def = 4*FRACUNIT;
|
static const fixed_t def = 4*FRACUNIT;
|
||||||
if (!passive && damage > 0)
|
if (!passive && damage > 0)
|
||||||
{
|
{
|
||||||
|
const fixed_t * pdf = NULL;
|
||||||
DmgFactors * df = GetClass()->ActorInfo->DamageFactors;
|
DmgFactors * df = GetClass()->ActorInfo->DamageFactors;
|
||||||
if (df != NULL && df->CountUsed() != 0)
|
if (df != NULL && df->CountUsed() != 0)
|
||||||
{
|
{
|
||||||
const fixed_t * pdf = df->CheckKey(damageType);
|
pdf = df->CheckKey(damageType);
|
||||||
if (pdf== NULL && damageType != NAME_None) pdf = df->CheckKey(NAME_None);
|
if (pdf== NULL && damageType != NAME_None) pdf = df->CheckKey(NAME_None);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1534,10 +1535,11 @@ void APowerProtection::ModifyDamage(int damage, FName damageType, int &newdamage
|
||||||
static const fixed_t def = FRACUNIT/4;
|
static const fixed_t def = FRACUNIT/4;
|
||||||
if (passive && damage > 0)
|
if (passive && damage > 0)
|
||||||
{
|
{
|
||||||
|
const fixed_t * pdf = NULL;
|
||||||
DmgFactors * df = GetClass()->ActorInfo->DamageFactors;
|
DmgFactors * df = GetClass()->ActorInfo->DamageFactors;
|
||||||
if (df != NULL && df->CountUsed() != 0)
|
if (df != NULL && df->CountUsed() != 0)
|
||||||
{
|
{
|
||||||
const fixed_t * pdf = df->CheckKey(damageType);
|
pdf = df->CheckKey(damageType);
|
||||||
if (pdf== NULL && damageType != NAME_None) pdf = df->CheckKey(NAME_None);
|
if (pdf== NULL && damageType != NAME_None) pdf = df->CheckKey(NAME_None);
|
||||||
}
|
}
|
||||||
else pdf = &def;
|
else pdf = &def;
|
||||||
|
|
Loading…
Reference in a new issue