From: Samual Lenks Date: Thu, 2 Jan 2014 13:33:37 +0000 (-0500) Subject: Limit queue to MAX_SHOCKWAVE_HITS X-Git-Tag: xonotic-v0.8.0~152^2~165 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b240d4e6f894e6bc04813566cf63383543539c31;p=xonotic%2Fxonotic-data.pk3dir.git Limit queue to MAX_SHOCKWAVE_HITS --- diff --git a/qcsrc/common/weapons/w_shockwave.qc b/qcsrc/common/weapons/w_shockwave.qc index c2432fa04..6fb8e9541 100644 --- a/qcsrc/common/weapons/w_shockwave.qc +++ b/qcsrc/common/weapons/w_shockwave.qc @@ -490,7 +490,7 @@ void W_Shockwave_Attack() final_force_z *= WEP_CVAR(shockwave, blast_force_zscale); // queue damage with this calculated info - if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { ++queue; } + if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { queue = min(queue + 1, MAX_SHOCKWAVE_HITS); } #ifdef DEBUG_SHOCKWAVE print(sprintf( @@ -582,7 +582,7 @@ void W_Shockwave_Attack() final_force_z *= WEP_CVAR(shockwave, blast_force_zscale); // queue damage with this calculated info - if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { ++queue; } + if(W_Shockwave_Attack_CheckHit(queue, head, final_force, final_damage)) { queue = min(queue + 1, MAX_SHOCKWAVE_HITS); } #ifdef DEBUG_SHOCKWAVE print(sprintf(