From: Rudolf Polzer Date: Wed, 24 Aug 2011 13:37:40 +0000 (+0200) Subject: fix a possible double-damage bug from the crylink X-Git-Tag: xonotic-v0.5.0~64 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3d0e35ded8a7bc45af7c6522209dfb3c80f3ce5f;p=xonotic%2Fxonotic-data.pk3dir.git fix a possible double-damage bug from the crylink --- diff --git a/qcsrc/server/w_crylink.qc b/qcsrc/server/w_crylink.qc index ae3600de7..9c43b6bc5 100644 --- a/qcsrc/server/w_crylink.qc +++ b/qcsrc/server/w_crylink.qc @@ -53,6 +53,10 @@ void W_Crylink_Dequeue(entity e) void W_Crylink_LinkExplode (entity e, entity e2) { float a; + + if(e == e2) + return; + a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1); if(e == e.realowner.crylink_lastgroup) @@ -63,8 +67,7 @@ void W_Crylink_LinkExplode (entity e, entity e2) else RadiusDamage (e, e.realowner, autocvar_g_balance_crylink_primary_damage * a, autocvar_g_balance_crylink_primary_edgedamage * a, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * a, e.projectiledeathtype, other); - if(e.queuenext != e2) - W_Crylink_LinkExplode(e.queuenext, e2); + W_Crylink_LinkExplode(e.queuenext, e2); e.classname = "spike_oktoremove"; remove (e);