]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_impulse.qc
Merge remote-tracking branch 'origin/Mario/hook_refire'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_impulse.qc
index dc8dabee6c719861d0c34b98fe880fa762a9c03a..c9896bc74591a8b3263c7e4884cca106c6ca3a49 100644 (file)
@@ -46,19 +46,20 @@ void ImpulseCommands (void)
                return;
        self.impulse = 0;
 
-       // forbid impulses when not in round time
+       // allow only weapon change impulses when not in round time
        if(round_handler_IsActive() && !round_handler_IsRoundStarted())
+       if(imp == 17 || (imp >= 20 && imp < 200) || imp > 253)
                return;
 
        if (timeout_status == TIMEOUT_ACTIVE) //don't allow any impulses while the game is paused
                return;
-    
+
     if(self.vehicle)
         if(self.vehicle.deadflag == DEAD_NO)
-            if(self.vehicle.vehicles_impusle)
-                if(self.vehicle.vehicles_impusle(imp))
+            if(self.vehicle.vehicles_impulse)
+                if(self.vehicle.vehicles_impulse(imp))
                     return;
-    
+
        if(CheatImpulse(imp))
        {
        }