X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fteamplay.qc;h=e332e55ed80de06b3b4ce73e6fa2f063d1f4d8d0;hb=198c14c07ac0c2f4484c171fce4145dcedc42172;hp=30a526bc6de2176dc8b0572fe3ddc1ebc92224c6;hpb=e9b8b02ec887ead824e33c0c6ac55301bb6aa6dc;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 30a526bc6..e332e55ed 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -54,9 +54,9 @@ void InitGameplayMode() MapInfo_LoadMapSettings(mapname); teamplay = 0; - serverflags &~= SERVERFLAG_TEAMPLAY; + 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(); @@ -196,12 +189,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(); @@ -241,6 +241,12 @@ void InitGameplayMode() else g_race_qualifying = 0; } + + if(g_invasion) + { + inv_maxrounds = cvar("fraglimit"); + cvar_set("fraglimit", "0"); + } if(g_race || g_cts) { @@ -284,20 +290,14 @@ string getwelcomemessage(void) } if(autocvar_g_start_weapon_laser == 0) modifications = strcat(modifications, ", No start weapons"); - if(autocvar_sv_gravity < 800) + if(cvar("sv_gravity") < stof(cvar_defstring("sv_gravity"))) modifications = strcat(modifications, ", Low gravity"); if(g_cloaked && !g_cts) modifications = strcat(modifications, ", Cloaked"); if(g_grappling_hook) modifications = strcat(modifications, ", Hook"); - if(g_midair) - modifications = strcat(modifications, ", Midair"); - if(g_pinata) - modifications = strcat(modifications, ", Piñata"); if(g_weapon_stay && !g_cts) modifications = strcat(modifications, ", Weapons stay"); - if(g_bloodloss > 0) - modifications = strcat(modifications, ", Blood loss"); if(g_jetpack) modifications = strcat(modifications, ", Jet pack"); if(autocvar_g_powerups == 0) @@ -610,7 +610,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) @@ -681,7 +681,7 @@ float FindSmallestTeam(entity pl, float ignore_pl) GetTeamCounts(world); RandomSelection_Init(); - + t = 1; if(TeamSmallerEqThanTeam(2, t, pl)) t = 2;