]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove the crosshair ring if the player goes unarmed while previously having held...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 22 Jan 2011 16:41:07 +0000 (18:41 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 22 Jan 2011 16:41:07 +0000 (18:41 +0200)
qcsrc/server/cl_client.qc

index be1cfe480f152a4aa0f1d0cc029fc50465f44bde..f34654e8aaa12bcca2527b31a45714745b8b7517 100644 (file)
@@ -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)