set g_lms_lives_override -1
set g_lms_regenerate 0
set g_lms_campcheck_interval 10
-set g_lms_campcheck_message "^1Don't camp!"
set g_lms_campcheck_damage 100
set g_lms_campcheck_distance 1800
set g_lms_last_join 3 "if g_lms_join_anytime is false, new players can only join if the worst active player has more than (fraglimit - g_lms_last_join) lives"
float MAX_SHOT_DISTANCE = 32768;
//centerprint ID list
-float CPID_TEAMCHANGE = 1;
float CPID_CTF_CAPTURESHIELD = 2;
float CPID_MINSTA_FINDAMMO = 3;
float CPID_NIX_WPNCHANGE = 4;
-float CPID_DISCONNECT_IDLING = 5;
float CPID_ROUND_STARTING = 6;
float CPID_GAME_STARTING = 7;
float CPID_TIMEOUT_COUNTDOWN = 8;
float CPID_MOTD = 9;
float CPID_KH_MSG = 10;
-float CPID_PREVENT_JOIN = 11;
// weapon requests
float WR_SETUP = 1; // (SVQC) setup weapon data
// color code replace, place inside of sprintf and parse the string
string CCR(string input) // TODO: MOVE TO UTIL.QC
{
+ // Default colors listed in comments
+
// foreground/normal colors
- input = strreplace("^F1", "^2", input); // primary priority (important names, etc)
- input = strreplace("^F2", "^3", input); // secondary priority (items, locations, numbers, etc)
+ input = strreplace("^F1", "^2", input); // Green // primary priority (important names, etc)
+ input = strreplace("^F2", "^3", input); // Yellow // secondary priority (items, locations, numbers, etc)
+ input = strreplace("^F3", "^4", input); // Blue // tertiary priority or relatively inconsequential text
+ input = strreplace("^F4", "^1", input); // Red // notice/attention grabbing texting
// "kill" colors
- input = strreplace("^K1", "^1", input); // "bad" or "dangerous" text (death messages against you, kill notifications, etc)
- input = strreplace("^K2", "^3", input); // similar to above, but less important... OR, a highlight out of above message type
- input = strreplace("^K3", "^4", input); // "good" or "beneficial" text (you fragging someone, etc)
+ input = strreplace("^K1", "^1", input); // Red // "bad" or "dangerous" text (death messages against you, kill notifications, etc)
+ input = strreplace("^K2", "^3", input); // Yellow // similar to above, but less important... OR, a highlight out of above message type
+ input = strreplace("^K3", "^4", input); // Blue // "good" or "beneficial" text (you fragging someone, etc)
// background colors
- input = strreplace("^BG", "^7", input); // neutral/unimportant text
- input = strreplace("^N", "^7", input); // "none"-- reset to white...
+ input = strreplace("^BG", "^7", input); // White // neutral/unimportant text
+ input = strreplace("^N", "^7", input); // White // "none"-- reset to white...
return input;
}
MSG_INFO_NOTIF(INFO_FREEZETAG_REVIVE, 2, 0, XPD(s1, s2), XPD("", ""), "", _("^BG%s^K3 was revived by ^BG%s\n"), "") \
MSG_INFO_NOTIF(INFO_FREEZETAG_FREEZE, 2, 0, XPD(s1, s2), XPD("", ""), "", _("^BG%s^K1 was frozen by ^BG%s\n"), "") \
MSG_INFO_NOTIF(INFO_FREEZETAG_SELF, 1, 0, s1, XPD("", ""), "", _("^BG%s^K1 froze themself\n"), "") \
+ MSG_INFO_NOTIF(INFO_GODMODE_OFF, 0, 1, f1, XPD("", ""), "", _("^BGGodmode saved you %d units of damage, cheater!\n"), "") \
+ MSG_INFO_NOTIF(INFO_JOIN_CONNECT, 1, 0, s1, XPD("", ""), "", _("^BG%s^F3 connected%s\n"), "") \
+ MULTITEAM_INFO(INFO_JOIN_CONNECT_TEAM_, 4, 1, 0, s1, XPD("", ""), "", _("^BG%s^F3 connected and joined the ^TC^TT\n"), "") \
+ MSG_INFO_NOTIF(INFO_JOIN_PLAY, 1, 0, s1, XPD("", ""), "", _("^BG%s^F3 is now playing\n"), "") \
MSG_INFO_NOTIF(INFO_KEEPAWAY_DROPPED, 1, 0, s1, XPD(s1, ""), "notify_balldropped", _("^BG%s^BG has dropped the ball!\n"), "") \
MSG_INFO_NOTIF(INFO_KEEPAWAY_PICKUP, 1, 0, s1, XPD(s1, ""), "notify_ballpickedup", _("^BG%s^BG has picked up the ball!\n"), "") \
+ MSG_INFO_NOTIF(INFO_LMS_NOLIVES, 1, 0, s1, XPD(s1, ""), "", _("^BG%s^F3 has no more lives left\n"), "") \
+ MSG_INFO_NOTIF(INFO_LMS_FORFEIT, 1, 0, s1, XPD(s1, ""), "", _("^BG%s^F3 forfeited\n"), "") \
+ MSG_INFO_NOTIF(INFO_POWERDOWN_INVISIBILITY, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2Invisibility has worn off\n"), "") \
+ MSG_INFO_NOTIF(INFO_POWERDOWN_SHIELD, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2Shield has worn off\n"), "") \
+ MSG_INFO_NOTIF(INFO_POWERDOWN_SPEED, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2Speed has worn off\n"), "") \
+ MSG_INFO_NOTIF(INFO_POWERDOWN_STRENGTH, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2Strength has worn off\n"), "") \
+ MSG_INFO_NOTIF(INFO_POWERUP_INVISIBILITY, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2You are invisible\n"), "") \
+ MSG_INFO_NOTIF(INFO_POWERUP_SHIELD, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2Shield surrounds you\n"), "") \
+ MSG_INFO_NOTIF(INFO_POWERUP_SPEED, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2You are on speed\n"), "") \
+ MSG_INFO_NOTIF(INFO_POWERUP_STRENGTH, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2Strength infuses your weapons with devastating power\n"), "") \
+ MSG_INFO_NOTIF(INFO_QUIT_DISCONNECT, 1, 0, s1, XPD(s1, ""), "", _("^BG%s^F3 disconnected\n"), "") \
+ MSG_INFO_NOTIF(INFO_QUIT_KICK_IDLING, 1, 0, s1, XPD(s1, ""), "", _("^BG%s^F3 was kicked for idling\n"), "") \
+ MSG_INFO_NOTIF(INFO_QUIT_KICK_SPECTATING, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2You were kicked from the server because you are a spectator and spectators aren't allowed at the moment.\n"), "") \
+ MSG_INFO_NOTIF(INFO_QUIT_SPECTATE, 1, 0, s1, XPD(s1, ""), "", _("^BG%s^F3 is now spectating\n"), "") \
MSG_INFO_NOTIF(INFO_RACE_FAIL, 2, 0, XPD(s1, s2), XPD(s1, ""), "race_newfail", "", "") \
MSG_INFO_NOTIF(INFO_RACE_NEW_RECORD, 2, 0, XPD(s1, s2), XPD(s1, ""), "race_newrecordserver", "", "") \
MSG_INFO_NOTIF(INFO_RACE_NEW_TIME, 2, 0, XPD(s1, s2), XPD(s1, ""), "race_newtime", "", "") \
MSG_INFO_NOTIF(INFO_RACE_NEW_RANK, 2, 0, XPD(s1, s2), XPD(s1, ""), "race_newrankyellow", "", "") \
MULTITEAM_INFO(INFO_SCORES_, 4, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^TC^TT ^BGteam scores!\n"), "") \
+ MSG_INFO_NOTIF(INFO_SPECTATE_WARNING, 0, 1, f1, XPD("", ""), "", _("^F2You have to become a player within the next %d seconds, otherwise you will be kicked, because spectating isn't allowed at this time!\n"), "") \
+ MSG_INFO_NOTIF(INFO_SUPERWEAPON_BROKEN, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2Superweapons have broken down\n"), "") \
+ MSG_INFO_NOTIF(INFO_SUPERWEAPON_PICKUP, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2You now have a superweapon\n"), "") \
+ MSG_INFO_NOTIF(INFO_SUPERWEAPON_LOST, 0, 0, NO_STR_ARG, XPD("", ""), "", _("^F2Superweapons have been lost\n"), "") \
+ MSG_INFO_NOTIF(INFO_VERSION_BETA, 2, 0, XPD(s1, s2), XPD("", ""), "", _("\{1}^F4NOTE: ^BGThe server is running ^F1Xonotic %s (beta)^BG, you have ^F2Xonotic %s\n"), "") \
+ MSG_INFO_NOTIF(INFO_VERSION_OLD, 2, 0, XPD(s1, s2), XPD("", ""), "", _("\{1}^F4NOTE: ^BGThe server is running ^F1Xonotic %s^BG, you have ^F2Xonotic %s\n"), "") \
+ MSG_INFO_NOTIF(INFO_VERSION_OUTDATED, 2, 0, XPD(s1, s2), XPD("", ""), "", _("\{1}^F4NOTE: ^F1Xonotic %s^BG is out, and you still have ^F2Xonotic %s^BG - get the update from ^F3http://www.xonotic.org/^BG!\n"), "") \
+ MSG_INFO_NOTIF(INFO_WATERMARK, 1, 0, s1, XPD("", ""), "", _("^F4SVQC Build information: ^BG%s\n"), "") \
MSG_INFO_NOTIF(INFO_WEAPON_THINKING_WITH_PORTALS, 1, 1, XPD(s1, SPREE_LOST), XPD(s1, ""), "notify_selfkill", _("^BG%s^K1 is now thinking with portals%s\n"), "") \
MSG_INFO_NOTIF(INFO_WEAPON_CRYLINK_SUICIDE, 1, 1, XPD(s1, SPREE_LOST), XPD(s1, ""), "weaponcrylink", _("^BG%s^K1 felt the strong pull of their Crylink%s\n"), "") \
MSG_INFO_NOTIF(INFO_WEAPON_CRYLINK_MURDER, 2, 1, XPD(s1, s2, SPREE_END), XPD(s2, s1), "weaponcrylink", _("^BG%s^K1 felt the strong pull of ^BG%s^K1's Crylink%s\n"), "") \
#endif
#define MSG_CENTER_NOTIFICATIONS \
MSG_CENTER_NOTIF(CENTER_EMPTY, 0, 0, NO_STR_ARG, NO_CPID, XPD(0, 0), "", "") \
+ MSG_CENTER_NOTIF(CENTER_ASSAULT_ATTACKING, 0, 0, NO_STR_ARG, CPID_ASSAULT_ROLE, XPD(0, 0), _("^BGYou are attacking!"), "") \
+ MSG_CENTER_NOTIF(CENTER_ASSAULT_DEFENDING, 0, 0, NO_STR_ARG, CPID_ASSAULT_ROLE, XPD(0, 0), _("^BGYou are defending!"), "") \
MSG_CENTER_NOTIF(CENTER_CTF_CAPTURESHIELD_SHIELDED, 0, 0, NO_STR_ARG, CPID_CTF_CAPSHIELD, XPD(0, 0), _("^BGYou are now ^F1shielded^BG from the flag\n^BGfor ^F2too many unsuccessful attempts^BG to capture.\n^BGMake some defensive scores before trying again."), "") \
MSG_CENTER_NOTIF(CENTER_CTF_CAPTURESHIELD_FREE, 0, 0, NO_STR_ARG, CPID_CTF_CAPSHIELD, XPD(0, 0), _("^BGYou are now free.\n^BGFeel free to ^F2try to capture^BG the flag again\n^BGif you think you will succeed."), "") \
MULTITEAM_CENTER(CENTER_CTF_PASS_OTHER_, 2, 2, 0, XPD(s1, s2), CPID_CTF_PASS, XPD(0, 0), _("^BG%s^BG passed the ^TC^TT^BG flag to %s"), "") \
MSG_CENTER_NOTIF(CENTER_DEATH_MURDER_TYPEFRAGGED_FIRST_VERBOSE, 1, 3, s1, NO_CPID, XPD(0, 0), _("^K1First victim! You were typefragged by ^BG%s"), _("^K1First casualty! You were scored against by ^BG%s^K1 while typing!")) \
MSG_CENTER_NOTIF(CENTER_DEATH_TEAMKILL_FRAG, 1, 0, s1, NO_CPID, XPD(0, 0), _("^K1Moron! You fragged ^BG%s^K1, a team mate!"), _("^K1Moron! You went against ^BG%sK1, a team mate!")) \
MSG_CENTER_NOTIF(CENTER_DEATH_TEAMKILL_FRAGGED, 1, 0, s1, NO_CPID, XPD(0, 0), _("^K1You were fragged by ^BG%s^K1, a team mate"), _("^K1You were scored against by ^BG%s^K1, a team mate")) \
+ MSG_CENTER_NOTIF(CENTER_DISCONNECT_IDLING, 0, 1, NO_STR_ARG, CPID_IDLING, XPD(0, f1), _("^K1Stop idling!\n^BGDisconnecting in ^COUNT..."), "") \
MULTITEAM_CENTER(CENTER_FREEZETAG_ROUND_WIN_, 4, 0, 0, NO_STR_ARG, NO_CPID, XPD(0, 0), _("^TC^TT^BG team wins the round, all other teams were frozen"), "") \
MSG_CENTER_NOTIF(CENTER_FREEZETAG_SPAWN_LATE, 0, 0, NO_STR_ARG, NO_CPID, XPD(0, 0), _("^K1You spawned after the round started, you'll spawn as frozen"), "") \
MSG_CENTER_NOTIF(CENTER_FREEZETAG_REVIVE, 1, 0, s1, NO_CPID, XPD(0, 0), _("^K3You revived ^BG%s"), "") \
MSG_CENTER_NOTIF(CENTER_KEEPAWAY_DROPPED, 1, 0, s1, CPID_KEEPAWAY, XPD(0, 0), _("^BG%s^BG has dropped the ball!"), "") \
MSG_CENTER_NOTIF(CENTER_KEEPAWAY_PICKUP, 1, 0, s1, CPID_KEEPAWAY, XPD(0, 0), _("^BG%s^BG has picked up the ball!"), "") \
MSG_CENTER_NOTIF(CENTER_KEEPAWAY_WARN, 0, 0, NO_STR_ARG, CPID_KA_WARN, XPD(0, 0), _("^BGKilling people while you don't have the ball gives no points!"), "") \
+ MSG_CENTER_NOTIF(CENTER_LMS_CAMPCHECK, 0, 0, NO_STR_ARG, CPID_LMS_CAMP, XPD(0, 0), _("^K1Don't camp!"), "") \
+ MSG_CENTER_NOTIF(CENTER_JOIN_NOSPAWNS, 0, 0, NO_STR_ARG, CPID_PREVENT_JOIN, XPD(0, 0), _("^K1No spawnpoints available!\nHope your team can fix it..."), "") \
+ MSG_CENTER_NOTIF(CENTER_JOIN_PREVENT, 0, 0, NO_STR_ARG, CPID_PREVENT_JOIN, XPD(0, 0), _("^K1You may not join the game at this time.\nThe player limit reached maximum capacity."), "") \
+ MULTITEAM_CENTER(CENTER_TEAMCHANGE_, 4, 0, 1, NO_STR_ARG, CPID_TEAMCHANGE, XPD(0, f1), _("^BGChanging to ^TC^TT^BG in ^COUNT"), "") \
+ MSG_CENTER_NOTIF(CENTER_TEAMCHANGE_SPECTATE, 0, 1, NO_STR_ARG, CPID_TEAMCHANGE, XPD(0, f1), _("^BGSpectating in ^COUNT"), "") \
+ MSG_CENTER_NOTIF(CENTER_TEAMCHANGE_AUTO, 0, 1, NO_STR_ARG, CPID_TEAMCHANGE, XPD(0, f1), _("^BGChanging team in ^COUNT"), "") \
+ MSG_CENTER_NOTIF(CENTER_TEAMCHANGE_SUICIDE, 0, 1, NO_STR_ARG, CPID_TEAMCHANGE, XPD(0, f1), _("^K1Suicide in ^COUNT"), "") \
MSG_CENTER_NOTIF(CENTER_WEAPON_MARBLES_LOST, 1, 1, XPD(s1, WEAPON_NAME), NO_CPID, XPD(0, 0), _("^K1You lost your marbles against ^BG%s^K1 using the ^BG%s!"), "")
#define MSG_WEAPON_NOTIFICATIONS \
float autocvar_g_lms_campcheck_damage;
float autocvar_g_lms_campcheck_distance;
float autocvar_g_lms_campcheck_interval;
-string autocvar_g_lms_campcheck_message;
float autocvar_g_lms_join_anytime;
float autocvar_g_lms_last_join;
#define autocvar_g_lms_lives_override cvar("g_lms_lives_override")
if(self.killcount != -666) {
if(g_lms) {
- if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0)
- bprint ("^4", self.netname, "^4 has no more lives left\n");
+ if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0 && self.lms_spectate_warning != 2)
+ Send_Notification_Legacy_Wrapper(NOTIF_ANY, world, MSG_INFO, INFO_LMS_NOLIVES, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
else
- bprint ("^4", self.netname, "^4 is spectating now\n"); // TODO turn this into a proper forfeit?
+ Send_Notification_Legacy_Wrapper(NOTIF_ANY, world, MSG_INFO, INFO_LMS_FORFEIT, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
} else
- bprint ("^4", self.netname, "^4 is spectating now\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ANY, world, MSG_INFO, INFO_QUIT_SPECTATE, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
if(self.just_joined == FALSE) {
LogTeamchange(self.playerid, -1, 4);
spot = SelectSpawnPoint (FALSE);
if(!spot)
{
- centerprint(self, "Sorry, no spawnpoints available!\nHope your team can fix it...");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_NOSPAWNS, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
return; // spawn failed
}
if(g_assault) {
if(self.team == assault_attacker_team)
- centerprint(self, "You are attacking!");
+ Send_Notification_Legacy_Wrapper(NOTIF_TEAM, self, MSG_CENTER, CENTER_ASSAULT_ATTACKING, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
else
- centerprint(self, "You are defending!");
+ Send_Notification_Legacy_Wrapper(NOTIF_TEAM, self, MSG_CENTER, CENTER_ASSAULT_DEFENDING, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
target_voicescript_clear(self);
if(g_ca)
self.caplayer = 0;
if(blockSpectators)
- sprint(self, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_SPECTATE_WARNING, NO_STR_ARG, NO_STR_ARG, autocvar_g_maxplayers_spectator_blocktime, NO_FL_ARG, NO_FL_ARG);
PutObserverInServer();
}
else
self.killindicator.colormod = '0 0 0';
if(clienttype(self) == CLIENTTYPE_REAL)
if(self.killindicator.cnt > 0)
- Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "^1Suicide in %d seconds", 1, self.killindicator.cnt);
+ Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_TEAMCHANGE_SUICIDE, NO_STR_ARG, NO_STR_ARG, self.killindicator.cnt, NO_FL_ARG, NO_FL_ARG);
}
else if(targetteam == -1) // auto
{
self.killindicator.colormod = '0 1 0';
if(clienttype(self) == CLIENTTYPE_REAL)
if(self.killindicator.cnt > 0)
- Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "Changing team in %d seconds", 1, self.killindicator.cnt);
+ Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_TEAMCHANGE_AUTO, NO_STR_ARG, NO_STR_ARG, self.killindicator.cnt, NO_FL_ARG, NO_FL_ARG);
}
else if(targetteam == -2) // spectate
{
self.killindicator.colormod = '0.5 0.5 0.5';
if(clienttype(self) == CLIENTTYPE_REAL)
if(self.killindicator.cnt > 0)
- Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, "Spectating in %d seconds", 1, self.killindicator.cnt);
+ Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_TEAMCHANGE_SPECTATE, NO_STR_ARG, NO_STR_ARG, self.killindicator.cnt, NO_FL_ARG, NO_FL_ARG);
}
else
{
self.killindicator.colormod = Team_ColorRGB(targetteam);
if(clienttype(self) == CLIENTTYPE_REAL)
if(self.killindicator.cnt > 0)
- Send_CSQC_Centerprint_Generic(self, CPID_TEAMCHANGE, strcat("^7Changing to ", Team_ColoredFullName(targetteam), "^7 in %d seconds"), 1, self.killindicator.cnt);
+ Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, APP_TEAM_NUM_4(targetteam, CENTER_TEAMCHANGE_), NO_STR_ARG, NO_STR_ARG, self.killindicator.cnt, NO_FL_ARG, NO_FL_ARG);
}
}
DecodeLevelParms();
#ifdef WATERMARK
- sprint(self, strcat("^4SVQC Build information: ^1", WATERMARK, "\n"));
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_WATERMARK, WATERMARK, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
#endif
self.classname = "player_joining";
self.netname_previous = strzone(self.netname);
- bprint("^4", self.netname, "^4 connected");
-
- if(self.classname != "observer" && (g_domination || g_ctf))
- bprint(" and joined the ", Team_ColoredFullName(self.team));
-
- bprint("\n");
+ if((self.classname == STR_PLAYER && teamplay))
+ Send_Notification_Legacy_Wrapper(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_4(self, INFO_JOIN_CONNECT_TEAM_), self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
+ else
+ Send_Notification_Legacy_Wrapper(NOTIF_ANY, world, MSG_INFO, INFO_JOIN_CONNECT, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
stuffcmd(self, strcat(clientstuff, "\n"));
stuffcmd(self, "cl_particles_reloadeffects\n"); // TODO do we still need this?
self.spectatortime = time;
if(blockSpectators)
{
- sprint(self, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_SPECTATE_WARNING, NO_STR_ARG, NO_STR_ARG, autocvar_g_maxplayers_spectator_blocktime, NO_FL_ARG, NO_FL_ARG);
}
self.jointime = time;
if(autocvar_sv_eventlog)
GameLogEcho(strcat(":part:", ftos(self.playerid)));
- bprint ("^4",self.netname);
- bprint ("^4 disconnected\n");
+
+ Send_Notification_Legacy_Wrapper(NOTIF_ANY, world, MSG_INFO, INFO_QUIT_DISCONNECT, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
DropAllRunes(self);
MUTATOR_CALLHOOK(ClientDisconnect);
self.alpha = default_player_alpha;
self.exteriorweaponentity.alpha = default_weapon_alpha;
self.items &~= IT_STRENGTH;
- sprint(self, "^3Invisibility has worn off\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_POWERDOWN_INVISIBILITY, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
else
self.alpha = g_minstagib_invis_alpha;
self.exteriorweaponentity.alpha = g_minstagib_invis_alpha;
self.items |= IT_STRENGTH;
- sprint(self, "^3You are invisible\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_POWERUP_INVISIBILITY, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
if (time > self.invincible_finished)
{
self.items = self.items - (self.items & IT_INVINCIBLE);
- sprint(self, "^3Speed has worn off\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_POWERDOWN_SPEED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
else
if (time < self.invincible_finished)
{
self.items = self.items | IT_INVINCIBLE;
- sprint(self, "^3You are on speed\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_POWERUP_SPEED, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
}
if (time > self.strength_finished)
{
self.items = self.items - (self.items & IT_STRENGTH);
- sprint(self, "^3Strength has worn off\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_POWERDOWN_STRENGTH, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
else
if (time < self.strength_finished)
{
self.items = self.items | IT_STRENGTH;
- sprint(self, "^3Strength infuses your weapons with devastating power\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_POWERUP_STRENGTH, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
if (self.items & IT_INVINCIBLE)
if (time > self.invincible_finished)
{
self.items = self.items - (self.items & IT_INVINCIBLE);
- sprint(self, "^3Shield has worn off\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_POWERDOWN_SHIELD, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
else
if (time < self.invincible_finished)
{
self.items = self.items | IT_INVINCIBLE;
- sprint(self, "^3Shield surrounds you\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_POWERUP_SHIELD, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
if (self.items & IT_SUPERWEAPON)
{
self.superweapons_finished = 0;
self.items = self.items - (self.items & IT_SUPERWEAPON);
- sprint(self, "^3Superweapons have been lost\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_SUPERWEAPON_LOST, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
else if (self.items & IT_UNLIMITED_SUPERWEAPONS)
{
{
self.items = self.items - (self.items & IT_SUPERWEAPON);
WEPSET_ANDNOT_EA(self, WEPBIT_SUPERWEAPONS);
- sprint(self, "^3Superweapons have broken down\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_SUPERWEAPON_BROKEN, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
}
if (time < self.superweapons_finished || (self.items & IT_UNLIMITED_SUPERWEAPONS))
{
self.items = self.items | IT_SUPERWEAPON;
- sprint(self, "^3You now have a superweapon\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_INFO, INFO_SUPERWEAPON_PICKUP, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
else
{
PutClientInServer();
- if(self.classname == "player")
- bprint ("^4", self.netname, "^4 is playing now\n");
+ if(self.classname == STR_PLAYER)
+ Send_Notification_Legacy_Wrapper(NOTIF_ANY, world, MSG_INFO, INFO_JOIN_PLAY, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
if(!autocvar_g_campaign)
if (time < self.jointime + autocvar_welcome_message_time)
if (self.prevent_join_msgtime)
{
- Send_CSQC_Centerprint_Generic_Expire(self, CPID_PREVENT_JOIN);
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
self.prevent_join_msgtime = 0;
}
void checkSpectatorBlock() {
if(self.classname == "spectator" || self.classname == "observer") {
if( time > (self.spectatortime + autocvar_g_maxplayers_spectator_blocktime) ) {
- sprint(self, "^7You were kicked from the server because you are spectator and spectators aren't allowed at the moment.\n");
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_QUIT_KICK_SPECTATING, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
dropclient(self);
}
}
{
// notify release users if connecting to git
dprint("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
- sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", autocvar_g_xonoticversion, " (beta)^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_BETA, autocvar_g_xonoticversion, self.cvar_g_xonoticversion, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
else
{
{
// give users new version
dprint("^1NOTE^7 to ", self.netname, "^7 - ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.org/^1!\n");
- sprint(self, strcat("\{1}^1NOTE: ^3Xonotic ", autocvar_g_xonoticversion, "^7 is out, and you still have ^3Xonotic ", self.cvar_g_xonoticversion, "^1 - get the update from ^4http://www.xonotic.org/^1!\n"));
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_OUTDATED, autocvar_g_xonoticversion, self.cvar_g_xonoticversion, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
else if(r > 0)
{
// notify users about old server version
print("^1NOTE^7 to ", self.netname, "^7 - the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n");
- sprint(self, strcat("\{1}^1NOTE: ^7the server is running ^3Xonotic ", autocvar_g_xonoticversion, "^7, you have ^3Xonotic ", self.cvar_g_xonoticversion, "^1\n"));
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_VERSION_OLD, autocvar_g_xonoticversion, self.cvar_g_xonoticversion, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
}
}
}
// GOD MODE info
if(!(self.flags & FL_GODMODE)) if(self.max_armorvalue)
{
- sprint(self, strcat("godmode saved you ", ftos(self.max_armorvalue), " units of damage, cheater!\n"));
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_GODMODE_OFF, NO_STR_ARG, NO_STR_ARG, self.max_armorvalue, NO_FL_ARG, NO_FL_ARG);
self.max_armorvalue = 0;
}
//sprint(self, "distance: ", ftos(self.lms_traveled_distance), "\n");
if(self.lms_traveled_distance < autocvar_g_lms_campcheck_distance)
{
- centerprint(self, autocvar_g_lms_campcheck_message);
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE, self, MSG_CENTER, CENTER_LMS_CAMPCHECK, NO_STR_ARG, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
// FIXME KadaverJack: gibbing player here causes playermodel to bounce around, instead of eye.md3
// I wasn't able to find out WHY that happens, so I put a workaround in place that shall prevent players from being gibbed :(
Damage(self, self, self, bound(0, autocvar_g_lms_campcheck_damage, self.health + self.armorvalue * autocvar_g_balance_armor_blockpercent + 5), DEATH_CAMP, self.origin, '0 0 0');
{
if (time - self.parm_idlesince < 1) // instead of (time == self.parm_idlesince) to support sv_maxidle <= 10
{
- if(self.idlekick_lasttimeleft)
- {
- Send_CSQC_Centerprint_Generic_Expire(self, CPID_DISCONNECT_IDLING);
- self.idlekick_lasttimeleft = 0;
- }
+ if(self.idlekick_lasttimeleft) { self.idlekick_lasttimeleft = 0; }
}
else
{
if(timeleft == min(10, sv_maxidle - 1)) // - 1 to support sv_maxidle <= 10
{
if(!self.idlekick_lasttimeleft)
- Send_CSQC_Centerprint_Generic(self, CPID_DISCONNECT_IDLING, "^3Stop idling!\n^3Disconnecting in %d seconds...", 1, timeleft);
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_DISCONNECT_IDLING, NO_STR_ARG, NO_STR_ARG, timeleft, NO_FL_ARG, NO_FL_ARG);
}
if(timeleft <= 0)
{
- bprint("^3", self.netname, "^3 was kicked for idling.\n");
- AnnounceTo(self, "terminated");
+ Send_Notification_Legacy_Wrapper(NOTIF_ANY, world, MSG_INFO, INFO_QUIT_KICK_IDLING, self.netname, NO_STR_ARG, NO_FL_ARG, NO_FL_ARG, NO_FL_ARG);
dropclient(self);
return;
}
{
if(self.lms_spectate_warning)
{
+ // for the forfeit message...
+ self.lms_spectate_warning = 2;
// mark player as spectator
PlayerScore_Add(self, SP_LMS_RANK, 666 - PlayerScore_Add(self, SP_LMS_RANK, 0));
}
if(plr.classname == "spectator" || plr.classname == "observer")
{
plr.spectatortime = time;
- sprint(plr, strcat("^7You have to become a player within the next ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds, otherwise you will be kicked, because spectators aren't allowed at this time!\n"));
+ Send_Notification_Legacy_Wrapper(NOTIF_ONE_ONLY, plr, MSG_INFO, INFO_SPECTATE_WARNING, NO_STR_ARG, NO_STR_ARG, autocvar_g_maxplayers_spectator_blocktime, NO_FL_ARG, NO_FL_ARG);
}
}
bprint(strcat("^7All spectators will be automatically kicked when not joining the game after ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds!\n"));