From 67b6ecf838c0bfaa26558d79c8ada66ef4a2350f Mon Sep 17 00:00:00 2001 From: div0 Date: Wed, 3 Sep 2008 14:59:16 +0000 Subject: [PATCH] put the Port-O-Launch on impulse 14 (key 0) git-svn-id: svn://svn.icculus.org/nexuiz/trunk@4316 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/defaultNexuiz.cfg | 2 +- data/keybinds.txt | 1 + data/qcsrc/server/cl_impulse.qc | 3 +++ data/qcsrc/server/cl_weapons.qc | 10 +++++----- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/data/defaultNexuiz.cfg b/data/defaultNexuiz.cfg index 6839cde37..861b0353b 100644 --- a/data/defaultNexuiz.cfg +++ b/data/defaultNexuiz.cfg @@ -612,7 +612,7 @@ bind 6 "impulse 6" bind 7 "impulse 7" bind 8 "impulse 8" bind 9 "impulse 9" -bind 0 "impulse 210" +bind 0 "impulse 14" // cycles the superweapons bind MOUSE1 +attack bind MOUSE2 +attack2 bind MOUSE3 +zoom diff --git a/data/keybinds.txt b/data/keybinds.txt index 9778c9fc8..ff0144f9e 100644 --- a/data/keybinds.txt +++ b/data/keybinds.txt @@ -24,6 +24,7 @@ "impulse 7" "nex" "impulse 8" "hagar" "impulse 9" "rocket launcher" +"impulse 14" "special weapons" "" "" "" "View" "+zoom" "zoom" diff --git a/data/qcsrc/server/cl_impulse.qc b/data/qcsrc/server/cl_impulse.qc index 0a9fc53a0..bad9880dc 100644 --- a/data/qcsrc/server/cl_impulse.qc +++ b/data/qcsrc/server/cl_impulse.qc @@ -134,6 +134,9 @@ void ImpulseCommands (void) case 13: W_SwitchWeapon (w_getbestweapon(self)); break; + case 14: + W_NextWeaponOnImpulse(0); + break; case 17: if (!g_minstagib) W_ThrowWeapon(W_CalculateProjectileVelocity(self.velocity, v_forward * 750), '0 0 0', TRUE); diff --git a/data/qcsrc/server/cl_weapons.qc b/data/qcsrc/server/cl_weapons.qc index 6b68439e2..25f3162a4 100644 --- a/data/qcsrc/server/cl_weapons.qc +++ b/data/qcsrc/server/cl_weapons.qc @@ -20,7 +20,7 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa { weaponwant = stof(argv(i)); - if(imp) + if(imp >= 0) if((get_weaponinfo(weaponwant)).impulse != imp) continue; @@ -55,7 +55,7 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa for(i = 0; i < n; ++i) { weaponwant = stof(argv(i)); - if(imp) + if(imp >= 0) if((get_weaponinfo(weaponwant)).impulse != imp) continue; client_hasweapon(pl, weaponwant, TRUE, TRUE); @@ -67,7 +67,7 @@ float W_GetCycleWeapon(entity pl, string weaponorder, float dir, float imp, floa void W_CycleWeapon(string weaponorder, float dir) { float w; - w = W_GetCycleWeapon(self, weaponorder, dir, 0, 1); + w = W_GetCycleWeapon(self, weaponorder, dir, -1, 1); if(w > 0) W_SwitchWeapon(w); } @@ -135,7 +135,7 @@ string W_FixWeaponOrder_ForceComplete(string order) float w_getbestweapon(entity e) { - return W_GetCycleWeapon(e, e.cvar_cl_weaponpriority, 0, 0, 0); + return W_GetCycleWeapon(e, e.cvar_cl_weaponpriority, 0, -1, 0); }; // generic weapons table @@ -460,6 +460,6 @@ void RegisterWeapons() register_weapon(WEP_NEX, w_nex, IT_CELLS, 7, 1, "nex", "nex", "Nex"); register_weapon(WEP_HAGAR, w_hagar, IT_ROCKETS, 8, 1, "hagar", "hagar", "Hagar"); register_weapon(WEP_ROCKET_LAUNCHER, w_rlauncher, IT_ROCKETS, 9, 1, "rl", "rocketlauncher", "Rocket Launcher"); - register_weapon(WEP_PORTO, w_porto, IT_SUPERWEAPON, 1, 0, "porto" , "porto", "Port-O-Launch"); + register_weapon(WEP_PORTO, w_porto, IT_SUPERWEAPON, 0, 0, "porto" , "porto", "Port-O-Launch"); register_weapon(WEP_MINSTANEX, w_minstanex, IT_CELLS, 7, 0, "nex", "minstanex", "MinstaNex"); } -- 2.39.2