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;
leadlimit_override = 0; // not supported by LMS
if(fraglimit_override == 0)
fraglimit_override = -1;
- lms_lowest_lives = 9999;
- lms_next_place = 0;
- ScoreRules_lms();
- }
-
- if(g_arena)
- {
- fraglimit_override = autocvar_g_arena_point_limit;
- leadlimit_override = autocvar_g_arena_point_leadlimit;
- maxspawned = autocvar_g_arena_maxspawned;
- if(maxspawned < 2)
- maxspawned = 2;
- arena_roundbased = autocvar_g_arena_roundbased;
+ MUTATOR_ADD(gamemode_lms);
}
if(g_ca)
ActivateTeamplay();
fraglimit_override = autocvar_g_ca_point_limit;
leadlimit_override = autocvar_g_ca_point_leadlimit;
- precache_sound("ctf/red_capture.wav");
- precache_sound("ctf/blue_capture.wav");
+ MUTATOR_ADD(gamemode_ca);
}
+
if(g_keyhunt)
{
ActivateTeamplay();
if(g_assault)
{
ActivateTeamplay();
- ScoreRules_assault();
+ MUTATOR_ADD(gamemode_assault);
have_team_spawns = -1; // request team spawns
}
have_team_spawns = -1; // request team spawns
MUTATOR_ADD(gamemode_nexball);
}
-
+
if(g_keepaway)
{
MUTATOR_ADD(gamemode_keepaway);
ret_string = "";
MUTATOR_CALLHOOK(BuildMutatorsPrettyString);
modifications = ret_string;
-
- if(g_minstagib)
- modifications = strcat(modifications, ", MinstaGib");
+
if(g_weaponarena)
{
if(g_weaponarena_random)
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)
if(autocvar_bot_vs_human > 0)
{
// bots are all blue
- if(clienttype(for_whom) == CLIENTTYPE_BOT)
+ if(IS_BOT_CLIENT(for_whom))
c1 = c3 = c4 = -1;
else
c2 = -1;
else
{
// bots are all red
- if(clienttype(for_whom) == CLIENTTYPE_BOT)
+ if(IS_BOT_CLIENT(for_whom))
c2 = c3 = c4 = -1;
else
c1 = -1;
FOR_EACH_CLIENT(head)
{
float t;
- if(head.classname == "player")
+ if(IS_PLAYER(head))
t = head.team;
else if(head.team_forced > 0)
t = head.team_forced; // reserve the spot
if(head != ignore)// && head.netname != "")
{
value = PlayerValue(head);
- if(clienttype(head) == CLIENTTYPE_BOT)
+ if(IS_BOT_CLIENT(head))
bvalue = value;
else
bvalue = 0;
if(ta == tb)
return TRUE;
- if(clienttype(e) == CLIENTTYPE_REAL)
+ if(IS_REAL_CLIENT(e))
{
if(bots_would_leave)
{
cb -= cbb * 0.999;
}
}
-
+
// keep teams alive (teams of size 0 always count as smaller, ignoring score)
if(ca < 1)
if(cb >= 1)
if(totalteams <= 1)
{
- if(autocvar_g_campaign && pl && clienttype(pl) == CLIENTTYPE_REAL)
+ if(autocvar_g_campaign && pl && IS_REAL_CLIENT(pl))
return 1; // special case for campaign and player joining
else if(g_domination)
error("Too few teams available for domination\n");
GetTeamCounts(world);
RandomSelection_Init();
-
+
t = 1;
if(TeamSmallerEqThanTeam(2, t, pl))
t = 2;
// bprint("allow change teams from ", ftos(steam), " to ", ftos(dteam), "\n");
- if(self.classname == "player" && steam != dteam)
+ if(IS_PLAYER(self) && steam != dteam)
{
// reduce frags during a team change
TeamchangeFrags(self);
SetPlayerTeam(self, dteam, steam, FALSE);
- if(self.classname == "player" && steam != dteam)
+ if(IS_PLAYER(self) && steam != dteam)
{
// kill player when changing teams
if(self.deadflag == DEAD_NO)