From 42446a9004d0c99366a1d53158f722000827b4cb Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 16 Jun 2016 15:40:12 +1000 Subject: [PATCH] Fix a crash in CTF --- qcsrc/server/mutators/mutator/gamemode_ctf.qc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qcsrc/server/mutators/mutator/gamemode_ctf.qc b/qcsrc/server/mutators/mutator/gamemode_ctf.qc index 70a2c040b..f9872e749 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ctf.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ctf.qc @@ -2561,9 +2561,9 @@ void ctf_SpawnTeam (string teamname, int teamcolor) { entity this = new_pure(ctf_team); this.netname = teamname; - this.cnt = teamcolor; + this.cnt = teamcolor - 1; this.spawnfunc_checked = true; - spawnfunc_ctf_team(this); + this.team = teamcolor; } void ctf_DelayedInit(entity this) // Do this check with a delay so we can wait for teams to be set up. @@ -2584,12 +2584,12 @@ void ctf_DelayedInit(entity this) // Do this check with a delay so we can wait f if(find(NULL, classname, "ctf_team") == NULL) { LOG_TRACE("No \"ctf_team\" entities found on this map, creating them anyway.\n"); - ctf_SpawnTeam("Red", NUM_TEAM_1 - 1); - ctf_SpawnTeam("Blue", NUM_TEAM_2 - 1); + ctf_SpawnTeam("Red", NUM_TEAM_1); + ctf_SpawnTeam("Blue", NUM_TEAM_2); if(ctf_teams >= 3) - ctf_SpawnTeam("Yellow", NUM_TEAM_3 - 1); + ctf_SpawnTeam("Yellow", NUM_TEAM_3); if(ctf_teams >= 4) - ctf_SpawnTeam("Pink", NUM_TEAM_4 - 1); + ctf_SpawnTeam("Pink", NUM_TEAM_4); } ctf_ScoreRules(ctf_teams); -- 2.39.2