BADCVAR("g_tdm");
BADCVAR("g_tdm_on_dm_maps");
BADCVAR("g_tdm_teams");
+ BADCVAR("g_mmm");
+ BADCVAR("g_mmm_not_dm_maps");
BADCVAR("g_vip");
BADCVAR("leadlimit");
BADCVAR("nextmap");
BADCVAR("g_mapinfo_ignore_warnings");
BADCVAR("g_maplist_ignore_sizes");
BADCVAR("g_maplist_sizes_count_bots");
+ //LegendGuard adds BADCVAR(g_*) for MMM 20-02-2021
// long
BADCVAR("hostname");
+ BADCVAR("hostname_full");
BADCVAR("g_maplist");
BADCVAR("g_maplist_mostrecent");
BADCVAR("sv_motd");
+ BADCVAR("sv_motd_permanent");
+
+ BADPREFIX("g_teamnames_");
v = cvar_string(k);
d = cvar_defstring(k);
BADCVAR("g_forced_respawn");
BADCVAR("g_freezetag_point_leadlimit");
BADCVAR("g_freezetag_point_limit");
+ BADCVAR("g_freezetag_revive_respawn");
+ BADCVAR("g_freezetag_round_stop");
+ BADCVAR("g_freezetag_round_respawn");
BADCVAR("g_glowtrails");
BADCVAR("g_hats");
BADCVAR("g_casings");
BADPREFIX("sv_timeout_");
BADPREFIX("sv_vote_");
BADPREFIX("timelimit_");
+ BADPREFIX("sv_chat_");
+ BADPREFIX("sv_jingle_");
// allowed changes to server admins (please sync this to server.cfg)
// vi commands:
world_initialized = 1;
__spawnfunc_spawn_all();
+
+ if(!warmup_stage)
+ round_handler_Activate(true);
}
spawnfunc(light)
*/
//pos = FindIntermission ();
+
+ sound(NULL, CH_INFO, SND_ENDMATCH, VOL_BASE, ATTN_NONE);
VoteReset();
WeaponStats_Shutdown();
Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_Null); // kill all centerprints now
+
+ // send winner notification
+ if(teamplay) {
+ Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, APP_TEAM_NUM(WinningConditionHelper_winnerteam, ANNCE_TEAM_WINS));
+ }
if(autocvar_sv_eventlog)
GameLogEcho(":gameover");
});
target_music_kill();
+
+ // z411
+ if(autocvar_sv_jingle_end) {
+ int jingles_len = 0;
+ string jingles[32];
+ jingles[0] = "";
+
+ FOREACH_WORD(autocvar_sv_jingle_end_list, it,
+ {
+ jingles[jingles_len] = it;
+ jingles_len++;
+ });
+
+ if(jingles_len) {
+ int song_to_play = rint(random() * (jingles_len - 1));
+
+ FOREACH_CLIENT(IS_REAL_CLIENT(it),
+ {
+ stuffcmd(it, "cd stop\n");
+ _sound(it, CH_INFO, strcat("jingle/", jingles[song_to_play], ".ogg"), VOL_BASE * autocvar_sv_jingle_end_volume, ATTEN_NORM);
+ });
+ }
+ }
if(autocvar_g_campaign)
CampaignPreIntermission();
//add one more overtime by simply extending the timelimit
cvar_set("timelimit", ftos(autocvar_timelimit + autocvar_timelimit_overtime));
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_OVERTIME_TIME, autocvar_timelimit_overtime * 60);
+
+ sound(NULL, CH_INFO, SND_OVERTIME, VOL_BASE, ATTN_NONE);
+ if(checkrules_overtimesadded == 1) {
+ Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_OVERTIME);
+ overtime_starttime = time;
+ }
}
float GetWinningCode(float fraglimitreached, float equality)
FOREACH_CLIENT(IS_PLAYER(it) || INGAME(it), { it.winning = 0; });
}
-int fragsleft_last;
+void AnnounceNewLeader()
+{
+ if(teamplay) {
+ if (WinningConditionHelper_equality)
+ Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_TEAM_LEADS_TIED);
+ else
+ FOREACH_CLIENT(IS_PLAYER(it), {
+ if(it.team == WinningConditionHelper_winnerteam)
+ Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_LEADS_TEAM);
+ else
+ Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_LEADS_ENEMY);
+ });
+ Send_Notification(NOTIF_ALL_SPEC, NULL, MSG_ANNCE, APP_TEAM_NUM(WinningConditionHelper_winnerteam, ANNCE_TEAM_LEADS));
+ } else {
+ if (WinningConditionHelper_equality)
+ {
+ Send_Notification(NOTIF_ONE, WinningConditionHelper_equality_one, MSG_ANNCE, ANNCE_LEAD_TIED);
+ Send_Notification(NOTIF_ONE, WinningConditionHelper_equality_two, MSG_ANNCE, ANNCE_LEAD_TIED);
+ }
+ else
+ {
+ Send_Notification(NOTIF_ONE, WinningConditionHelper_winner, MSG_ANNCE, ANNCE_LEAD_GAINED);
+ Send_Notification(NOTIF_ONE, WinningConditionHelper_second, MSG_ANNCE, ANNCE_LEAD_LOST);
+ }
+ }
+}
+
+void AnnounceScores(float tm)
+{
+ WinningConditionHelper(NULL);
+ if (Score_NewLeader()) {
+ AnnounceNewLeader();
+ } else {
+ FOREACH_CLIENT(IS_PLAYER(it), {
+ if(it.team == tm)
+ Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_SCORES_TEAM);
+ else
+ Send_Notification(NOTIF_ONE_ONLY, it, MSG_ANNCE, ANNCE_TEAM_SCORES_ENEMY);
+ });
+ Send_Notification(NOTIF_ALL_SPEC, NULL, MSG_ANNCE, APP_TEAM_NUM(tm, ANNCE_TEAM_SCORES));
+ }
+}
+
float WinningCondition_Scores(float limit, float leadlimit)
{
// TODO make everything use THIS winning condition (except LMS)
if(MUTATOR_CALLHOOK(Scores_CountFragsRemaining))
{
- float fragsleft;
if (checkrules_suddendeathend && time >= checkrules_suddendeathend)
{
fragsleft = 1;
fragsleft_last = fragsleft;
}
}
-
+
+ // z411 - lead announcer
+ if(MUTATOR_CALLHOOK(Scores_AnnounceLeads)) {
+ if (Score_NewLeader())
+ AnnounceNewLeader();
+ }
+
bool fraglimit_reached = (limit && WinningConditionHelper_topscore >= limit);
bool leadlimit_reached = (leadlimit && WinningConditionHelper_topscore - WinningConditionHelper_secondscore >= leadlimit);
// again, but this shouldn't hurt
return;
}
+
+ // z411 don't check rules if we're in a timeout
+ if (game_timeout) return;
float timelimit = autocvar_timelimit * 60;
float fraglimit = autocvar_fraglimit;
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_RACE_FINISHLAP);
else
Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_OVERTIME_FRAG);
+ checkrules_overtimesadded = 1;
+ sound(NULL, CH_INFO, SND_OVERTIME, VOL_BASE, ATTN_NONE);
+ Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_OVERTIME);
}
}
else
{
if(cvar("sv_allow_fullbright"))
serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
+ if(cvar("sv_forbid_pickuptimer"))
+ serverflags |= SERVERFLAG_FORBID_PICKUPTIMER;
sv_ready_restart_after_countdown = cvar("sv_ready_restart_after_countdown");
bool autocvar_sv_freezenonclients;
void Physics_Frame()
{
- if(autocvar_sv_freezenonclients)
+ if(autocvar_sv_freezenonclients || game_timeout)
return;
IL_EACH(g_moveables, true,