On my servers i punish combatloggers with a 5 minute knockout and an infection... the problem now is, that i found out that the combatlogout-system of dayz doesnt work correctly, sometimes a user combatlogs while the weapon is blinking and the server doesnt notice it...
sometime a user logs out while not in combat since 30 seconds and the server notices a combatlogout. for the players this is realy frustrating... i also would like to set them to death, but if i cant make sure that the system works correctly i cant take this step
I was looking in the code of server_onPlayerDisconnect.sqf:
And then i searched a bit for "time" in the arma2 scripting-wiki:
I gues nearly every server running 35+ players has a lower serverfps then 10, so i gues the client time differs from the server-time (after 1-2 hours of uptime), and this way even if a player isnt in combat anymore, the server compares these values and sees him combatlogging.
I think the only right way to check for a combatlogout is to get both values from the client on disconnect, then compare them... actually the combattime is taken from the client, and compared with the server time, or even a better way would be to set a variable on the client when he is not in combat and just get this variable on disconnect of the client.
Anyone who could help me with this?
sometime a user logs out while not in combat since 30 seconds and the server notices a combatlogout. for the players this is realy frustrating... i also would like to set them to death, but if i cant make sure that the system works correctly i cant take this step
I was looking in the code of server_onPlayerDisconnect.sqf:
Code:
_timeout = _object getVariable["combattimeout",0];
if (((_timeout - time) > 0)) then {
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
};
And then i searched a bit for "time" in the arma2 scripting-wiki:
On overloaded servers (below ~10 server FPS), time readings are unreliable. Seconds actually take longer. While the clients keep a steady tempo, server time lags behind, resulting in considerable offset between client and server time (easily 30 minutes for a 2 hour game). Client time is synchronised to server time during JIP, but other than that it runs independently.
I gues nearly every server running 35+ players has a lower serverfps then 10, so i gues the client time differs from the server-time (after 1-2 hours of uptime), and this way even if a player isnt in combat anymore, the server compares these values and sees him combatlogging.
I think the only right way to check for a combatlogout is to get both values from the client on disconnect, then compare them... actually the combattime is taken from the client, and compared with the server time, or even a better way would be to set a variable on the client when he is not in combat and just get this variable on disconnect of the client.
Anyone who could help me with this?