]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Remove freeze code, monsters no longer use freeze attacks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index 81c877db902fd38fda510aeb97525e962b6226fa..ab1851e844b12315b77d8702faa8c6513e73f961 100644 (file)
@@ -56,7 +56,7 @@ void InitGameplayMode()
        teamplay = 0;
        serverflags &= ~SERVERFLAG_TEAMPLAY;
 
-       if not(cvar_value_issafe(world.fog))
+       if (!cvar_value_issafe(world.fog))
        {
                print("The current map contains a potentially harmful fog setting, ignored\n");
                world.fog = string_null;
@@ -115,13 +115,6 @@ void InitGameplayMode()
                MUTATOR_ADD(gamemode_lms);
        }
 
-       if(g_arena)
-       {
-               fraglimit_override = autocvar_g_arena_point_limit;
-               leadlimit_override = autocvar_g_arena_point_leadlimit;
-               MUTATOR_ADD(gamemode_arena);
-       }
-
        if(g_ca)
        {
                ActivateTeamplay();
@@ -192,12 +185,19 @@ void InitGameplayMode()
         have_team_spawns = -1; // request team spawns
            MUTATOR_ADD(gamemode_nexball);
        }
-        
+
        if(g_keepaway)
        {
                MUTATOR_ADD(gamemode_keepaway);
        }
 
+       if(g_invasion)
+       {
+               timelimit_override = 0; // no timelimit in invasion, round based
+               fraglimit_override = autocvar_g_invasion_round_limit;
+               MUTATOR_ADD(gamemode_invasion);
+       }
+
        if(teamplay)
                entcs_init();
 
@@ -237,6 +237,12 @@ void InitGameplayMode()
                else
                        g_race_qualifying = 0;
        }
+       
+       if(g_invasion)
+       {
+               maxrounds = cvar("fraglimit");
+               cvar_set("fraglimit", "0");
+       }
 
        if(g_race || g_cts)
        {
@@ -600,7 +606,7 @@ float TeamSmallerEqThanTeam(float ta, float tb, entity e)
                        cb -= cbb * 0.999;
                }
        }
-       
+
        // keep teams alive (teams of size 0 always count as smaller, ignoring score)
        if(ca < 1)
                if(cb >= 1)
@@ -671,7 +677,7 @@ float FindSmallestTeam(entity pl, float ignore_pl)
                GetTeamCounts(world);
 
        RandomSelection_Init();
-       
+
        t = 1;
        if(TeamSmallerEqThanTeam(2, t, pl))
                t = 2;