r4335 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Sep 4 08:16:24 EDT 2008


Author: div0
Date: 2008-09-04 08:16:23 -0400 (Thu, 04 Sep 2008)
New Revision: 4335

Modified:
   trunk/data/qcsrc/server/defs.qh
   trunk/data/qcsrc/server/miscfunctions.qc
   trunk/data/qcsrc/server/t_items.qc
   trunk/data/weapons.cfg
   trunk/data/weaponsPro.cfg
Log:
make item respawn times customizable as groups; fix weapons cfg


Modified: trunk/data/qcsrc/server/defs.qh
===================================================================
--- trunk/data/qcsrc/server/defs.qh	2008-09-04 12:03:44 UTC (rev 4334)
+++ trunk/data/qcsrc/server/defs.qh	2008-09-04 12:16:23 UTC (rev 4335)
@@ -22,6 +22,10 @@
 float g_ctf_win_mode;
 float g_race_qualifying;
 float tourneyInMatchStage;
+float g_pickup_respawntime_short;
+float g_pickup_respawntime_medium;
+float g_pickup_respawntime_long;
+float g_pickup_respawntime_powerup;
 
 float sv_cheats;
 float sv_gentle;

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2008-09-04 12:03:44 UTC (rev 4334)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2008-09-04 12:16:23 UTC (rev 4335)
@@ -737,6 +737,11 @@
 	sv_pogostick = cvar("sv_pogostick");
 	sv_doublejump = cvar("sv_doublejump");
 
+	g_pickup_respawntime_short = cvar("g_pickup_respawntime_short");
+	g_pickup_respawntime_medium = cvar("g_pickup_respawntime_medium");
+	g_pickup_respawntime_long = cvar("g_pickup_respawntime_long");
+	g_pickup_respawntime_powerup = cvar("g_pickup_respawntime_powerup");
+
 	if(g_minstagib) g_nixnex = g_rocketarena = 0;
 	if(g_nixnex) g_rocketarena = 0;
 

Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc	2008-09-04 12:03:44 UTC (rev 4334)
+++ trunk/data/qcsrc/server/t_items.qc	2008-09-04 12:16:23 UTC (rev 4335)
@@ -556,7 +556,7 @@
 		self.effects = EF_ADDITIVE;
 		self.strength_finished = 30;
 		StartItem ("models/items/g_strength.md3",
-			"misc/powerup.wav", 120,
+			"misc/powerup.wav", g_pickup_respawntime_powerup,
 			"Invisibility", IT_STRENGTH, 0, FL_POWERUP, generic_pickupevalfunc, 1000);
 	}
 	// replace with extra lives
@@ -564,7 +564,7 @@
 	{
 		self.max_health = 1;
 		StartItem ("models/items/g_h100.md3",
-			"misc/megahealth.wav", 120,
+			"misc/megahealth.wav", g_pickup_respawntime_powerup,
 			"Extralife", IT_NAILS, 0, FL_POWERUP, generic_pickupevalfunc, 1000);
 
 	}
@@ -574,7 +574,7 @@
 		self.effects = EF_ADDITIVE;
 		self.invincible_finished = 30;
 		StartItem ("models/items/g_invincible.md3",
-			"misc/powerup_shield.wav", 120,
+			"misc/powerup_shield.wav", g_pickup_respawntime_powerup,
 			"Speed", IT_INVINCIBLE, 0, FL_POWERUP, generic_pickupevalfunc, 1000);
 	}
 
@@ -591,9 +591,12 @@
 void weapon_defaultspawnfunc(float wpn, float weight)
 {
 	entity e;
+	float t;
 	var .float ammofield;
 	e = get_weaponinfo(wpn);
 
+	t = g_pickup_respawntime_short;
+
 	if(e.items && e.items != IT_SUPERWEAPON)
 	{
 		ammofield = Item_CounterField(e.items);
@@ -601,7 +604,10 @@
 			self.ammofield = cvar(strcat("g_pickup_", Item_CounterFieldName(e.items)));
 	}
 
-	StartItem (e.model, "weapons/weaponpickup.wav", 15, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, weight);
+	if(e.items == IT_SUPERWEAPON)
+		t = g_pickup_respawntime_powerup;
+
+	StartItem (e.model, "weapons/weaponpickup.wav", t, e.message, 0, e.weapons, FL_WEAPON, weapon_pickupevalfunc, weight);
 	if (self.modelindex) // don't precache if self was removed
 		weapon_action(e.weapon, WR_PRECACHE);
 }
@@ -668,7 +674,7 @@
 void spawnfunc_item_rockets (void) {
 	if(!self.ammo_rockets)
 		self.ammo_rockets = g_pickup_rockets;
-	StartItem ("models/items/a_rockets.md3", "misc/itempickup.wav", 15, "rockets", IT_ROCKETS, 0, 0, commodity_pickupevalfunc, 3000);
+	StartItem ("models/items/a_rockets.md3", "misc/itempickup.wav", g_pickup_respawntime_short, "rockets", IT_ROCKETS, 0, 0, commodity_pickupevalfunc, 3000);
 }
 
 void spawnfunc_item_shells (void);
@@ -685,13 +691,13 @@
 
 	if(!self.ammo_nails)
 		self.ammo_nails = g_pickup_nails;
-	StartItem ("models/items/a_bullets.mdl", "misc/itempickup.wav", 15, "bullets", IT_NAILS, 0, 0, commodity_pickupevalfunc, 2000);
+	StartItem ("models/items/a_bullets.mdl", "misc/itempickup.wav", g_pickup_respawntime_short, "bullets", IT_NAILS, 0, 0, commodity_pickupevalfunc, 2000);
 }
 
 void spawnfunc_item_cells (void) {
 	if(!self.ammo_cells)
 		self.ammo_cells = g_pickup_cells;
-	StartItem ("models/items/a_cells.md3", "misc/itempickup.wav", 15, "cells", IT_CELLS, 0, 0, commodity_pickupevalfunc, 2000);
+	StartItem ("models/items/a_cells.md3", "misc/itempickup.wav", g_pickup_respawntime_short, "cells", IT_CELLS, 0, 0, commodity_pickupevalfunc, 2000);
 }
 
 void spawnfunc_item_shells (void) {
@@ -707,7 +713,7 @@
 
 	if(!self.ammo_shells)
 		self.ammo_shells = g_pickup_shells;
-	StartItem ("models/items/a_shells.md3", "misc/itempickup.wav", 15, "shells", IT_SHELLS, 0, 0, commodity_pickupevalfunc, 500);
+	StartItem ("models/items/a_shells.md3", "misc/itempickup.wav", g_pickup_respawntime_short, "shells", IT_SHELLS, 0, 0, commodity_pickupevalfunc, 500);
 }
 
 void spawnfunc_item_armor_small (void) {
@@ -715,7 +721,7 @@
 		self.armorvalue = g_pickup_armorsmall;
 	if(!self.max_armorvalue)
 		self.max_armorvalue = g_pickup_armorsmall_max;
-	StartItem ("models/items/g_a1.md3", "misc/armor1.wav", 15, "5 Armor", IT_ARMOR_SHARD, 0, 0, commodity_pickupevalfunc, 1000);
+	StartItem ("models/items/g_a1.md3", "misc/armor1.wav", g_pickup_respawntime_short, "5 Armor", IT_ARMOR_SHARD, 0, 0, commodity_pickupevalfunc, 1000);
 }
 
 void spawnfunc_item_armor_medium (void) {
@@ -723,7 +729,7 @@
 		self.armorvalue = g_pickup_armormedium;
 	if(!self.max_armorvalue)
 		self.max_armorvalue = g_pickup_armormedium_max;
-	StartItem ("models/items/g_armormedium.md3", "misc/armor1.wav", 20, "25 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, 20000);
+	StartItem ("models/items/g_armormedium.md3", "misc/armor1.wav", g_pickup_respawntime_medium, "25 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, 20000);
 }
 
 void spawnfunc_item_armor_large (void) {
@@ -731,7 +737,7 @@
 		self.armorvalue = g_pickup_armorlarge;
 	if(!self.max_armorvalue)
 		self.max_armorvalue = g_pickup_armorlarge_max;
-	StartItem ("models/items/g_a25.md3", "misc/armor25.wav", 30, "100 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, 20000);
+	StartItem ("models/items/g_a25.md3", "misc/armor25.wav", g_pickup_respawntime_long, "100 Armor", IT_ARMOR, 0, 0, commodity_pickupevalfunc, 20000);
 }
 
 void spawnfunc_item_health_small (void) {
@@ -739,7 +745,7 @@
 		self.max_health = g_pickup_healthsmall_max;
 	if(!self.health)
 		self.health = g_pickup_healthsmall;
-	StartItem ("models/items/g_h1.md3", "misc/minihealth.wav", 15, "5 Health", IT_5HP, 0, 0, commodity_pickupevalfunc, 20000);
+	StartItem ("models/items/g_h1.md3", "misc/minihealth.wav", g_pickup_respawntime_short, "5 Health", IT_5HP, 0, 0, commodity_pickupevalfunc, 20000);
 }
 
 void spawnfunc_item_health_medium (void) {
@@ -747,7 +753,7 @@
 		self.max_health = g_pickup_healthmedium_max;
 	if(!self.health)
 		self.health = g_pickup_healthmedium;
-	StartItem ("models/items/g_h25.md3", "misc/mediumhealth.wav", 15, "25 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, 20000);
+	StartItem ("models/items/g_h25.md3", "misc/mediumhealth.wav", g_pickup_respawntime_short, "25 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, 20000);
 }
 
 void spawnfunc_item_health_large (void) {
@@ -755,7 +761,7 @@
 		self.max_health = g_pickup_healthlarge_max;
 	if(!self.health)
 		self.health = g_pickup_healthlarge;
-	StartItem ("models/items/g_h50.md3", "misc/mediumhealth.wav", 20, "50 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, 20000);
+	StartItem ("models/items/g_h50.md3", "misc/mediumhealth.wav", g_pickup_respawntime_medium, "50 Health", IT_25HP, 0, 0, commodity_pickupevalfunc, 20000);
 }
 
 void spawnfunc_item_health_mega (void) {
@@ -772,7 +778,7 @@
 			self.max_health = g_pickup_healthmega_max;
 		if(!self.health)
 			self.health = g_pickup_healthmega;
-		StartItem ("models/items/g_h100.md3", "misc/megahealth.wav", 30, "100 Health", IT_HEALTH, 0, 0, commodity_pickupevalfunc, 20000);
+		StartItem ("models/items/g_h100.md3", "misc/megahealth.wav", g_pickup_respawntime_long, "100 Health", IT_HEALTH, 0, 0, commodity_pickupevalfunc, 20000);
 	}
 }
 
@@ -796,7 +802,7 @@
 		precache_sound("weapons/strength_fire.wav");
 		self.strength_finished = 30;
 		self.effects = EF_ADDITIVE;
-		StartItem ("models/items/g_strength.md3", "misc/powerup.wav", 120, "Strength Powerup", IT_STRENGTH, 0, FL_POWERUP, generic_pickupevalfunc, 100000);
+		StartItem ("models/items/g_strength.md3", "misc/powerup.wav", g_pickup_respawntime_powerup, "Strength Powerup", IT_STRENGTH, 0, FL_POWERUP, generic_pickupevalfunc, 100000);
 	}
 }
 
@@ -812,11 +818,9 @@
 	} else {
 		self.invincible_finished = 30;
 		self.effects = EF_ADDITIVE;
-		StartItem ("models/items/g_invincible.md3", "misc/powerup_shield.wav", 120, "Invulnerability", IT_INVINCIBLE, 0, FL_POWERUP, generic_pickupevalfunc, 100000);
+		StartItem ("models/items/g_invincible.md3", "misc/powerup_shield.wav", g_pickup_respawntime_powerup, "Invulnerability", IT_INVINCIBLE, 0, FL_POWERUP, generic_pickupevalfunc, 100000);
 	}
 }
-//void item_speed (void) {self.speed_finished = 30;StartItem ("models/items/g_speed.md3", "misc/powerup.wav", 120, "Speed Powerup", IT_SPEED, FL_POWERUP, generic_pickupevalfunc, 10000);}
-//void item_slowmo (void) {self.slowmo_finished = 30;StartItem ("models/items/g_slowmo.md3", "misc/powerup.wav", 120, "Slow Motion", IT_SLOWMO, FL_POWERUP, generic_pickupevalfunc, 10000);}
 
 void spawnfunc_item_minst_cells (void) {
 	if (g_minstagib)

Modified: trunk/data/weapons.cfg
===================================================================
--- trunk/data/weapons.cfg	2008-09-04 12:03:44 UTC (rev 4334)
+++ trunk/data/weapons.cfg	2008-09-04 12:16:23 UTC (rev 4335)
@@ -35,6 +35,10 @@
 set g_pickup_healthlarge_max 999
 set g_pickup_healthmega 100
 set g_pickup_healthmega_max 999
+set g_pickup_respawntime_short 15
+set g_pickup_respawntime_medium 20
+set g_pickup_respawntime_long 30
+set g_pickup_respawntime_powerup 120
 
 set g_balance_laser_primary_damage 35
 set g_balance_laser_primary_edgedamage 10
@@ -170,7 +174,7 @@
 set g_balance_nex_animtime 0.3
 set g_balance_nex_ammo 5
 
-set g_balance_minstanex_refire 1.5
+set g_balance_minstanex_refire 1
 set g_balance_minstanex_animtime 0.3
 set g_balance_minstanex_ammo 10
 

Modified: trunk/data/weaponsPro.cfg
===================================================================
--- trunk/data/weaponsPro.cfg	2008-09-04 12:03:44 UTC (rev 4334)
+++ trunk/data/weaponsPro.cfg	2008-09-04 12:16:23 UTC (rev 4335)
@@ -7,6 +7,8 @@
 set g_start_weapon_nex 0
 set g_start_weapon_hagar 0
 set g_start_weapon_rocketlauncher 0
+set g_start_weapon_minstanex 0
+set g_start_weapon_porto 0
 set g_start_ammo_shells 40
 set g_start_ammo_nails 0
 set g_start_ammo_rockets 0
@@ -33,6 +35,10 @@
 set g_pickup_healthlarge_max 100
 set g_pickup_healthmega 100
 set g_pickup_healthmega_max 200
+set g_pickup_respawntime_short 15
+set g_pickup_respawntime_medium 20
+set g_pickup_respawntime_long 30
+set g_pickup_respawntime_powerup 120
 
 set g_balance_laser_primary_damage 20
 set g_balance_laser_primary_edgedamage 10
@@ -131,12 +137,19 @@
 set g_balance_crylink_primary_speed 7000
 set g_balance_crylink_primary_spread 0
 set g_balance_crylink_primary_shots 1
-set g_balance_crylink_primary_lifetime 30
 set g_balance_crylink_primary_bounces 0
 set g_balance_crylink_primary_refire 0.1
 set g_balance_crylink_primary_animtime 0.1
 set g_balance_crylink_primary_ammo 1
 set g_balance_crylink_primary_bouncedamagefactor 0.5
+
+set g_balance_crylink_primary_middle_lifetime 30 // range: virtually infinite
+set g_balance_crylink_primary_middle_fadetime 0
+set g_balance_crylink_primary_star_lifetime 0.1 // range: 700 full, fades to 2100
+set g_balance_crylink_primary_star_fadetime 0.2
+set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2100
+set g_balance_crylink_primary_other_fadetime 0.2
+
 set g_balance_crylink_secondary_damage 15
 set g_balance_crylink_secondary_edgedamage 0
 set g_balance_crylink_secondary_force 100
@@ -144,20 +157,24 @@
 set g_balance_crylink_secondary_speed 7000
 set g_balance_crylink_secondary_spread 0.08
 set g_balance_crylink_secondary_shots 5
-set g_balance_crylink_secondary_lifetime 30
 set g_balance_crylink_secondary_bounces 0
 set g_balance_crylink_secondary_refire 0.6
 set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 5
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 
+set g_balance_crylink_secondary_middle_lifetime 30 // range: virtually infinite
+set g_balance_crylink_secondary_middle_fadetime 0
+set g_balance_crylink_secondary_line_lifetime 30 // range: virtually infinite
+set g_balance_crylink_secondary_line_fadetime 0
+
 set g_balance_nex_damage 70
 set g_balance_nex_force 0
 set g_balance_nex_refire 0.7
 set g_balance_nex_animtime 0.3
 set g_balance_nex_ammo 5
 
-set g_balance_minstanex_refire 1.5
+set g_balance_minstanex_refire 1
 set g_balance_minstanex_animtime 0.3
 set g_balance_minstanex_ammo 10
 
@@ -197,3 +214,9 @@
 set g_balance_rocketlauncher_laserguided_speedstart 1000
 set g_balance_rocketlauncher_laserguided_turnrate	0.75  //0.5
 set g_balance_rocketlauncher_laserguided_allow_steal	1
+
+// TESTING: port-o-launch
+set g_balance_porto_primary_refire 1.5
+set g_balance_porto_primary_speed 400
+set g_balance_porto_primary_lifetime 10
+set g_balance_porto_primary_ammo 25




More information about the nexuiz-commits mailing list