[nexuiz-commits] r7150 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jul 7 01:15:32 EDT 2009


Author: div0
Date: 2009-07-07 01:15:32 -0400 (Tue, 07 Jul 2009)
New Revision: 7150

Modified:
   trunk/data/defaultNexuiz.cfg
   trunk/data/qcsrc/server/constants.qh
   trunk/data/qcsrc/server/mode_onslaught.qc
Log:
onslaught: new toys, new toys
cvars for:
CP build time
CP start health when building
CP regeneration


Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg	2009-07-07 05:05:57 UTC (rev 7149)
+++ trunk/data/defaultNexuiz.cfg	2009-07-07 05:15:32 UTC (rev 7150)
@@ -24,7 +24,7 @@
 seta g_configversion 0	"Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1  Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
 
 // default.cfg versioning (update using update-cvarcount.sh, run that every time after adding a new cvar)
-set cvar_check_default 99547c339e474ecb1b5758a604370575
+set cvar_check_default 0c601dba9664e961890f080688357fff
 
 // Nexuiz version (formatted for machines)
 // used to determine if a client version is compatible
@@ -657,6 +657,9 @@
 set g_onslaught 0 "Onslaught: take control points towards the enemy generator and then destroy it"
 set g_onslaught_gen_health 5000
 set g_onslaught_cp_health 1000
+set g_onslaught_cp_buildhealth 100
+set g_onslaught_cp_buildtime 10
+set g_onslaught_cp_regen 20
 
 // assault
 set g_assault 0 "Assault: attack the enemy base as fast as you can, then defend the base against the enemy for that time to win"

Modified: trunk/data/qcsrc/server/constants.qh
===================================================================
--- trunk/data/qcsrc/server/constants.qh	2009-07-07 05:05:57 UTC (rev 7149)
+++ trunk/data/qcsrc/server/constants.qh	2009-07-07 05:15:32 UTC (rev 7150)
@@ -1,4 +1,4 @@
-string CVAR_CHECK_DEFAULT = "99547c339e474ecb1b5758a604370575";
+string CVAR_CHECK_DEFAULT = "0c601dba9664e961890f080688357fff";
 string CVAR_CHECK_WEAPONS = "4f7b4c1e2feeef4988b02a93ff35a2ca";
 
 float	FALSE					= 0;

Modified: trunk/data/qcsrc/server/mode_onslaught.qc
===================================================================
--- trunk/data/qcsrc/server/mode_onslaught.qc	2009-07-07 05:05:57 UTC (rev 7149)
+++ trunk/data/qcsrc/server/mode_onslaught.qc	2009-07-07 05:15:32 UTC (rev 7150)
@@ -1014,7 +1014,7 @@
 	if(self.owner.iscaptured)
 		WaypointSprite_UpdateHealth(self.owner.sprite, self.health);
 	else
-		WaypointSprite_UpdateBuildFinished(self.owner.sprite, time + (self.max_health - self.health) / (self.count / 0.05));
+		WaypointSprite_UpdateBuildFinished(self.owner.sprite, time + (self.max_health - self.health) / (self.count / sys_ticrate));
 	self.pain_finished = time + 1;
 	self.punchangle = (2 * randomvec() - '1 1 1') * 45;
 	self.cp_bob_dmg_z = (2 * random() - 1) * 15;
@@ -1074,7 +1074,7 @@
 void onslaught_controlpoint_icon_think()
 {
 	entity oself;
-	self.nextthink = time + 0.05;
+	self.nextthink = time + sys_ticrate;
 	if (time > self.pain_finished + 5)
 	{
 		if(self.health < self.max_health)
@@ -1162,7 +1162,7 @@
 	local entity oself;
 	float a;
 
-	self.nextthink = time + 0.05;
+	self.nextthink = time + sys_ticrate;
 
 	// only do this if there is power
 	a = onslaught_controlpoint_can_be_linked(self.owner, self.owner.team);
@@ -1174,7 +1174,7 @@
 	if (self.health >= self.max_health)
 	{
 		self.health = self.max_health;
-		self.count = self.count * 0.1; // slow repair rate from now on
+		self.count = cvar("g_onslaught_cp_regen") * sys_ticrate; // slow repair rate from now on
 		self.think = onslaught_controlpoint_icon_think;
 		sound(self, CHAN_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
 		bprint(ColoredTeamName(self.team), " captured ", self.owner.message, " control point\n");
@@ -1225,7 +1225,7 @@
 	e.classname = "onslaught_controlpoint_icon";
 	e.owner = self;
 	e.max_health = cvar("g_onslaught_cp_health");
-	e.health = e.max_health * 0.1;
+	e.health = cvar("g_onslaught_cp_buildhealth");
 	e.solid = SOLID_BBOX;
 	e.movetype = MOVETYPE_NONE;
 	setmodel(e, "models/onslaught/controlpoint_icon.md3");
@@ -1237,12 +1237,12 @@
 	e.team = other.team;
 	e.colormap = 1024 + (e.team - 1) * 17;
 	e.think = onslaught_controlpoint_icon_buildthink;
-	e.nextthink = time + 0.1;
-	e.count = e.max_health / 100; // how long it takes to build
+	e.nextthink = time + sys_ticrate;
+	e.count = (e.max_health - e.health) * sys_ticrate / cvar("g_onslaught_cp_buildtime"); // how long it takes to build
 	sound(e, CHAN_TRIGGER, "onslaught/controlpoint_build.wav", VOL_BASE, ATTN_NORM);
 	self.team = e.team;
 	self.colormap = e.colormap;
-	WaypointSprite_UpdateBuildFinished(self.sprite, time + (e.max_health - e.health) / (e.count / 0.05));
+	WaypointSprite_UpdateBuildFinished(self.sprite, time + (e.max_health - e.health) / (e.count / sys_ticrate));
 };
 
 void onslaught_controlpoint_reset()



More information about the nexuiz-commits mailing list