#include <common/effects/qc/globalsound.qh>
#include <common/ent_cs.qh>
#include <common/gamemodes/_mod.qh>
+#include <common/gamemodes/gamemode/lms/sv_lms.qh>
#include <common/gamemodes/gamemode/nexball/sv_nexball.qh>
#include <common/items/_mod.qh>
#include <common/items/inventory.qh>
this.respawn_flags = 0;
this.respawn_time = 0;
STAT(RESPAWN_TIME, this) = 0;
- bool q3dfcompat = autocvar_sv_q3defragcompat && autocvar_sv_q3defragcompat_changehitbox;
- this.scale = ((q3dfcompat) ? 0.9 : autocvar_sv_player_scale);
+ this.scale = ((q3compat && autocvar_sv_q3compat_changehitbox) ? 0.9 : autocvar_sv_player_scale);
this.fade_time = 0;
this.pain_finished = 0;
this.pushltime = 0;
return s;
}
-bool autocvar_sv_qcphysics = true; // TODO this is for testing - remove when qcphysics work
-
/**
=============
ClientConnect
int totalClients = 0;
if(autocvar_sv_maxidle > 0 && autocvar_sv_maxidle_slots > 0)
{
- FOREACH_CLIENT(IS_REAL_CLIENT(it) || autocvar_sv_maxidle_slots_countbots,
+ // maxidle disabled in local matches by not counting clients (totalClients 0)
+ if (server_is_dedicated)
+ {
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) || autocvar_sv_maxidle_slots_countbots,
+ {
+ ++totalClients;
+ });
+ if (maxclients - totalClients > autocvar_sv_maxidle_slots)
+ totalClients = 0;
+ }
+ }
+ else if (IS_PLAYER(this) && autocvar_sv_maxidle_playertospectator > 0)
+ {
+ FOREACH_CLIENT(IS_REAL_CLIENT(it),
{
++totalClients;
});
}
- if (autocvar_sv_maxidle > 0 && autocvar_sv_maxidle_slots > 0 && (maxclients - totalClients) > autocvar_sv_maxidle_slots)
- { /* do nothing */ }
+ if (totalClients < autocvar_sv_maxidle_minplayers)
+ {
+ // idle kick disabled
+ CS(this).parm_idlesince = time;
+ }
else if (time - CS(this).parm_idlesince < 1) // instead of (time == this.parm_idlesince) to support sv_maxidle <= 10
{
if (CS(this).idlekick_lasttimeleft)
Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_MOVETOSPEC_IDLING, this.netname, maxidle_time);
if (this.caplayer)
this.caplayer = 0;
+ this.lms_spectate_warning = 2; // TODO: mutator hook for players forcibly moved to spectator?
PutObserverInServer(this);
}
else