]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't use TDM team entities with no cnt set (supposedly fixes breakage on some maps)
authorMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 11:47:56 +0000 (21:47 +1000)
committerMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 11:47:56 +0000 (21:47 +1000)
qcsrc/server/mutators/gamemode_tdm.qc

index ad3a15b5f21784ef54e4cc10e98a7f828266b659..fda2161a6b99f48cefaf9e5d6de25af927a6ecdd 100644 (file)
@@ -10,7 +10,7 @@ Keys:
 "cnt" Scoreboard color of the team (for example 4 is red and 13 is blue)... */
 void spawnfunc_tdm_team()
 {
-       if(!g_tdm) { remove(self); return; }
+       if(!g_tdm || !self.cnt) { remove(self); return; }
 
        self.classname = "tdm_team";
        self.team = self.cnt + 1;
@@ -38,7 +38,7 @@ void tdm_DelayedInit()
        {
                LOG_INFO("No ""tdm_team"" entities found on this map, creating them anyway.\n");
 
-               float numteams = min(4, autocvar_g_tdm_teams_override);
+               int numteams = min(4, autocvar_g_tdm_teams_override);
 
                if(numteams < 2) { numteams = autocvar_g_tdm_teams; }
                numteams = bound(2, numteams, 4);