From 995408fd8523b08efcbcb07b8934b95e877cf4e0 Mon Sep 17 00:00:00 2001 From: div0 Date: Mon, 10 Nov 2008 15:56:27 +0000 Subject: [PATCH] target2 handling improved git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5035 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/assault.qc | 2 ++ data/qcsrc/server/cl_client.qc | 17 ++++++----------- data/qcsrc/server/race.qc | 3 +++ data/scripts/entities.def | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/data/qcsrc/server/assault.qc b/data/qcsrc/server/assault.qc index 89a766726..43bd4dfd2 100644 --- a/data/qcsrc/server/assault.qc +++ b/data/qcsrc/server/assault.qc @@ -132,6 +132,8 @@ void assault_objective_decrease_think() { // decrease the health of targeted objectives void assault_objective_decrease_use() { + if(other.classname == "info_player_deathmatch") // a spawn, a spawn + return; if(self.cnt > 0) { // did already fire diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index c465f4fd6..31f4e5116 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -1,4 +1,3 @@ -// let's abuse an existing field #define SPAWNPOINT_SCORE frags .float wantswelcomemessage; @@ -621,7 +620,6 @@ void PutClientInServer (void) if(self.classname == "player") { entity spot, oldself; - string s; race_PreSpawn(); @@ -792,15 +790,12 @@ void PutClientInServer (void) target_voicescript_clear(self); - s = spot.target; - spot.target = string_null; - oldself = self; - self = spot; - activator = oldself; - SUB_UseTargets(); - activator = world; - self = oldself; - spot.target = s; + oldself = self; + self = spot; + activator = oldself; + SUB_UseTargets(); + activator = world; + self = oldself; } else if(self.classname == "observer") { PutObserverInServer (); diff --git a/data/qcsrc/server/race.qc b/data/qcsrc/server/race.qc index b99cfe2f5..17244b62c 100644 --- a/data/qcsrc/server/race.qc +++ b/data/qcsrc/server/race.qc @@ -386,6 +386,9 @@ void checkpoint_touch() void checkpoint_use() { + if(other.classname == "info_player_deathmatch") // a spawn, a spawn + return; + other = activator; checkpoint_passed(); } diff --git a/data/scripts/entities.def b/data/scripts/entities.def index d8dea7c40..a92a00658 100644 --- a/data/scripts/entities.def +++ b/data/scripts/entities.def @@ -229,7 +229,7 @@ cnt: weight of spawn point for random selection. Set to a lower value if you hav Normal player spawning location in game types without team spawns. Should touch the floor, but not the walls, and should point where the player should look when he spawns there. -------- KEYS -------- cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1. -target2: trigger all entities with this targetname when someone spawns +target: trigger all entities with this targetname when someone spawns targetname: when targeted by a func_button, pressing the button will assign the spawn point to the team of the activator as an additional spawn point, or reassign it if it was already assigned. Also used to assign spawn points to Onslaught control points. */ @@ -245,7 +245,7 @@ cnt: weight of spawn point for random selection. Set to a lower value if you hav Red team's player spawning location in e.g. CTF and Onslaught. Should touch the floor, but not the walls, and should point where the player should look when he spawns there. -------- KEYS -------- cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1. -target2: trigger all entities with this targetname when someone spawns +target: trigger all entities with this targetname when someone spawns targetname: when targeted by a func_button, pressing the button will reassign the spawn point to the team of the activator. If a team has no more spawn point left, it immediately loses. */ @@ -253,7 +253,7 @@ targetname: when targeted by a func_button, pressing the button will reassign th Blue team's player spawning location in e.g. CTF and Onslaught. Should touch the floor, but not the walls, and should point where the player should look when he spawns there. -------- KEYS -------- cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1. -target2: trigger all entities with this targetname when someone spawns +target: trigger all entities with this targetname when someone spawns targetname: when targeted by a func_button, pressing the button will reassign the spawn point to the team of the activator. If a team has no more spawn point left, it immediately loses. */ @@ -261,7 +261,7 @@ targetname: when targeted by a func_button, pressing the button will reassign th Yellow team's player spawning location, but there is no game mode to use this yet. Anyway, should touch the floor, but not the walls, and should point where the player should look when he spawns there. -------- KEYS -------- cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1. -target2: trigger all entities with this targetname when someone spawns +target: trigger all entities with this targetname when someone spawns targetname: when targeted by a func_button, pressing the button will reassign the spawn point to the team of the activator. If a team has no more spawn point left, it immediately loses. */ @@ -269,7 +269,7 @@ targetname: when targeted by a func_button, pressing the button will reassign th Pink team's player spawning location, but there is no game mode to use this yet. Anyway, should touch the floor, but not the walls, and should point where the player should look when he spawns there. -------- KEYS -------- cnt: weight of spawn point for random selection. Set to a lower value if you have many spawn points close together. Default value is 1. -target2: trigger all entities with this targetname when someone spawns +target: trigger all entities with this targetname when someone spawns targetname: when targeted by a func_button, pressing the button will reassign the spawn point to the team of the activator. If a team has no more spawn point left, it immediately loses. */ -- 2.39.2