Open MasteRs-git opened 11 years ago
It's already existing, I think. Check _svtimeout (server side) and _cltimeout (client side).
Well, sv_timeout also controls other functions plus this cvar is on both sides. I think separate server side cvar will be the best variant.
mp_autokick_timeout cvar will be added to next beta update, when set it will let you control the timeout (in seconds) for idle.
When mp_autokick_timeout cvar will be available?
As soon as next beta update come out. ;)
Already are out.
New beta update released, still not included.
It is in the last beta update, and the one from today. If you are using steamcmd to update make sure you have the right command line to get the beta release.
BUILD 6004, mp_autokick_timeout cvar not available.
] version Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) Exe build: 17:27:00 Apr 4 2013 (6006) ] mp_autokick_timeout "mp_autokick_timeout" is "-1"
When this update are going to be included in dedicated server? I am seeing 6004 as latest BUILD. Only client got update.
@alfred-valve there's definitely something wrong
] version
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 17:27:00 Apr 4 2013 (6006)
] mp_autokick_timeout
] mp_autokick_timeout
] mp_autokick_timeout 1
] mp_autokick_timeout
the latest available hlds
] version
Protocol version 48
Exe version 1.1.2.7 (cstrike)
Exe build: 10:15:23 Apr 3 2013 (6004)
] mp_autokick
"mp_autokick" is "1"
] mp_autokick_timeout
] mp_autokick_timeout
Huh... I can't access mp_autokicktimeout in HLDS because of old version and I can't access most of mp* cvars in client until I create a listen server:
@MaxKorz , this is by design, the games server.dll isn't loaded until you create a server. I'll dig into the hlds not getting the beta cs bits.
@MasteRs-git , I see the issue, it looks like the steamcmd tool isn't correctly opting into the beta feed for Counter-Strike, we will work on a fix for the tool.
@alfred-valve Hmm, seems that idle kicking isn't working. I have set mp_autokick_timeout to 30, but even after 2 mins in idle I am still in server. BUILD 6027 (client and server). Server - running Centos 6.3. Client - running Windows Server 2012.
Really? Nobody are going to take a look?
BUMP. Feature is still not working how it's supposed to.
This is buggy. When the afk player dies, his pdata 124 (m_flLastActivityTime) is updated because his last button is set to IN_SCORE at that time. So the the players wont be kicked unless if he didn't get killed during his afk time. So the solution is not to set IN_SCORE button at when a player dies.
@alfred-valve Please look into this.
It is not m_afButtonLast, m_afButtonLast is only updated with pev->button value in CBasePlayer::PostThink.
Seems that during dying process, pev->button contains IN_SCORE even if player is not holding it in pfnCmdStart, cmd.buttons also contains IN_SCORE so the problem doesn't seems to come from dll. You should investigate in the engine or in client.
Or rather that searching the cause, you could do something as it is done is PlayerPreThink [edit : sorry, i meant PlayerDeathThink], not considering IN_SCORE since it is only used on client, so, prethink looks to something like that :
void CBasePlayer::PreThink(void) { int buttonsChanged = (m_afButtonLast ^ pev->button); // These buttons have changed this frame if ( buttonsChanged ) { m_fLastMovement = gpGlobals->time; }
You could do something like that :
void CBasePlayer::PreThink(void) { int buttonsChanged = (m_afButtonLast ^ pev->button) & ~IN_SCORE; // These buttons have changed this frame if ( buttonsChanged ) { m_fLastMovement = gpGlobals->time; }
@alfred-valve hello, players wont be kicked if he get killed during his afk time. please fix. thx
Add cvar to control idle time before player gets kick. Idle detection mechanism also need to be tweaked for better detection. As I know there is only mp_autokick cvar.