From: terencehill Date: Tue, 25 Nov 2014 21:51:18 +0000 (+0100) Subject: Fix shake effect being applied only on the first damage of a multiple shot X-Git-Tag: xonotic-v0.8.0~133^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=014633460f0eeec91445039e38ed409c8d393d0b;p=xonotic%2Fxonotic-data.pk3dir.git Fix shake effect being applied only on the first damage of a multiple shot --- diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 0301c8355..133a59d71 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -535,7 +535,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht self.health = self.health - take; // pause regeneration for 5 seconds if(take) - self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_health_regen); + self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_health_regen); if (time > self.pain_finished) //Don't switch pain sequences like crazy { @@ -570,15 +570,15 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht PlayerSound(playersound_pain25, CH_PAIN, VOICETYPE_PLAYERSOUND); } } + } - // throw off bot aim temporarily - float 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; - } + // throw off bot aim temporarily + float 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