mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Make server_playerSync exit log more accurate
This will now show INFO instead of ERROR when sync exits while a player is changing clothes.
This commit is contained in:
@@ -19,12 +19,12 @@ _playerObj = nil;
|
|||||||
|
|
||||||
//If playerObj is not in playableUnits then lets exit the disconnect system.
|
//If playerObj is not in playableUnits then lets exit the disconnect system.
|
||||||
if (isNil "_playerObj") exitWith {
|
if (isNil "_playerObj") exitWith {
|
||||||
diag_log format["%1: Exiting. Player is not in playableUnits. _this:%2", __FILE__, _this];
|
diag_log format["INFO: OnPlayerDisconnect exiting. Player is not in playableUnits. %1", _this];
|
||||||
};
|
};
|
||||||
|
|
||||||
//Player object is alive in debug zone. The player most likely just respawned.
|
//Player object is alive in debug zone. The player most likely just respawned.
|
||||||
if (_playerPos distance respawn_west_original < 1500) exitWith {
|
if (_playerPos distance respawn_west_original < 1500) exitWith {
|
||||||
diag_log format["%1: Exiting. Player is near respawn_west. This is normal if the player just died. _this:%2", __FILE__, _this];
|
diag_log format["INFO: OnPlayerDisconnect exiting. Player is near respawn_west. This is normal after death. %1", _this];
|
||||||
if (!isNull _playerObj) then {
|
if (!isNull _playerObj) then {
|
||||||
_playerObj call sched_co_deleteVehicle;
|
_playerObj call sched_co_deleteVehicle;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
private ["_distanceFoot","_playerPos","_lastPos","_playerGear","_medical","_currentModel","_currentAnim",
|
private ["_distanceFoot","_playerPos","_lastPos","_playerGear","_medical","_currentModel","_currentAnim",
|
||||||
"_currentWpn","_muzzles","_array","_coins","_key","_globalCoins","_bankCoins","_playerBackp",
|
"_currentWpn","_muzzles","_array","_coins","_key","_globalCoins","_bankCoins","_playerBackp","_exitReason",
|
||||||
"_backpack","_kills","_killsB","_killsH","_headShots","_humanity","_lastTime","_timeGross","_timeSince",
|
"_backpack","_kills","_killsB","_killsH","_headShots","_humanity","_lastTime","_timeGross","_timeSince",
|
||||||
"_timeLeft","_config","_onLadder","_isTerminal","_modelChk","_temp","_currentState","_character",
|
"_timeLeft","_config","_onLadder","_isTerminal","_modelChk","_temp","_currentState","_character",
|
||||||
"_magazines","_characterID","_charPos","_isInVehicle","_name","_inDebug","_newPos","_count","_maxDist","_relocate","_playerUID"];
|
"_magazines","_characterID","_charPos","_isInVehicle","_name","_inDebug","_newPos","_count","_maxDist","_relocate","_playerUID"];
|
||||||
@@ -16,20 +16,16 @@ _humanity = 0;
|
|||||||
_name = if (alive _character) then {name _character} else {"Dead Player"};
|
_name = if (alive _character) then {name _character} else {"Dead Player"};
|
||||||
_inDebug = (respawn_west_original distance _charPos) < 1500;
|
_inDebug = (respawn_west_original distance _charPos) < 1500;
|
||||||
|
|
||||||
if (_character isKindOf "Animal") exitWith {
|
_exitReason = switch true do {
|
||||||
diag_log ("ERROR: Cannot Sync Character " + _name + " is an Animal class");
|
case (isNil "_characterID"): {("ERROR: Cannot Sync Character " + _name + " has nil characterID")}; //Unit is null
|
||||||
|
case (_inDebug): {format["INFO: Cannot Sync Character %1 near respawn_west %2. This is normal when relogging or changing clothes.",_name,_charPos]};
|
||||||
|
case (_characterID == "0"): {("ERROR: Cannot Sync Character " + _name + " has no characterID")};
|
||||||
|
case (_character isKindOf "Animal"): {("ERROR: Cannot Sync Character " + _name + " is an Animal class")};
|
||||||
|
default {"none"};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isNil "_characterID") exitWith {
|
if (_exitReason != "none") exitWith {
|
||||||
diag_log ("ERROR: Cannot Sync Character " + _name + " has nil characterID");
|
diag_log _exitReason;
|
||||||
};
|
|
||||||
|
|
||||||
if (_characterID == "0" or _inDebug) exitWith {
|
|
||||||
if (_inDebug) then {
|
|
||||||
diag_log format["INFO: server_playerSync: Cannot Sync Player %1 [%2]. Position in debug! %3. This is normal when respawning, relogging and changing clothes.",_name,_characterID,_charPos];
|
|
||||||
} else {
|
|
||||||
diag_log ("ERROR: Cannot Sync Character " + _name + " as no characterID");
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//Check for player initiated updates
|
//Check for player initiated updates
|
||||||
|
|||||||
Reference in New Issue
Block a user