]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2484 Inferno buff causing crazy negative damage to players in the water
authorterencehill <piuntn@gmail.com>
Wed, 3 Mar 2021 22:33:14 +0000 (23:33 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 3 Mar 2021 22:33:14 +0000 (23:33 +0100)
qcsrc/server/damage.qc

index 8b77c8b14af755f290c0e4ae83e01984a938ad80..06dcabe7f96f4b4a44686b7474fdf5b15ac80ff6 100644 (file)
@@ -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;