From 30ffffd904021581fc430cdf9ee873110f4b1028 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 29 Jul 2010 06:53:20 +0000 Subject: [PATCH] - fixed: Checks for poison damage were not correct. SVN r2469 (trunk) --- src/p_map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index b19c04e7b..f8c267070 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -1090,7 +1090,7 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm) S_Sound (tm.thing, CHAN_BODY, "misc/ripslop", 1, ATTN_IDLE); // Do poisoning (if using new style poison) - if (tm.thing->PoisonDuration != INT_MIN) + if (tm.thing->PoisonDamage > 0 && tm.thing->PoisonDuration != INT_MIN) { P_PoisonMobj(thing, tm.thing, tm.thing->target, tm.thing->PoisonDamage, tm.thing->PoisonDuration, tm.thing->PoisonPeriod); } @@ -1118,7 +1118,7 @@ bool PIT_CheckThing (AActor *thing, FCheckPosition &tm) } // Do poisoning (if using new style poison) - if (tm.thing->PoisonDuration != INT_MIN) + if (tm.thing->PoisonDamage > 0 && tm.thing->PoisonDuration != INT_MIN) { P_PoisonMobj(thing, tm.thing, tm.thing->target, tm.thing->PoisonDamage, tm.thing->PoisonDuration, tm.thing->PoisonPeriod); } @@ -3487,7 +3487,7 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance, } // Allow puffs to inflict poison damage, so that hitscans can poison, too. - if (puffDefaults->PoisonDuration != INT_MIN) + if (puffDefaults->PoisonDamage > 0 && puffDefaults->PoisonDuration != INT_MIN) { P_PoisonMobj(trace.Actor, puff ? puff : t1, t1, puffDefaults->PoisonDamage, puffDefaults->PoisonDuration, puffDefaults->PoisonPeriod); } @@ -3862,7 +3862,7 @@ void P_RailAttack (AActor *source, int damage, int offset, int color1, int color } if (spawnpuff) P_SpawnPuff (source, puffclass, x, y, z, (source->angle + angleoffset) - ANG90, 1, PF_HITTHING); - if (puffDefaults && puffDefaults->PoisonDuration != INT_MIN) + if (puffDefaults && puffDefaults->PoisonDamage > 0 && puffDefaults->PoisonDuration != INT_MIN) P_PoisonMobj(RailHits[i].HitActor, thepuff ? thepuff : source, source, puffDefaults->PoisonDamage, puffDefaults->PoisonDuration, puffDefaults->PoisonPeriod); P_DamageMobj (RailHits[i].HitActor, thepuff? thepuff:source, source, damage, damagetype, DMG_INFLICTOR_IS_PUFF);