r4316 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Sep 3 10:59:18 EDT 2008


Author: div0
Date: 2008-09-03 10:59:16 -0400 (Wed, 03 Sep 2008)
New Revision: 4316

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/keybinds.txt
   trunk/data/qcsrc/server/cl_impulse.qc
   trunk/data/qcsrc/server/cl_weapons.qc
Log:
put the Port-O-Launch on impulse 14 (key 0)


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2008-09-03 14:54:52 UTC (rev 4315)
+++ trunk/data/defaultNexuiz.cfg	2008-09-03 14:59:16 UTC (rev 4316)
@@ -612,7 +612,7 @@
 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

Modified: trunk/data/keybinds.txt
===================================================================
--- trunk/data/keybinds.txt	2008-09-03 14:54:52 UTC (rev 4315)
+++ trunk/data/keybinds.txt	2008-09-03 14:59:16 UTC (rev 4316)
@@ -24,6 +24,7 @@
 "impulse 7"                             "nex"
 "impulse 8"                             "hagar"
 "impulse 9"                             "rocket launcher"
+"impulse 14"                            "special weapons"
 ""                                      ""
 ""                                      "View"
 "+zoom"                                 "zoom"

Modified: trunk/data/qcsrc/server/cl_impulse.qc
===================================================================
--- trunk/data/qcsrc/server/cl_impulse.qc	2008-09-03 14:54:52 UTC (rev 4315)
+++ trunk/data/qcsrc/server/cl_impulse.qc	2008-09-03 14:59:16 UTC (rev 4316)
@@ -134,6 +134,9 @@
 				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);

Modified: trunk/data/qcsrc/server/cl_weapons.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weapons.qc	2008-09-03 14:54:52 UTC (rev 4315)
+++ trunk/data/qcsrc/server/cl_weapons.qc	2008-09-03 14:59:16 UTC (rev 4316)
@@ -20,7 +20,7 @@
 	{
 		weaponwant = stof(argv(i));
 
-		if(imp)
+		if(imp >= 0)
 			if((get_weaponinfo(weaponwant)).impulse != imp)
 				continue;
 
@@ -55,7 +55,7 @@
 		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 @@
 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 @@
 
 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 @@
 	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");
 }




More information about the nexuiz-commits mailing list