]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_impulse.qc
Merge branch 'master' into Mario/minigames_merge
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_impulse.qc
index 77b70053d8507736e576b22fdd057761947beb65..64fb50df83a9db913302bc7ee4fd2d869d0c9b4c 100644 (file)
@@ -10,7 +10,6 @@
 #include "weapons/selection.qh"
 #include "weapons/tracing.qh"
 #include "weapons/weaponsystem.qh"
-#include "vehicles/vehicle.qh"
 #include "waypointsprites.qh"
 
 #include "../common/minigames/sv_minigames.qh"
@@ -77,11 +76,15 @@ void ImpulseCommands (void)
        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_impulse)
-                if(self.vehicle.vehicles_impulse(imp))
-                    return;
+       if(self.vehicle)
+       if(self.vehicle.deadflag == DEAD_NO)
+       {
+               if(self.vehicle.vehicles_impulse)
+               if(self.vehicle.vehicles_impulse(imp))
+                       return;
+               if(vehicle_impulse(imp))
+                       return;
+       }
 
        if(CheatImpulse(imp))
        {
@@ -96,6 +99,7 @@ void ImpulseCommands (void)
        }
        else if(imp >= 10 && imp <= 20)
        {
+               if(!self.vehicle)
                if(self.deadflag == DEAD_NO)
                {
                        switch(imp)
@@ -131,7 +135,7 @@ void ImpulseCommands (void)
                                        W_PreviousWeapon(1);
                                        break;
                                case 20:
-                                       if(!forbidWeaponUse()) { WEP_ACTION(self.weapon, WR_RELOAD); }
+                                       if(!forbidWeaponUse(self)) { WEP_ACTION(self.weapon, WR_RELOAD); }
                                        break;
                        }
                }
@@ -144,6 +148,7 @@ void ImpulseCommands (void)
        }
        else if(imp >= 200 && imp <= 229)
        {
+               if(!self.vehicle)
                if(self.deadflag == DEAD_NO)
                {
                        // custom order weapon cycling
@@ -156,6 +161,7 @@ void ImpulseCommands (void)
        }
        else if(imp >= 230 && imp <= 253)
        {
+               if(!self.vehicle)
                if(self.deadflag == DEAD_NO)
                        W_SwitchWeapon (imp - 230 + WEP_FIRST);
                else
@@ -192,7 +198,7 @@ void ImpulseCommands (void)
                        case 33:
                                if(self.deadflag == DEAD_NO && teamplay)
                                {
-                                       if (!MUTATOR_CALLHOOK(HelpMePing))
+                                       if (!MUTATOR_CALLHOOK(HelpMePing, self))
                                        {
                                                wp = WaypointSprite_Attach("helpme", true, RADARICON_HELPME, '1 0.5 0');
                                                if(!wp)