From: Mario Date: Sun, 30 Aug 2015 11:47:56 +0000 (+1000) Subject: Don't use TDM team entities with no cnt set (supposedly fixes breakage on some maps) X-Git-Tag: xonotic-v0.8.2~1961 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=87d1fa13e39de5390d24db3a24bbb3c0fa555621 Don't use TDM team entities with no cnt set (supposedly fixes breakage on some maps) --- diff --git a/qcsrc/server/mutators/gamemode_tdm.qc b/qcsrc/server/mutators/gamemode_tdm.qc index ad3a15b5f2..fda2161a6b 100644 --- a/qcsrc/server/mutators/gamemode_tdm.qc +++ b/qcsrc/server/mutators/gamemode_tdm.qc @@ -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);