]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Allow any burning entity to transfer fire to other entities
authorMario <zacjardine@y7mail.com>
Mon, 10 Sep 2018 16:10:58 +0000 (02:10 +1000)
committerMario <zacjardine@y7mail.com>
Mon, 10 Sep 2018 16:10:58 +0000 (02:10 +1000)
qcsrc/server/g_damage.qc

index 4964bf91e71014cea100bed1b76e5c784d8e91c4..eb05e2c85b7e87e24ba7749d8ceee21ed5760286 100644 (file)
@@ -1236,11 +1236,11 @@ void Fire_ApplyDamage(entity e)
        }
        e.fire_hitsound = true;
 
-       if(!IS_INDEPENDENT_PLAYER(e))
-       if(!STAT(FROZEN, e))
-               FOREACH_CLIENT(IS_PLAYER(it) && it != e, {
-                       if(!IS_DEAD(it))
-                       if(!IS_INDEPENDENT_PLAYER(it))
+       if(!IS_INDEPENDENT_PLAYER(e) && !STAT(FROZEN, e))
+       {
+               IL_EACH(g_damagedbycontents, it.damagedbycontents && it != e,
+               {
+                       if(!IS_DEAD(it) && it.takedamage && !IS_INDEPENDENT_PLAYER(it))
                        if(boxesoverlap(e.absmin, e.absmax, it.absmin, it.absmax))
                        {
                                t = autocvar_g_balance_firetransfer_time * (e.fire_endtime - time);
@@ -1248,6 +1248,8 @@ void Fire_ApplyDamage(entity e)
                                Fire_AddDamage(it, o, d, t, DEATH_FIRE.m_id);
                        }
                });
+       }
+                       
 }
 
 void Fire_ApplyEffect(entity e)