X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcl_impulse.qc;h=45708409c5fe9731e95088dee3fcb9779b15daa1;hp=2cc8e0215bb8c1b1f0be9620c2b484326f4acde0;hb=ae2c1407ec9a05e4f501a6604a7cce8e1030df9f;hpb=e3507f4fdbc2b3e15b663365e57e0aa60f3cf1a6 diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index 2cc8e0215b..45708409c5 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -1,10 +1,18 @@ +#include "_all.qh" #include "round_handler.qh" #include "bot/waypoints.qh" #include "weapons/throwing.qh" +#include "command/common.qh" +#include "cheats.qh" +#include "bot/navigation.qh" +#include "weapons/selection.qh" +#include "weapons/tracing.qh" +#include "weapons/weaponsystem.qh" +#include "waypointsprites.qh" -#include "../common/weapons/weapons.qh" +#include "../common/weapons/all.qh" /* * Impulse map: @@ -62,11 +70,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)) { @@ -81,6 +93,7 @@ void ImpulseCommands (void) } else if(imp >= 10 && imp <= 20) { + if(!self.vehicle) if(self.deadflag == DEAD_NO) { switch(imp) @@ -116,7 +129,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; } } @@ -129,10 +142,11 @@ void ImpulseCommands (void) } else if(imp >= 200 && imp <= 229) { + if(!self.vehicle) if(self.deadflag == DEAD_NO) { // custom order weapon cycling - i = imp % 10; + int i = imp % 10; m = (imp - (210 + i)); // <0 for prev, =0 for best, >0 for next W_CycleWeapon(self.(cvar_cl_weaponpriorities[i]), m); } @@ -141,6 +155,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 @@ -177,7 +192,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)