From c11c1a986e055902e4796a1f14b40f3295187a4d Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 25 Nov 2014 18:58:03 +0100 Subject: [PATCH] Don't apply aim shake effect whenever a bot dies --- qcsrc/server/cl_player.qc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index c11e92051..0301c8355 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -573,9 +573,12 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht // throw off bot aim temporarily float shake; - shake = damage * 5 / (bound(0,skill,100) + 1); - self.v_angle_x = self.v_angle_x + (random() * 2 - 1) * shake; - self.v_angle_y = self.v_angle_y + (random() * 2 - 1) * shake; + if(IS_BOT_CLIENT(self) && self.health >= 1) + { + shake = damage * 5 / (bound(0,skill,100) + 1); + self.v_angle_x = self.v_angle_x + (random() * 2 - 1) * shake; + self.v_angle_y = self.v_angle_y + (random() * 2 - 1) * shake; + } } } else -- 2.39.2