X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fgamemode_tdm.qc;h=fda2161a6b99f48cefaf9e5d6de25af927a6ecdd;hb=86c9dc7c3696c329496b06375c1e79fb407401ce;hp=afff8bdb2583dc8a187b0814c56e8d75ead365e7;hpb=263c592e468eeeffb2755d204b21eb13e398adac;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/gamemode_tdm.qc b/qcsrc/server/mutators/gamemode_tdm.qc index afff8bdb2..fda2161a6 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; @@ -36,9 +36,9 @@ void tdm_DelayedInit() // if no teams are found, spawn defaults if(find(world, classname, "tdm_team") == world) { - print("No ""tdm_team"" entities found on this map, creating them anyway.\n"); + 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); @@ -55,9 +55,16 @@ MUTATOR_HOOKFUNCTION(tdm_GetTeamCount) return true; } +MUTATOR_HOOKFUNCTION(tdm_CountFrags) +{ + // announce remaining frags + return true; +} + MUTATOR_DEFINITION(gamemode_tdm) { MUTATOR_HOOK(GetTeamCount, tdm_GetTeamCount, CBC_ORDER_ANY); + MUTATOR_HOOK(Scores_CountFragsRemaining, tdm_CountFrags, CBC_ORDER_ANY); MUTATOR_ONADD { @@ -75,7 +82,7 @@ MUTATOR_DEFINITION(gamemode_tdm) MUTATOR_ONREMOVE { - print("This is a game type and it cannot be removed at runtime."); + LOG_INFO("This is a game type and it cannot be removed at runtime."); return -1; }