]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_impulse.qc
Merge remote-tracking branch 'origin/divVerent/merged-translations'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_impulse.qc
index 41fb6cdb963422325261ea81887ff8417cd1ca31..a94ba29015d166cde2577dca407639e3d7163376 100644 (file)
@@ -46,9 +46,19 @@ void ImpulseCommands (void)
                return;
        self.impulse = 0;
 
-       if (timeout_status == TIMEOUT_ACTIVE) //don't allow any impulses while the game is paused
+       // forbid impulses when not in round time
+       if(round_handler_IsActive() && !round_handler_IsRoundStarted())
                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))
+                    return;
+    
        if(CheatImpulse(imp))
        {
        }
@@ -88,8 +98,7 @@ void ImpulseCommands (void)
                                        W_PreviousWeapon (2);
                                        break;
                                case 17:
-                                       if (!g_minstagib)
-                                               W_ThrowWeapon(W_CalculateProjectileVelocity(self.velocity, v_forward * 750, FALSE), '0 0 0', TRUE);
+                                       W_ThrowWeapon(W_CalculateProjectileVelocity(self.velocity, v_forward * 750, FALSE), '0 0 0', TRUE);
                                        break;
                                case 18:
                                        W_NextWeapon (1);
@@ -263,7 +272,7 @@ void ImpulseCommands (void)
                                        for(e = findchain(classname, "waypoint"); e; e = e.chain)
                                        {
                                                e.colormod = '0.5 0.5 0.5';
-                                               e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
+                                               e.effects &= ~(EF_NODEPTHTEST | EF_RED | EF_BLUE);
                                        }
                                        e2 = navigation_findnearestwaypoint(self, FALSE);
                                        navigation_markroutes(e2);
@@ -309,7 +318,7 @@ void ImpulseCommands (void)
                                                if(navigation_findnearestwaypoint(e, FALSE))
                                                {
                                                        setorigin(e, org);
-                                                       e.effects &~= EF_NODEPTHTEST;
+                                                       e.effects &= ~EF_NODEPTHTEST;
                                                        e.model = "";
                                                }
                                                else
@@ -332,7 +341,7 @@ void ImpulseCommands (void)
                                        start = findchainflags(flags, FL_ITEM);
                                        for(e = start; e; e = e.chain)
                                        {
-                                               e.effects &~= EF_NODEPTHTEST | EF_RED | EF_BLUE;
+                                               e.effects &= ~(EF_NODEPTHTEST | EF_RED | EF_BLUE);
                                                e.colormod = '0.5 0.5 0.5';
                                        }
                                        for(e = start; e; e = e.chain)