r4289 - in trunk/data/qcsrc: common server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Sep 2 09:55:38 EDT 2008


Author: div0
Date: 2008-09-02 09:55:38 -0400 (Tue, 02 Sep 2008)
New Revision: 4289

Modified:
   trunk/data/qcsrc/common/constants.qh
   trunk/data/qcsrc/server/cl_weapons.qc
   trunk/data/qcsrc/server/g_damage.qc
   trunk/data/qcsrc/server/havocbot.qc
   trunk/data/qcsrc/server/miscfunctions.qc
   trunk/data/qcsrc/server/t_items.qc
Log:
add a comment "// %weaponaddpoint" at all places that need changes to add an additional weapon


Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh	2008-09-02 13:34:10 UTC (rev 4288)
+++ trunk/data/qcsrc/common/constants.qh	2008-09-02 13:55:38 UTC (rev 4289)
@@ -274,6 +274,7 @@
 // game mode specific indices are not in common/, but in server/scores_rules.qc!
 
 // Weapon indexes
+// %weaponaddpoint
 float WEP_FIRST				= 1;
 float WEP_LASER				= 1; float WEPBIT_LASER				= 1; // always: 2^(w-1)
 float WEP_SHOTGUN			= 2; float WEPBIT_SHOTGUN			= 2;

Modified: trunk/data/qcsrc/server/cl_weapons.qc
===================================================================
--- trunk/data/qcsrc/server/cl_weapons.qc	2008-09-02 13:34:10 UTC (rev 4288)
+++ trunk/data/qcsrc/server/cl_weapons.qc	2008-09-02 13:55:38 UTC (rev 4289)
@@ -130,6 +130,7 @@
 // add new weapons here
 float weapon_action(float wpn, float wrequest)
 {
+	// %weaponaddpoint
 	if (wpn == WEP_LASER)
 		return w_laser(wrequest);
 	else if (wpn == WEP_SHOTGUN)
@@ -153,6 +154,7 @@
 
 string W_Name(float weaponid)
 {
+	// %weaponaddpoint
 	if(weaponid == WEP_LASER)             return "Laser";
 	if(weaponid == WEP_UZI)               return "Machine Gun";
 	if(weaponid == WEP_SHOTGUN)           return "Shotgun";
@@ -167,6 +169,7 @@
 
 float W_WeaponBit(float wpn)
 {
+	// %weaponaddpoint
 	switch(wpn)
 	{
 		case WEP_LASER:            return WEPBIT_LASER;
@@ -184,6 +187,7 @@
 
 float W_AmmoItemCode(float wpn)
 {
+	// %weaponaddpoint
 	switch(wpn)
 	{
 		case WEP_SHOTGUN:          return IT_SHELLS;

Modified: trunk/data/qcsrc/server/g_damage.qc
===================================================================
--- trunk/data/qcsrc/server/g_damage.qc	2008-09-02 13:34:10 UTC (rev 4288)
+++ trunk/data/qcsrc/server/g_damage.qc	2008-09-02 13:55:38 UTC (rev 4289)
@@ -202,7 +202,7 @@
 				if (targ.killcount > 2)
 					bprint ("^1",s,"^1 ended it all with a ",ftos(targ.killcount)," scoring spree\n");
 			} else {
-
+				// %weaponaddpoint
 				if (deathtype == WEP_GRENADE_LAUNCHER)
 					bprint ("^1",s, "^1 detonated\n");
 				else if (deathtype == WEP_ELECTRO)
@@ -283,6 +283,7 @@
 				if(sv_gentle) {
 					bprint ("^1",s, "^1 needs a restart thanks to ", a, "\n");
 				} else {
+					// %weaponaddpoint
 					if (deathtype == WEP_LASER)
 						bprint ("^1",s, "^1 was blasted by ", a, "\n");
 					else if (deathtype == WEP_UZI)

Modified: trunk/data/qcsrc/server/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot.qc	2008-09-02 13:34:10 UTC (rev 4288)
+++ trunk/data/qcsrc/server/havocbot.qc	2008-09-02 13:55:38 UTC (rev 4289)
@@ -354,6 +354,7 @@
 	//	*(Time to get to target * weapon specfic hitchange bonus) / (in a time of maxdelaytime)
 	//	*(Spread change of hit) // if it applies
 	//	*(Penality for target beeing in air)
+	// %weaponaddpoint
 	if (client_hasweapon(self, WEP_ROCKET_LAUNCHER, TRUE, FALSE))
 		rocket = (cvar("g_balance_rocketlauncher_damage")/cvar("g_balance_rocketlauncher_refire")*0.75)
 			* bound(0,(cvar("g_balance_rocketlauncher_speed")/distance*maxdelaytime),1)*1.5;

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2008-09-02 13:34:10 UTC (rev 4288)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2008-09-02 13:55:38 UTC (rev 4289)
@@ -827,6 +827,7 @@
 			start_ammo_cells = cvar("g_pickup_cells_max");
 		}
 
+		// %weaponaddpoint
 		if (cvar("g_start_weapon_laser") || g_lms)
 		{
 			start_weapons = start_weapons | WEPBIT_LASER;

Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc	2008-09-02 13:34:10 UTC (rev 4288)
+++ trunk/data/qcsrc/server/t_items.qc	2008-09-02 13:55:38 UTC (rev 4289)
@@ -135,6 +135,7 @@
 		if ((it = self.weapons - (self.weapons & other.weapons)))
 		{
 			pickedup = TRUE;
+			// %weaponaddpoint
 			if (it & WEPBIT_UZI)                W_GiveWeapon (other, WEP_UZI, self.netname);
 			if (it & WEPBIT_SHOTGUN)            W_GiveWeapon (other, WEP_SHOTGUN, self.netname);
 			if (it & WEPBIT_GRENADE_LAUNCHER)   W_GiveWeapon (other, WEP_GRENADE_LAUNCHER, self.netname);
@@ -143,7 +144,6 @@
 			if (it & WEPBIT_HAGAR)              W_GiveWeapon (other, WEP_HAGAR, self.netname);
 			if (it & WEPBIT_ROCKET_LAUNCHER)    W_GiveWeapon (other, WEP_ROCKET_LAUNCHER, self.netname);
 			if (it & WEPBIT_CRYLINK)            W_GiveWeapon (other, WEP_CRYLINK, self.netname);
-			// %weaponaddpoint
 		}
 
 		if (self.strength_finished)
@@ -831,6 +831,7 @@
 
 void Item_SpawnByWeaponCode(float it)
 {
+	// %weaponaddpoint
 	switch(it)
 	{
 		case WEP_SHOTGUN:          spawnfunc_weapon_shotgun(); break;




More information about the nexuiz-commits mailing list