X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_impulse.qc;h=03fdf7ede799071fd4f60438f2794f1a07788b8c;hb=1bc3ab0285f65c7ed0c75cbba00da2460921c973;hp=a02cf40acab473d57b6854da0d29f7e72f0bf1dd;hpb=5b4d55a39e59f76751555cc0420e5734fbc4a792;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index a02cf40ac..03fdf7ede 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -10,10 +10,10 @@ #include "weapons/selection.qh" #include "weapons/tracing.qh" #include "weapons/weaponsystem.qh" -#include "vehicles/vehicle.qh" +#include "../common/vehicles/sv_vehicles.qh" #include "waypointsprites.qh" -#include "../common/weapons/weapons.qh" +#include "../common/weapons/all.qh" /* * Impulse map: @@ -71,11 +71,11 @@ 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(CheatImpulse(imp)) { @@ -90,6 +90,7 @@ void ImpulseCommands (void) } else if(imp >= 10 && imp <= 20) { + if(!self.vehicle) if(self.deadflag == DEAD_NO) { switch(imp) @@ -125,7 +126,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; } } @@ -138,6 +139,7 @@ void ImpulseCommands (void) } else if(imp >= 200 && imp <= 229) { + if(!self.vehicle) if(self.deadflag == DEAD_NO) { // custom order weapon cycling @@ -150,6 +152,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