Fixes some uses of NOTIF_ONE where it should have been NOTIF_ONE_ONLY.
seta notification_INFO_SURVIVAL_HUNTER_WIN "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_SURVIVAL_SURVIVOR_WIN "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_TEAMCHANGE_LARGERTEAM "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_TEAMCHANGE_LOCKED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_TEAMCHANGE_NOTALLOWED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_TEAMCHANGE_SAME "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_TEAMS_LOCKED "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
+seta notification_INFO_TEAMS_UNLOCKED "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_VERSION_BETA "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_VERSION_OLD "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_INFO_VERSION_OUTDATED "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
seta notification_CENTER_SURVIVAL_SURVIVOR "1" "0 = off, 1 = centerprint"
seta notification_CENTER_SURVIVAL_SURVIVOR_WIN "1" "0 = off, 1 = centerprint"
seta notification_CENTER_TEAMCHANGE_AUTO "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_TEAMCHANGE_LARGERTEAM "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_TEAMCHANGE_LOCKED "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_TEAMCHANGE_NOTALLOWED "1" "0 = off, 1 = centerprint"
seta notification_CENTER_TEAMCHANGE "1" "0 = off, 1 = centerprint"
+seta notification_CENTER_TEAMCHANGE_SAME "1" "0 = off, 1 = centerprint"
seta notification_CENTER_TEAMCHANGE_SPECTATE "1" "0 = off, 1 = centerprint"
seta notification_CENTER_TEAMCHANGE_SUICIDE "1" "0 = off, 1 = centerprint"
seta notification_CENTER_TIMEOUT_BEGINNING "1" "0 = off, 1 = centerprint"
MSG_INFO_NOTIF(SURVIVAL_HUNTER_WIN, N_CONSOLE, 0, 0, "", "", "", _("^K1Hunters^BG win the round"), "")
MSG_INFO_NOTIF(SURVIVAL_SURVIVOR_WIN, N_CONSOLE, 0, 0, "", "", "", _("^F1Survivors^BG win the round"), "")
- MSG_INFO_NOTIF(TEAMCHANGE_LARGERTEAM, N_CONSOLE, 0, 0, "", "", "", _("^BGYou cannot change to a larger team"), "")
- MSG_INFO_NOTIF(TEAMCHANGE_NOTALLOWED, N_CONSOLE, 0, 0, "", "", "", _("^BGYou are not allowed to change teams"), "")
+ MSG_INFO_NOTIF(TEAMCHANGE_LARGERTEAM, N_CONSOLE, 0, 0, "", "", "", _("^K2You're not allowed to join a larger team!"), "")
+ MSG_INFO_NOTIF(TEAMCHANGE_NOTALLOWED, N_CONSOLE, 0, 0, "", "", "", _("^K2You're not allowed to change teams!"), "")
+ MSG_INFO_NOTIF(TEAMCHANGE_LOCKED, N_CONSOLE, 0, 0, "", "", "", _("^K2Teams are locked, you can't join or change teams until they're unlocked or the map changes."), "")
+ MSG_INFO_NOTIF(TEAMCHANGE_SAME, N_CONSOLE, 0, 0, "", "", "", _("^K2You're already on that team!"), "")
+
+ MSG_INFO_NOTIF(TEAMS_LOCKED, N_CHATCON, 0, 0, "", "", "", _("^F4The teams are now locked."), "")
+ MSG_INFO_NOTIF(TEAMS_UNLOCKED, N_CHATCON, 0, 0, "", "", "", _("^F1The teams are now unlocked."), "")
MSG_INFO_NOTIF(VERSION_BETA, N_CONSOLE, 2, 0, "s1 s2", "", "", _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s (beta)^BG, you have ^F2Xonotic %s"), "")
MSG_INFO_NOTIF(VERSION_OLD, N_CHATCON, 2, 0, "s1 s2", "", "", _("^F4NOTE: ^BGThe server is running ^F1Xonotic %s^BG, you have ^F2Xonotic %s"), "")
MSG_CENTER_NOTIF(TEAMCHANGE_AUTO, N_ENABLE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Changing team in ^COUNT"), "")
MSG_CENTER_NOTIF(TEAMCHANGE_SPECTATE, N_ENABLE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Spectating in ^COUNT"), "")
MSG_CENTER_NOTIF(TEAMCHANGE_SUICIDE, N_ENABLE, 0, 1, "", CPID_TEAMCHANGE, "1 f1", _("^K1Suicide in ^COUNT"), "")
+ MSG_CENTER_NOTIF(TEAMCHANGE_LARGERTEAM, N_ENABLE, 0, 0, "", CPID_PREVENT_JOIN, "0 0", _("^K2You're not allowed to join a larger team!"), "")
+ MSG_CENTER_NOTIF(TEAMCHANGE_NOTALLOWED, N_ENABLE, 0, 0, "", CPID_PREVENT_JOIN, "0 0", _("^K2You're not allowed to change teams!"), "")
+ MSG_CENTER_NOTIF(TEAMCHANGE_LOCKED, N_ENABLE, 0, 0, "", CPID_PREVENT_JOIN, "0 0", _("^K2Teams are locked, you can't join or change teams until they're unlocked or the map changes."), "")
+ MSG_CENTER_NOTIF(TEAMCHANGE_SAME, N_ENABLE, 0, 0, "", CPID_PREVENT_JOIN, "0 0", _("^K2You're already on that team!"), "")
MSG_CENTER_NOTIF(TIMEOUT_BEGINNING, N_ENABLE, 0, 1, "", CPID_TIMEOUT, "1 f1", _("^F4Timeout begins in ^COUNT"), "")
MSG_CENTER_NOTIF(TIMEOUT_ENDING, N_ENABLE, 0, 1, "", CPID_TIMEIN, "1 f1", _("^F4Timeout ends in ^COUNT"), "")
}
if (lockteams)
{
- sprint(caller, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
+ Send_Notification(NOTIF_ONE_ONLY, caller, MSG_INFO, INFO_TEAMCHANGE_LOCKED);
+ Send_Notification(NOTIF_ONE_ONLY, caller, MSG_CENTER, CENTER_TEAMCHANGE_LOCKED);
return;
}
return;
if (caller.team == team_num && team_num && !IS_DEAD(caller))
{
- sprint(caller, "^7You already are on that team.\n");
+ Send_Notification(NOTIF_ONE_ONLY, caller, MSG_INFO, INFO_TEAMCHANGE_SAME);
+ Send_Notification(NOTIF_ONE_ONLY, caller, MSG_CENTER, CENTER_TEAMCHANGE_SAME);
return;
}
if (CS(caller).wasplayer && autocvar_g_changeteam_banned)
{
- sprint(caller, "^1You cannot change team, forbidden by the server.\n");
+ Send_Notification(NOTIF_ONE_ONLY, caller, MSG_INFO, INFO_TEAMCHANGE_NOTALLOWED);
+ Send_Notification(NOTIF_ONE_ONLY, caller, MSG_CENTER, CENTER_TEAMCHANGE_NOTALLOWED);
return;
}
if (team_num && autocvar_g_balance_teams_prevent_imbalance && !warmup_stage)
if ((Team_IndexToBit(Team_TeamToIndex(team_num)) &
TeamBalance_FindBestTeams(balance, caller, false)) == 0)
{
- Send_Notification(NOTIF_ONE, caller, MSG_INFO, INFO_TEAMCHANGE_LARGERTEAM);
+ Send_Notification(NOTIF_ONE_ONLY, caller, MSG_INFO, INFO_TEAMCHANGE_LARGERTEAM);
+ Send_Notification(NOTIF_ONE_ONLY, caller, MSG_CENTER, CENTER_TEAMCHANGE_LARGERTEAM);
TeamBalance_Destroy(balance);
return;
}
if (teamplay)
{
lockteams = 1;
- bprint("^1The teams are now locked.\n");
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_TEAMS_LOCKED);
}
else
{
if (teamplay)
{
lockteams = 0;
- bprint("^1The teams are now unlocked.\n");
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_TEAMS_UNLOCKED);
}
else
{
{
return;
}
- if ((autocvar_g_campaign) || (autocvar_g_changeteam_banned &&
- CS(player).wasplayer))
+
+ // TODO: this is in ClientCommand_selectteam(), shouldn't be necessary to have it here too (refactor SV_ChangeTeam ?)
+ if ((autocvar_g_campaign) || (autocvar_g_changeteam_banned && CS(player).wasplayer))
{
- Send_Notification(NOTIF_ONE, player, MSG_INFO,
- INFO_TEAMCHANGE_NOTALLOWED);
+ Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_TEAMCHANGE_NOTALLOWED);
+ Send_Notification(NOTIF_ONE_ONLY, player, MSG_CENTER, CENTER_TEAMCHANGE_NOTALLOWED);
return;
}
entity balance = TeamBalance_CheckAllowedTeams(player);
team_index = 1;
}
+ // TODO: this is in ClientCommand_selectteam(), shouldn't be necessary to have it here too (refactor SV_ChangeTeam ?)
if (autocvar_g_balance_teams_prevent_imbalance && !warmup_stage)
{
TeamBalance_GetTeamCounts(balance, player);
if ((Team_IndexToBit(team_index) & TeamBalance_FindBestTeams(balance,
player, false)) == 0)
{
- Send_Notification(NOTIF_ONE, player, MSG_INFO,
- INFO_TEAMCHANGE_LARGERTEAM);
+ Send_Notification(NOTIF_ONE_ONLY, player, MSG_INFO, INFO_TEAMCHANGE_LARGERTEAM);
+ Send_Notification(NOTIF_ONE_ONLY, player, MSG_CENTER, CENTER_TEAMCHANGE_LARGERTEAM);
TeamBalance_Destroy(balance);
return;
}