From: terencehill Date: Wed, 3 Mar 2021 22:33:14 +0000 (+0100) Subject: Fix #2484 Inferno buff causing crazy negative damage to players in the water X-Git-Tag: xonotic-v0.8.5~529 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e06d52fabc0373aad87cad04e4a67cfe729e1a2a;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2484 Inferno buff causing crazy negative damage to players in the water --- diff --git a/qcsrc/server/damage.qc b/qcsrc/server/damage.qc index 8b77c8b14..06dcabe7f 100644 --- a/qcsrc/server/damage.qc +++ b/qcsrc/server/damage.qc @@ -1229,6 +1229,10 @@ void Fire_ApplyDamage(entity e) float t, d, hi, ty; entity o; + // water, slime and ice stop fire + if (STAT(FROZEN, e) || (e.waterlevel && (e.watertype != CONTENT_LAVA))) + e.fire_endtime = 0; + if (!Fire_IsBurning(e)) return; @@ -1236,15 +1240,6 @@ void Fire_ApplyDamage(entity e) if(IS_NOT_A_CLIENT(o)) o = e.fire_owner; - // water and slime stop fire - if(e.waterlevel) - if(e.watertype != CONTENT_LAVA) - e.fire_endtime = 0; - - // ice stops fire - if(STAT(FROZEN, e)) - e.fire_endtime = 0; - t = min(frametime, e.fire_endtime - time); d = e.fire_damagepersec * t;