From: Samual Lenks Date: Thu, 2 Jan 2014 13:31:31 +0000 (-0500) Subject: Some fixes for queueing of damage with shockwave X-Git-Tag: xonotic-v0.8.0~152^2~166 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5f81676d2fb92f1591b3711861ca7a8bae083855;p=xonotic%2Fxonotic-data.pk3dir.git Some fixes for queueing of damage with shockwave --- diff --git a/qcsrc/common/weapons/w_shockwave.qc b/qcsrc/common/weapons/w_shockwave.qc index b42a31b41b..c2432fa042 100644 --- a/qcsrc/common/weapons/w_shockwave.qc +++ b/qcsrc/common/weapons/w_shockwave.qc @@ -80,7 +80,7 @@ void spawnfunc_weapon_shockwave() weapon_defaultspawnfunc(WEP_SHOCKWAVE); } -#define MAX_SHOCKWAVE_HITS 5 +#define MAX_SHOCKWAVE_HITS 10 .float swing_prev; .entity swing_alreadyhit; @@ -300,10 +300,8 @@ float W_Shockwave_Attack_CheckHit( // WEAPONTODO: check if we hit MAX_SHOCKWAVE_HITS if(!head) { return FALSE; } float i; - - ++queue; - for(i = 1; i <= queue; ++i) + for(i = 0; i <= queue; ++i) { if(shockwave_hit[i] == head) { @@ -602,7 +600,7 @@ void W_Shockwave_Attack() head = head.chain; } - for(i = 1; i <= queue; ++i) + for(i = 0; i <= queue; ++i) { head = shockwave_hit[i]; final_force = shockwave_hit_force[i];