From c800d1ec2c9a813efb04eb14a9fcebb865158e73 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 7 Oct 2008 21:03:21 +0000 Subject: [PATCH] - shouldn't have committed without testing... SVN r1258 (trunk) --- src/g_shared/a_artifacts.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index c1cc89f3d7..6ee93f4f75 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -1475,10 +1475,11 @@ void APowerDamage::ModifyDamage(int damage, FName damageType, int &newdamage, bo static const fixed_t def = 4*FRACUNIT; if (!passive && damage > 0) { + const fixed_t * pdf = NULL; DmgFactors * df = GetClass()->ActorInfo->DamageFactors; 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); } else @@ -1534,10 +1535,11 @@ void APowerProtection::ModifyDamage(int damage, FName damageType, int &newdamage static const fixed_t def = FRACUNIT/4; if (passive && damage > 0) { + const fixed_t * pdf = NULL; DmgFactors * df = GetClass()->ActorInfo->DamageFactors; 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); } else pdf = &def;