r2589 - trunk/data/qcsrc/server
savagex at icculus.org
savagex at icculus.org
Fri May 18 07:39:41 EDT 2007
Author: savagex
Date: 2007-05-18 07:39:41 -0400 (Fri, 18 May 2007)
New Revision: 2589
Modified:
trunk/data/qcsrc/server/assault.qc
trunk/data/qcsrc/server/constants.qh
Log:
moved magic "this objective is inactive" value to constants.qh (it's
needed later for e.g. the spawnpoints to determine if their objective is
active), minor stuff
Modified: trunk/data/qcsrc/server/assault.qc
===================================================================
--- trunk/data/qcsrc/server/assault.qc 2007-05-18 11:23:13 UTC (rev 2588)
+++ trunk/data/qcsrc/server/assault.qc 2007-05-18 11:39:41 UTC (rev 2589)
@@ -1,4 +1,3 @@
-float MAGIC_VALUE_INACTIVE = 1000;
// attacker spawn point
void info_player_attacker() {
@@ -19,7 +18,7 @@
self.health = 100;
self.nextthink = time + 0.1;
} else {
- self.health = MAGIC_VALUE_INACTIVE;
+ self.health = ASSAULT_VALUE_INACTIVE;
}
}
@@ -49,8 +48,12 @@
assault_objective_reset();
}
-
+// trigger new round
+// reset objectives, toggle spawnpoints, reset triggers, ...
void assault_new_round() {
+
+ // this assumes self.classname == "func_assault_roundend"!
+ self.cnt = self.cnt + 1;
// swap spawn point teams
local entity ent;
@@ -86,3 +89,10 @@
// actually restart round... how to do that?
}
+
+void func_assault_roundend() {
+ self.cnt = 0; // round counter
+ self.classname = "func_assault_roundend";
+ self.use = assault_new_round;
+
+}
Modified: trunk/data/qcsrc/server/constants.qh
===================================================================
--- trunk/data/qcsrc/server/constants.qh 2007-05-18 11:23:13 UTC (rev 2588)
+++ trunk/data/qcsrc/server/constants.qh 2007-05-18 11:39:41 UTC (rev 2589)
@@ -224,3 +224,5 @@
float COLOR_TEAM4 = 10; // pink
float NUM_PLAYERSKINS_TEAMPLAY = 3;
+
+float ASSAULT_VALUE_INACTIVE = 1000;
More information about the nexuiz-commits
mailing list