From b240d4e6f894e6bc04813566cf63383543539c31 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Thu, 2 Jan 2014 08:33:37 -0500 Subject: [PATCH] Limit queue to MAX_SHOCKWAVE_HITS --- qcsrc/common/weapons/w_shockwave.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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( -- 2.39.2