From: Mircea Kitsune Date: Sat, 22 Jan 2011 16:41:07 +0000 (+0200) Subject: Remove the crosshair ring if the player goes unarmed while previously having held... X-Git-Tag: xonotic-v0.5.0~309^2~7^2~109 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=65d94829d290b8bccc84b803c024da1d770833d8;p=xonotic%2Fxonotic-data.pk3dir.git Remove the crosshair ring if the player goes unarmed while previously having held a loaded weapon --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index be1cfe480..f34654e8a 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -2951,6 +2951,10 @@ void PlayerPreThink (void) } target_voicescript_next(self); + + // if a player goes unarmed after holding a loaded weapon, empty his clip size and remove the crosshair ammo ring + if(!self.weapon) + self.clip_load = self.clip_size = 0; } float isInvisibleString(string s)