MapInfo_Shutdown();
}
+void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override)
+{
+ if(!autocvar_g_campaign)
+ {
+ if(fraglimit_override >= 0) cvar_set("fraglimit", ftos(fraglimit_override));
+ if(timelimit_override >= 0) cvar_set("timelimit", ftos(timelimit_override));
+ if(leadlimit_override >= 0) cvar_set("leadlimit", ftos(leadlimit_override));
+ if(qualifying_override >= 0) cvar_set("g_race_qualifying_timelimit", ftos(qualifying_override));
+ }
+ limits_are_set = true;
+}
+
void Map_MarkAsRecent(string m);
float world_already_spawned;
void Nagger_Init();
readlevelcvars();
GrappleHookInit();
+ if(!limits_are_set)
+ SetLimits(autocvar_fraglimit_override, autocvar_leadlimit_override, autocvar_timelimit_override, -1);
+
player_count = 0;
bot_waypoints_for_items = autocvar_g_waypoints_for_items;
if(bot_waypoints_for_items == 1)
const int WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached
const int WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW
+bool limits_are_set = false;
+void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override);
+
float WinningCondition_Scores(float limit, float leadlimit);
void SetWinners(.float field, float value);
void CheckRules_Player();
#define GAMEMODE_ASSAULT_H
void assault_ScoreRules();
-void ActivateTeamplay();
REGISTER_MUTATOR(as, false)
{
qualifying_override = autocvar_g_race_qualifying_timelimit_override;
fraglimit_override = autocvar_g_race_laps_limit;
leadlimit_override = 0; // currently not supported by race
- timelimit_override = -1; // use default if we don't set it below
+ timelimit_override = autocvar_timelimit_override;
- // we need to find out the correct value for g_race_qualifying
float want_qualifying = ((qualifying_override >= 0) ? qualifying_override : autocvar_g_race_qualifying_timelimit) > 0;
if(autocvar_g_campaign)
g_race_qualifying = 1;
independent_players = 1;
}
- else if(!autocvar_g_campaign && want_qualifying)
+ else if(want_qualifying)
{
g_race_qualifying = 2;
independent_players = 1;
- race_fraglimit = (race_fraglimit >= 0) ? fraglimit_override : autocvar_fraglimit;
- race_leadlimit = (race_leadlimit >= 0) ? leadlimit_override : autocvar_leadlimit;
- race_timelimit = (race_timelimit >= 0) ? timelimit_override : autocvar_timelimit;
+ race_fraglimit = (fraglimit_override >= 0) ? fraglimit_override : autocvar_fraglimit;
+ race_leadlimit = (leadlimit_override >= 0) ? leadlimit_override : autocvar_leadlimit;
+ race_timelimit = (timelimit_override >= 0) ? timelimit_override : autocvar_timelimit;
+ qualifying_override = (qualifying_override >= 0) ? qualifying_override : autocvar_g_race_qualifying_timelimit;
fraglimit_override = 0;
leadlimit_override = 0;
- timelimit_override = autocvar_g_race_qualifying_timelimit;
+ timelimit_override = qualifying_override;
}
else
g_race_qualifying = 0;
-
SetLimits(fraglimit_override, leadlimit_override, timelimit_override, qualifying_override);
}
cvar_set("teamplay", "2"); // DP needs this for sending proper getstatus replies.
}
-void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override)
-{
- // enforce the server's universal frag/time limits
- // set to -1 to not change value
- if(!autocvar_g_campaign)
- {
- if(fraglimit_override >= 0)
- cvar_set("fraglimit", ftos(fraglimit_override));
- if(timelimit_override >= 0)
- cvar_set("timelimit", ftos(timelimit_override));
- if(leadlimit_override >= 0)
- cvar_set("leadlimit", ftos(leadlimit_override));
- if(qualifying_override >= 0)
- cvar_set("g_race_qualifying_timelimit", ftos(qualifying_override));
- }
-}
-
void InitGameplayMode()
{
VoteReset();
MapInfo_ClearTemps();
- // set both here, gamemode can override it later
- SetLimits(autocvar_fraglimit_override, autocvar_leadlimit_override, autocvar_timelimit_override, -1);
gamemode_name = MapInfo_Type_ToText(MapInfo_LoadedGametype);
cache_mutatormsg = strzone("");
void ActivateTeamplay();
-void SetLimits(int fraglimit_override, int leadlimit_override, float timelimit_override, float qualifying_override);
-
void InitGameplayMode();
string GetClientVersionMessage();