-Mon May 3 07:23:38 CEST 2021
+Wed May 12 07:23:45 CEST 2021
# Translators:
# nad le <nadavlevi726@gmail.com>, 2018
# Omer I.S., 2020
-# Omer I.S. <omeritzicschwartz@gmail.com>, 2020
-# Omer I.S. <omeritzicschwartz@gmail.com>, 2020
+# Omeritzics Games <omeritzicschwartz@gmail.com>, 2020
+# Omeritzics Games <omeritzicschwartz@gmail.com>, 2020
# Roi Asher Gerszkoviez <gerszkoviez@gmail.com>, 2020
# Tal Leibman <leibman2@gmail.com>, 2019
msgid ""
seta hud_panel_centerprint_fontscale "1"
seta hud_panel_centerprint_fontscale_bold "1.4"
seta hud_panel_centerprint_time "3"
-seta hud_panel_centerprint_fade_in "0.2"
-seta hud_panel_centerprint_fade_out "0.5"
+seta hud_panel_centerprint_fade_in "0.15"
+seta hud_panel_centerprint_fade_out "0.15"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
seta hud_panel_centerprint_fontscale "1"
seta hud_panel_centerprint_fontscale_bold "1.4"
seta hud_panel_centerprint_time "3"
-seta hud_panel_centerprint_fade_in "0.2"
-seta hud_panel_centerprint_fade_out "0.5"
+seta hud_panel_centerprint_fade_in "0.15"
+seta hud_panel_centerprint_fade_out "0.15"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
seta hud_panel_centerprint_fontscale "1"
seta hud_panel_centerprint_fontscale_bold "1.4"
seta hud_panel_centerprint_time "3"
-seta hud_panel_centerprint_fade_in "0.2"
-seta hud_panel_centerprint_fade_out "0.5"
+seta hud_panel_centerprint_fade_in "0.15"
+seta hud_panel_centerprint_fade_out "0.15"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
seta hud_panel_centerprint_fontscale "1"
seta hud_panel_centerprint_fontscale_bold "1.4"
seta hud_panel_centerprint_time "3"
-seta hud_panel_centerprint_fade_in "0.2"
-seta hud_panel_centerprint_fade_out "0.5"
+seta hud_panel_centerprint_fade_in "0.15"
+seta hud_panel_centerprint_fade_out "0.15"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
seta hud_panel_centerprint_fontscale "1"
seta hud_panel_centerprint_fontscale_bold "1.4"
seta hud_panel_centerprint_time "3"
-seta hud_panel_centerprint_fade_in "0.2"
-seta hud_panel_centerprint_fade_out "0.5"
+seta hud_panel_centerprint_fade_in "0.15"
+seta hud_panel_centerprint_fade_out "0.15"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
seta hud_panel_centerprint_fontscale "1"
seta hud_panel_centerprint_fontscale_bold "1.4"
seta hud_panel_centerprint_time "3"
-seta hud_panel_centerprint_fade_in "0.2"
-seta hud_panel_centerprint_fade_out "0.5"
+seta hud_panel_centerprint_fade_in "0.15"
+seta hud_panel_centerprint_fade_out "0.15"
seta hud_panel_centerprint_fade_subsequent "1"
seta hud_panel_centerprint_fade_subsequent_passone "3"
seta hud_panel_centerprint_fade_subsequent_passone_minalpha "0.5"
// ** ** //
// ********************************************** //
-// MSG_ANNCE notifications (count = 90):
+// MSG_ANNCE notifications (count = 80):
seta notification_ANNCE_ACHIEVEMENT_AIRSHOT "1" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_ACHIEVEMENT_AMAZING "1" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_ACHIEVEMENT_AWESOME "1" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_NUM_GAMESTART_7 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_NUM_GAMESTART_8 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_NUM_GAMESTART_9 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_1 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_10 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_2 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_3 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_4 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_5 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_6 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_7 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_8 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
-seta notification_ANNCE_NUM_IDLE_9 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_NUM_KILL_1 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_NUM_KILL_10 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_ANNCE_NUM_KILL_2 "0" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled"
seta notification_errors_are_fatal "1" "If a notification fails upon initialization, cause a Host_Error to stop the program"
seta notification_item_centerprinttime "1.5" "How long to show item information centerprint messages (like 'You got the Electro' or such)"
seta notification_lifetime_mapload "10" "Amount of time that notification entities last immediately at mapload (in seconds) to help prevent notifications from being lost on early init (like gamestart countdown)"
-seta notification_lifetime_runtime "0.5" "Amount of time that notification entities last on the server during runtime (in seconds)"
+seta notification_lifetime_runtime "0.5" "Amount of time that notification entities last on the server during runtime (In seconds)"
seta notification_server_allows_location "1" "Server side cvar for allowing death messages to show location information too"
seta notification_show_location "0" "Append location information to MSG_INFO death/kill messages"
seta notification_show_location_string "" "Replacement string piped into sprintf, so you can do different messages like this: ' at the %s' or ' (near %s)'"
seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
-// Notification counts (total = 849): MSG_ANNCE = 90, MSG_INFO = 334, MSG_CENTER = 241, MSG_MULTI = 156, MSG_CHOICE = 28
+// Notification counts (total = 839): MSG_ANNCE = 80, MSG_INFO = 334, MSG_CENTER = 241, MSG_MULTI = 156, MSG_CHOICE = 28
bool autocvar_hud_panel_centerprint;
float autocvar_hud_panel_centerprint_align;
-float autocvar_hud_panel_centerprint_fade_in = 0.2;
-float autocvar_hud_panel_centerprint_fade_out = 0.5;
+float autocvar_hud_panel_centerprint_fade_in = 0.15;
+float autocvar_hud_panel_centerprint_fade_out = 0.15;
float autocvar_hud_panel_centerprint_fade_subsequent = 1;
float autocvar_hud_panel_centerprint_fade_subsequent_passone = 3;
float autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha = 0.5;
if (teamkills >= autocvar_g_kick_teamkiller_lower_limit &&
teamkills >= autocvar_g_kick_teamkiller_rate*playtime/60.0)
{
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_KICK_TEAMKILL, attacker.netname);
- dropclient(attacker);
+ if (dropclient_schedule(attacker))
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_KICK_TEAMKILL, attacker.netname);
}
}
MSG_ANNCE_NOTIF(NUM_GAMESTART_9, N___NEVER, "9", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
MSG_ANNCE_NOTIF(NUM_GAMESTART_10, N___NEVER, "10", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_1, N___NEVER, "1", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_2, N___NEVER, "2", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_3, N___NEVER, "3", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_4, N___NEVER, "4", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_5, N___NEVER, "5", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_6, N___NEVER, "6", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_7, N___NEVER, "7", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_8, N___NEVER, "8", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_9, N___NEVER, "9", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
- MSG_ANNCE_NOTIF(NUM_IDLE_10, N___NEVER, "10", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
-
MSG_ANNCE_NOTIF(NUM_KILL_1, N___NEVER, "1", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
MSG_ANNCE_NOTIF(NUM_KILL_2, N___NEVER, "2", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
MSG_ANNCE_NOTIF(NUM_KILL_3, N___NEVER, "3", CH_INFO, VOL_BASEVOICE, ATTEN_NONE)
MSG_INFO_NOTIF(POWERUP_STRENGTH, N_CONSOLE, 1, 0, "s1", "s1", "strength", _("^BG%s^K1 picked up Strength"), "")
MSG_INFO_NOTIF(QUIT_DISCONNECT, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 disconnected"), "")
- MSG_INFO_NOTIF(QUIT_KICK_IDLING, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 was kicked for idling"), "")
- MSG_INFO_NOTIF(MOVETOSPEC_IDLING, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 was moved to spectator for idling"), "")
+ MSG_INFO_NOTIF(QUIT_KICK_IDLING, N_CHATCON, 1, 1, "s1 f1", "", "", _("^BG%s^F3 was kicked after idling for %s seconds"), "")
+ MSG_INFO_NOTIF(MOVETOSPEC_IDLING, N_CHATCON, 1, 1, "s1 f1", "", "", _("^BG%s^F3 was moved to^BG spectators^F3 after idling for %s seconds"), "")
MSG_INFO_NOTIF(QUIT_KICK_SPECTATING, N_CONSOLE, 0, 0, "", "", "", _("^F2You were kicked from the server because you are a spectator and spectators aren't allowed at the moment."), "")
MSG_INFO_NOTIF(QUIT_KICK_TEAMKILL, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 was kicked for excessive teamkilling"), "")
- MSG_INFO_NOTIF(QUIT_SPECTATE, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 is now spectating"), "")
+ MSG_INFO_NOTIF(QUIT_SPECTATE, N_CHATCON, 1, 0, "s1", "", "", _("^BG%s^F3 is now^BG spectating"), "")
MSG_INFO_NOTIF(RACE_ABANDONED, N_CONSOLE, 1, 0, "s1", "", "", _("^BG%s^BG has abandoned the race"), "")
MSG_INFO_NOTIF(RACE_FAIL_RANKED, N_CONSOLE, 1, 3, "s1 race_col f1ord race_col f3race_time race_diff", "s1 f3race_time", "race_newfail", _("^BG%s^BG couldn't break their %s%s^BG place record of %s%s %s"), "")
MSG_CENTER_NOTIF(DEATH_TEAMKILL_FRAGGED, N_ENABLE, 1, 0, "s1", CPID_Null, "0 0", strcat(BOLD_OPERATOR, _("^K1You were team killed by ^BG%s")), strcat(BOLD_OPERATOR, _("^K1You were betrayed by team mate ^BG%s")))
MSG_CENTER_NOTIF(DISCONNECT_IDLING, N_ENABLE, 0, 1, "", CPID_IDLING, "1 f1", strcat(BOLD_OPERATOR, _("^K1Stop idling!\n^BGDisconnecting in ^COUNT...")), "")
- MSG_CENTER_NOTIF(MOVETOSPEC_IDLING, N_ENABLE, 0, 1, "", CPID_IDLING, "1 f1", strcat(BOLD_OPERATOR, _("^K1Stop idling!\n^BGMoving to spectator in ^COUNT...")), "")
+ MSG_CENTER_NOTIF(MOVETOSPEC_IDLING, N_ENABLE, 0, 1, "", CPID_IDLING, "1 f1", strcat(BOLD_OPERATOR, _("^K1Stop idling!\n^BGMoving to spectators in ^COUNT...")), "")
MSG_CENTER_NOTIF(DOOR_LOCKED_NEED, N_ENABLE, 1, 0, "s1", CPID_Null, "0 0", _("^BGYou need %s^BG!"), "")
MSG_CENTER_NOTIF(DOOR_LOCKED_ALSONEED, N_ENABLE, 1, 0, "s1", CPID_Null, "0 0", _("^BGYou also need %s^BG!"), "")
SOUND(SPAWN, "misc/spawn");
SOUND(TALK, "misc/talk");
+SOUND(TALK2, "misc/talk2");
SOUND(TELEPORT, "misc/teleport");
}
break;
}
- case CNT_IDLE:
- {
- switch(num)
- {
- case 10: return ANNCE_NUM_IDLE_10;
- case 9: return ANNCE_NUM_IDLE_9;
- case 8: return ANNCE_NUM_IDLE_8;
- case 7: return ANNCE_NUM_IDLE_7;
- case 6: return ANNCE_NUM_IDLE_6;
- case 5: return ANNCE_NUM_IDLE_5;
- case 4: return ANNCE_NUM_IDLE_4;
- case 3: return ANNCE_NUM_IDLE_3;
- case 2: return ANNCE_NUM_IDLE_2;
- case 1: return ANNCE_NUM_IDLE_1;
- }
- break;
- }
case CNT_KILL:
{
switch(num)
#ifdef GAMEQC
const int CNT_NORMAL = 1;
const int CNT_GAMESTART = 2;
-const int CNT_IDLE = 3;
+//const int CNT_IDLE = 3;
const int CNT_KILL = 4;
const int CNT_RESPAWN = 5;
const int CNT_ROUNDSTART = 6;
vector vehicleHud_Size;
vector vehicleHud_Pos;
-void RaptorCBShellfragDraw(entity this);
-void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang);
-
#define weapon2mode STAT(VEHICLESTAT_W2MODE)
float autocvar_g_vehicle_raptor_flare_chase = 0.9;
float autocvar_g_vehicle_raptor_flare_range = 2000;
#endif
+
+#ifdef CSQC
+void RaptorCBShellfragDraw(entity this);
+void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang);
+#endif
if (IS_PLAYER(this))
{
- if (autocvar_sv_maxidle_playertospectator > 0 && CS(this).idlekick_lasttimeleft)
- {
- Kill_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CPID_IDLING);
- CS(this).idlekick_lasttimeleft = 0;
- CS(this).parm_idlesince = time;
- }
-
if(GetResource(this, RES_HEALTH) >= 1)
{
// despawn effect
&& (IS_SPEC(this) || IS_OBSERVER(this)) && !this.caplayer
&& time > (CS(this).spectatortime + autocvar_g_maxplayers_spectator_blocktime))
{
- Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_QUIT_KICK_SPECTATING);
- dropclient(this);
- return;
+ if (dropclient_schedule(this))
+ Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_QUIT_KICK_SPECTATING);
}
}
if (autocvar_sv_maxidle > 0 || (IS_PLAYER(this) && autocvar_sv_maxidle_playertospectator > 0))
if (frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
if (IS_REAL_CLIENT(this))
- if (IS_PLAYER(this) || autocvar_sv_maxidle_spectatorsareidle)
+ if (IS_PLAYER(this) || autocvar_sv_maxidle_alsokickspectators)
+ if (!intermission_running) // NextLevel() kills all centerprints after setting this true
{
int totalClients = 0;
if(autocvar_sv_maxidle > 0 && autocvar_sv_maxidle_slots > 0)
if (IS_PLAYER(this) && autocvar_sv_maxidle_playertospectator > 0)
maxidle_time = autocvar_sv_maxidle_playertospectator;
float timeleft = ceil(maxidle_time - (time - CS(this).parm_idlesince));
- if (timeleft == min(10, maxidle_time - 1)) { // - 1 to support maxidle_time <= 10
- if (!CS(this).idlekick_lasttimeleft)
- {
- if (IS_PLAYER(this) && autocvar_sv_maxidle_playertospectator > 0)
- Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_MOVETOSPEC_IDLING, timeleft);
- else
- Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_DISCONNECT_IDLING, timeleft);
- }
+ float countdown_time = max(min(10, maxidle_time - 1), ceil(maxidle_time * 0.33)); // - 1 to support maxidle_time <= 10
+ if (timeleft == countdown_time && !CS(this).idlekick_lasttimeleft)
+ {
+ if (IS_PLAYER(this) && autocvar_sv_maxidle_playertospectator > 0)
+ Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_MOVETOSPEC_IDLING, timeleft);
+ else
+ Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_DISCONNECT_IDLING, timeleft);
}
if (timeleft <= 0) {
if (IS_PLAYER(this) && autocvar_sv_maxidle_playertospectator > 0)
{
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_MOVETOSPEC_IDLING, this.netname);
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_MOVETOSPEC_IDLING, this.netname, maxidle_time);
if (this.caplayer)
this.caplayer = 0;
PutObserverInServer(this);
- CS(this).parm_idlesince = time;
}
else
{
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_KICK_IDLING, this.netname);
- dropclient(this);
+ if (dropclient_schedule(this))
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_KICK_IDLING, this.netname, maxidle_time);
}
return;
}
- else if (timeleft <= 10) {
+ else if (timeleft <= countdown_time) {
if (timeleft != CS(this).idlekick_lasttimeleft)
- Send_Notification(NOTIF_ONE, this, MSG_ANNCE, Announcer_PickNumber(CNT_IDLE, timeleft));
+ play2(this, SND(TALK2));
CS(this).idlekick_lasttimeleft = timeleft;
}
}
string autocvar_g_mutatormsg;
float autocvar_sv_foginterval;
float autocvar_sv_maxidle;
-float autocvar_sv_maxidle_playertospectator;
-bool autocvar_sv_maxidle_spectatorsareidle;
+float autocvar_sv_maxidle_playertospectator = 60;
+bool autocvar_sv_maxidle_alsokickspectators;
int autocvar_sv_maxidle_slots;
bool autocvar_sv_maxidle_slots_countbots;
bool autocvar_g_forced_respawn;
#include <server/weapons/csqcprojectile.qh>
#include <server/world.qh>
+void dropclient_do(entity this)
+{
+ if (this.owner)
+ dropclient(this.owner);
+ delete(this);
+}
+/**
+ * Schedules dropclient for a player and returns true;
+ * if dropclient is already scheduled (for that player) it does nothing and returns false.
+ *
+ * NOTE: this function exists only to allow sending a message to the kicked player with
+ * Send_Notification, which doesn't work if called together with dropclient
+ */
+bool dropclient_schedule(entity this)
+{
+ bool scheduled = false;
+ FOREACH_ENTITY_CLASS("dropclient_handler", true,
+ {
+ if(it.owner == this)
+ {
+ scheduled = true;
+ break; // can't use return here, compiler shows a warning
+ }
+ });
+ if (scheduled)
+ return false;
+
+ entity e = new_pure(dropclient_handler);
+ setthink(e, dropclient_do);
+ e.owner = this;
+ e.nextthink = time + 0.1;
+ return true;
+}
+
void CreatureFrame_hotliquids(entity this)
{
if (this.contents_damagetime >= time)
#define autocvar_slowmo cvar("slowmo")
float autocvar_sys_ticrate;
+bool dropclient_schedule(entity this);
+
/** print(), but only print if the server is not local */
void dedicated_print(string input);
bool SetPlayerTeam(entity player, int team_index, int type)
{
int old_team_index = Entity_GetTeamIndex(player);
+
if (!Player_SetTeamIndex(player, team_index))
- {
return false;
- }
+
LogTeamChange(player.playerid, player.team, type);
+
if (team_index != old_team_index)
{
- PlayerScore_Clear(player);
- if (team_index != -1)
- {
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(
- player.team, INFO_JOIN_PLAY_TEAM), player.netname);
- }
- else
- {
- if (!CS(player).just_joined)
- {
- Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE,
- player.netname);
- }
- }
KillPlayerForTeamChange(player);
+ PlayerScore_Clear(player);
+ CS(player).parm_idlesince = time;
+
if (!IS_BOT_CLIENT(player))
- {
TeamBalance_AutoBalanceBots();
- }
+
+ if (team_index != -1)
+ Send_Notification(NOTIF_ALL, NULL, MSG_INFO, APP_TEAM_NUM(player.team, INFO_JOIN_PLAY_TEAM), player.netname);
}
- else if (team_index == -1)
+
+ if (team_index == -1)
{
- if (!CS(player).just_joined && player.frags != FRAGS_SPECTATOR)
+ if (autocvar_sv_maxidle_playertospectator > 0 && CS(player).idlekick_lasttimeleft)
+ {
+ // this done here so it happens even when manually speccing during the countdown
+ Kill_Notification(NOTIF_ONE_ONLY, player, MSG_CENTER, CPID_IDLING);
+ CS(player).idlekick_lasttimeleft = 0;
+ }
+ else if (!CS(player).just_joined && player.frags != FRAGS_SPECTATOR)
+ {
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_SPECTATE, player.netname);
+ }
}
+
return true;
}
BADPREFIX("skill_");
BADPREFIX("sv_allow_");
BADPREFIX("sv_cullentities_");
- BADPREFIX("sv_maxidle_");
+ BADPREFIX("sv_maxidle");
BADPREFIX("sv_minigames_");
BADPREFIX("sv_radio_");
BADPREFIX("sv_timeout_");
BADCVAR("sv_defaultplayercolors");
BADCVAR("sv_defaultplayermodel");
BADCVAR("sv_defaultplayerskin");
- BADCVAR("sv_maxidle");
BADCVAR("sv_maxrate");
BADCVAR("sv_motd");
BADCVAR("sv_public");
set sv_foginterval 1 "force enable fog in regular intervals"
set sv_maxidle 0 "kick players idle for more than this amount of time in seconds"
-set sv_maxidle_spectatorsareidle 0 "when sv_maxidle is not 0, assume spectators are idle too"
+set sv_maxidle_alsokickspectators 1 "when sv_maxidle is > 0, kick idle spectators as well as players"
set sv_maxidle_slots 0 "when not 0, only kick idlers when this many or less player slots are available"
set sv_maxidle_slots_countbots 1 "count bots as player slots"
-set sv_maxidle_playertospectator 0 "move players idle for more than this amount of time in seconds to spectators (sv_maxidle timer starts again after sv_maxidle_playertospectator has moved a player to spectators)"
+set sv_maxidle_playertospectator 60 "move players idle for more than this amount of time in seconds to spectators (sv_maxidle timer starts again after sv_maxidle_playertospectator has moved a player to spectators)"
sv_allowdownloads_inarchive 1 // for csprogs.dat
sv_allowdownloads 0 // download protocol is evil