r2611 - trunk/data/qcsrc/server
savagex at icculus.org
savagex at icculus.org
Sat May 19 13:57:28 EDT 2007
Author: savagex
Date: 2007-05-19 13:57:28 -0400 (Sat, 19 May 2007)
New Revision: 2611
Modified:
trunk/data/qcsrc/server/cl_client.qc
Log:
added spawn point selection code for assault. If spawnpoints target an
entity (that'd be target_objective) they're only active if that targeted
entity has a health >= 0 and health < ASSAULT_VALUE_INACTIVE.
(an objective is fulfilled by bringing its health down to < 0 by
target_objective_decrease, which get fired by triggers)
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2007-05-19 17:40:25 UTC (rev 2610)
+++ trunk/data/qcsrc/server/cl_client.qc 2007-05-19 17:57:28 UTC (rev 2611)
@@ -24,7 +24,22 @@
{
nextspot = spot.chain;
// count team mismatches as bad spots
- if (spot.team == teamcheck)
+
+ local float spotactive;
+ spotactive = 1;
+
+ // filter out spots for assault
+ if(spot.target != "") {
+ local entity ent;
+ ent = find(world, targetname, spot.target);
+ while(ent) {
+ if(ent.health < 0 || ent.health >= ASSAULT_VALUE_INACTIVE)
+ spotactive = 0;
+ ent = find(ent, targetname, spot.target);
+ }
+ }
+
+ if (spot.team == teamcheck && spotactive > 0)
{
pcount = 0;
player = playerlist;
More information about the nexuiz-commits
mailing list