From: terencehill Date: Tue, 25 Nov 2014 17:58:03 +0000 (+0100) Subject: Don't apply aim shake effect whenever a bot dies X-Git-Tag: xonotic-v0.8.0~133^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c11c1a986e055902e4796a1f14b40f3295187a4d;p=xonotic%2Fxonotic-data.pk3dir.git Don't apply aim shake effect whenever a bot dies --- 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