From 88a23462d817ad76116ef06a5735a86324c10ec5 Mon Sep 17 00:00:00 2001 From: savagex Date: Sat, 19 May 2007 17:57:28 +0000 Subject: [PATCH] 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) git-svn-id: svn://svn.icculus.org/nexuiz/trunk@2611 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/cl_client.qc | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 5acbdda15..49f82a0e2 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -24,7 +24,22 @@ entity Spawn_FilterOutBadSpots(entity firstspot, entity playerlist, float mindis { 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; -- 2.39.2