From 0732a090cbd6716be4c93cdc666adf5262dc845b Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Tue, 7 May 2013 11:56:07 -0400 Subject: [PATCH] Fix some team things-- whoops, sorry peoplez :D --- qcsrc/common/teams.qh | 7 ----- qcsrc/server/mutators/gamemode_assault.qc | 32 +++++++++++------------ 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/qcsrc/common/teams.qh b/qcsrc/common/teams.qh index c1ef62d950..db3a39bcd5 100644 --- a/qcsrc/common/teams.qh +++ b/qcsrc/common/teams.qh @@ -63,17 +63,10 @@ vector Team_ColorRGB(float teamid) { switch(teamid) { - #ifdef TEAMNUMBERS_THAT_ARENT_STUPID - case NUM_TEAM_1: return '1 0 0'; // red - case NUM_TEAM_2: return '0 0 1'; // blue - case NUM_TEAM_3: return '1 1 0'; // yellow - case NUM_TEAM_4: return '1 0 1'; // pink - #else case NUM_TEAM_1: return '1 0.0625 0.0625'; case NUM_TEAM_2: return '0.0625 0.0625 1'; case NUM_TEAM_3: return '1 1 0.0625'; case NUM_TEAM_4: return '1 0.0625 1'; - #endif } return '0 0 0'; diff --git a/qcsrc/server/mutators/gamemode_assault.qc b/qcsrc/server/mutators/gamemode_assault.qc index bf2594785c..94e104728f 100644 --- a/qcsrc/server/mutators/gamemode_assault.qc +++ b/qcsrc/server/mutators/gamemode_assault.qc @@ -178,10 +178,10 @@ void assault_roundstart_use() ent = find(world, classname, "turret_main"); while(ent) { // Swap turret teams - if(ent.team == COLOR_TEAM1) - ent.team = COLOR_TEAM2; + if(ent.team == NUM_TEAM_1) + ent.team = NUM_TEAM_2; else - ent.team = COLOR_TEAM1; + ent.team = NUM_TEAM_1; self = ent; @@ -241,20 +241,20 @@ void assault_new_round() self.winning = self.winning + 1; // swap attacker/defender roles - if(assault_attacker_team == COLOR_TEAM1) - assault_attacker_team = COLOR_TEAM2; + if(assault_attacker_team == NUM_TEAM_1) + assault_attacker_team = NUM_TEAM_2; else - assault_attacker_team = COLOR_TEAM1; + assault_attacker_team = NUM_TEAM_1; entity ent; for(ent = world; (ent = nextent(ent)); ) { if(clienttype(ent) == CLIENTTYPE_NOTACLIENT) { - if(ent.team_saved == COLOR_TEAM1) - ent.team_saved = COLOR_TEAM2; - else if(ent.team_saved == COLOR_TEAM2) - ent.team_saved = COLOR_TEAM1; + if(ent.team_saved == NUM_TEAM_1) + ent.team_saved = NUM_TEAM_2; + else if(ent.team_saved == NUM_TEAM_2) + ent.team_saved = NUM_TEAM_1; } } @@ -268,7 +268,7 @@ void spawnfunc_info_player_attacker() { if not(g_assault) { remove(self); return; } - self.team = COLOR_TEAM1; // red, gets swapped every round + self.team = NUM_TEAM_1; // red, gets swapped every round spawnfunc_info_player_deathmatch(); } @@ -276,7 +276,7 @@ void spawnfunc_info_player_defender() { if not(g_assault) { remove(self); return; } - self.team = COLOR_TEAM2; // blue, gets swapped every round + self.team = NUM_TEAM_2; // blue, gets swapped every round spawnfunc_info_player_deathmatch(); } @@ -316,10 +316,10 @@ void spawnfunc_func_assault_destructible() self.spawnflags = 3; self.classname = "func_assault_destructible"; - if(assault_attacker_team == COLOR_TEAM1) - self.team = COLOR_TEAM2; + if(assault_attacker_team == NUM_TEAM_1) + self.team = NUM_TEAM_2; else - self.team = COLOR_TEAM1; + self.team = NUM_TEAM_1; spawnfunc_func_breakable(); } @@ -352,7 +352,7 @@ void spawnfunc_target_assault_roundstart() { if not(g_assault) { remove(self); return; } - assault_attacker_team = COLOR_TEAM1; + assault_attacker_team = NUM_TEAM_1; self.classname = "target_assault_roundstart"; self.use = assault_roundstart_use; self.reset2 = assault_roundstart_use; -- 2.39.2