]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
When not playing a round stop current weapon action; also give initial weapon to...
authorterencehill <piuntn@gmail.com>
Fri, 15 Feb 2013 18:19:30 +0000 (19:19 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 15 Feb 2013 18:19:30 +0000 (19:19 +0100)
qcsrc/server/cl_weapons.qc

index cdc6ea36d088fa90f23c5806a4b4bb9629af7ad6..7e9da5b212c90f9bc35e3daa25d49a18a159847d 100644 (file)
@@ -373,11 +373,18 @@ void W_WeaponFrame()
        if (frametime)
                self.weapon_frametime = frametime;
 
+       if (!self.weaponentity || self.health < 1)
+               return; // Dead player can't use weapons and injure impulse commands
+
        if(time < game_starttime && !autocvar_sv_ready_restart_after_countdown)
                return;
 
        if(round_handler_IsActive() && !round_handler_IsRoundStarted())
+       if(self.weaponentity.state != WS_CLEAR)
+       {
+               w_ready();
                return;
+       }
 
        if(self.player_blocked)
                return;
@@ -385,9 +392,6 @@ void W_WeaponFrame()
        if(self.freezetag_frozen == 1)
                return;
 
-       if (!self.weaponentity || self.health < 1)
-               return; // Dead player can't use weapons and injure impulse commands
-
        if(!self.switchweapon)
        {
                self.weapon = 0;