diff --git a/SQF/dayz_code/system/player_spawn_2.sqf b/SQF/dayz_code/system/player_spawn_2.sqf index d7c0d452d..ed997d4a4 100644 --- a/SQF/dayz_code/system/player_spawn_2.sqf +++ b/SQF/dayz_code/system/player_spawn_2.sqf @@ -360,15 +360,14 @@ while {1 == 1} do { _startcombattimer = player getVariable["startcombattimer", 0]; if (_startcombattimer == 1 || _PlayerNearby) then { - player setVariable["combattimeout", diag_tickTime + 30, true]; // Global used to punish combat log in server_onPlayerDisconnect + player setVariable["combattimeout", diag_tickTime + 30, false]; player setVariable["startcombattimer", 0, false]; } else { if (_ZedsNearby && !_isPZombie) then { - player setVariable["combattimeout", diag_tickTime + 10, true]; // Global used to punish combat log in server_onPlayerDisconnect + player setVariable["combattimeout", diag_tickTime + 10, false]; player setVariable["startcombattimer", 0, false]; }; }; - //setGroupIconsVisible [false,false]; //clearGroupIcons group player; @@ -451,4 +450,4 @@ while {1 == 1} do { _timerMonitor = diag_ticktime; }; */ -}; \ No newline at end of file +}; diff --git a/SQF/dayz_server/compile/server_onPlayerDisconnect.sqf b/SQF/dayz_server/compile/server_onPlayerDisconnect.sqf index 51e5bde67..203f620a8 100644 --- a/SQF/dayz_server/compile/server_onPlayerDisconnect.sqf +++ b/SQF/dayz_server/compile/server_onPlayerDisconnect.sqf @@ -61,13 +61,12 @@ if (_characterID != "?") exitwith { }; //Punish combat log - _timeout = _playerObj getVariable["combattimeout",0]; - if (_timeout >= diag_tickTime) then { + if ((_lastDamage > 5 && {_lastDamage < 30}) && {alive _playerObj && (_playerObj distance (getMarkerpos "respawn_west") >= 2000)}) then { _playerObj setVariable ["NORRN_unconscious",true,true]; // Set status to unconscious _playerObj setVariable ["unconsciousTime",150,true]; // Set knock out timer to 150 seconds //_playerObj setVariable ["USEC_injured",true]; // Set status to bleeding //_playerObj setVariable ["USEC_BloodQty",3000]; // Set blood to 3000 - diag_log format["PLAYER COMBAT LOGGED: %1(%4) (with %2s combat time remaining) at location %3",_playerName,(_timeout - diag_tickTime),_playerPos,_playerUID]; + diag_log format["PLAYER COMBAT LOGGED: %1(%4) (with %2s combat time remaining) at location %3",_playerName,_lastDamage,_playerPos,_playerUID]; _message = format["PLAYER COMBAT LOGGED: %1",_playerName]; [nil, nil, rTitleText, _message, "PLAIN"] call RE; // Message whole server };