]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/gamemode_freezetag.qc
Merge branch 'terencehill/ca_arena_freezetag_bugfixes' into terencehill/arena_gamemode
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / gamemode_freezetag.qc
index 42c6b04ddda491dd3350a6d1bc3e2d76bb6baed5..e29079b62c38eec377917e22317e527923877ee1 100644 (file)
@@ -69,7 +69,7 @@ float freezetag_CheckTeams()
        }
        if(prev_total_players != total_players)
        {
-               string teams_missing;
+               string teams_missing = "";
                if(!redalive)   teams_missing = strcat(teams_missing, ColoredTeamName(COLOR_TEAM1), ", ");
                if(!bluealive)  teams_missing = strcat(teams_missing, ColoredTeamName(COLOR_TEAM2), ", ");
                if(freezetag_teams >= 3)
@@ -629,9 +629,17 @@ MUTATOR_DEFINITION(gamemode_freezetag)
                freezetag_Initialize();
        }
 
+       MUTATOR_ONROLLBACK_OR_REMOVE
+       {
+               // we actually cannot roll back freezetag_Initialize here
+               // BUT: we don't need to! If this gets called, adding always
+               // succeeds.
+       }
+
        MUTATOR_ONREMOVE
        {
-               error("This is a game type and it cannot be removed at runtime.");
+               print("This is a game type and it cannot be removed at runtime.");
+               return -1;
        }
 
        return 0;