mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
added back debug
This commit is contained in:
@@ -18,19 +18,16 @@ if ((_timeout - time) > 0) then {
|
||||
|
||||
_object setVariable["NORRN_unconscious",true, true];
|
||||
_object setVariable["unconsciousTime",300,true];
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
|
||||
diag_log format["COMBAT LOGGED: %1 (%2)", _playerName,_timeout];
|
||||
//diag_log format["SET UNCONCIOUSNESS: %1", _playerName];
|
||||
#endif
|
||||
|
||||
|
||||
// Message whole server when player combat logs
|
||||
_message = format["PLAYER COMBAT LOGGED: %1",_playerName];
|
||||
[nil,nil,"per",rTITLETEXT,_message,"PLAIN DOWN"] call RE;
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log format["DISCONNECT: %1 (%2) Object: %3, _characterID: %4", _playerName,_playerID,_object,_characterID];
|
||||
#endif
|
||||
|
||||
_id = [_playerID,_characterID,2] spawn dayz_recordLogin;
|
||||
dayz_disco = dayz_disco - [_playerID];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
private ["_isInfected","_doLoop","_hiveVer","_isHiveOk","_playerID","_playerObj","_primary","_key","_charID","_playerName","_backpack","_isNew","_inventory","_survival","_model","_mags","_wpns","_bcpk","_config","_newPlayer"];
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("STARTING LOGIN: " + str(_this));
|
||||
#endif
|
||||
|
||||
@@ -11,7 +11,7 @@ _playerName = name _playerObj;
|
||||
if (_playerName == '__SERVER__' || _playerID == '' || local player) exitWith {};
|
||||
|
||||
if (isNil "sm_done") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("Login cancelled, server is not ready. " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
@@ -32,12 +32,12 @@ if (_playerID == "") then {
|
||||
};
|
||||
|
||||
if ((_playerID == "") or (isNil "_playerID")) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ if (isNull _playerObj or !isPlayer _playerObj) exitWith {
|
||||
};
|
||||
|
||||
if ((_primary select 0) == "ERROR") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log format ["LOGIN RESULT: Exiting, failed to load _primary: %1 for player: %2 ",_primary,_playerID];
|
||||
#endif
|
||||
};
|
||||
@@ -71,7 +71,7 @@ _newPlayer = _primary select 1;
|
||||
_isNew = count _primary < 7; //_result select 1;
|
||||
_charID = _primary select 2;
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("LOGIN RESULT: " + str(_primary));
|
||||
#endif
|
||||
|
||||
@@ -127,7 +127,7 @@ if (!_isNew) then {
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_LOGIN
|
||||
#ifdef DZE_SERVER_DEBUG
|
||||
diag_log ("LOGIN LOADED: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
#endif
|
||||
|
||||
@@ -137,6 +137,4 @@ if (_hiveVer >= dayz_hiveVersionNo) then {
|
||||
};
|
||||
|
||||
dayzPlayerLogin = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected];
|
||||
if(!isNull _playerObj) then {
|
||||
(owner _playerObj) publicVariableClient "dayzPlayerLogin";
|
||||
};
|
||||
(owner _playerObj) publicVariableClient "dayzPlayerLogin";
|
||||
@@ -1,23 +1,17 @@
|
||||
private ["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state","_doLoop","_key","_primary","_medical","_stats","_humanity","_lastinstance","_friendlies","_randomSpot","_position","_debug","_distance","_hit","_fractures","_score","_findSpot","_pos","_isIsland","_w","_clientID","_spawnMC"];
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP: attempted with " + str(_this));
|
||||
#endif
|
||||
|
||||
_characterID = _this select 0;
|
||||
_playerObj = _this select 1;
|
||||
_playerID = getPlayerUID _playerObj;
|
||||
|
||||
if (isNull _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP INIT FAILED: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
//Add MPHit event handler
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log("Adding MPHit EH for " + str(_playerObj));
|
||||
#endif
|
||||
// diag_log("Adding MPHit EH for " + str(_playerObj));
|
||||
_playerObj addMPEventHandler ["MPHit", {_this spawn fnc_plyrHit;}];
|
||||
|
||||
if (_playerID == "") then {
|
||||
@@ -25,17 +19,13 @@ if (_playerID == "") then {
|
||||
};
|
||||
|
||||
if (_playerID == "") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP INIT FAILED: Exiting, no player ID: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
private["_dummy"];
|
||||
_dummy = getPlayerUID _playerObj;
|
||||
if ( _playerID != _dummy ) then {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log format["DEBUG: _playerID miscompare with UID! _playerID:%1",_playerID];
|
||||
#endif
|
||||
_playerID = _dummy;
|
||||
};
|
||||
|
||||
@@ -58,15 +48,11 @@ while {_doLoop < 5} do {
|
||||
};
|
||||
|
||||
if (isNull _playerObj or !isPlayer _playerObj) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP RESULT: Exiting, player object null: " + str(_playerObj));
|
||||
#endif
|
||||
};
|
||||
|
||||
//Wait for HIVE to be free
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("SETUP: RESULT: Successful with " + str(_primary));
|
||||
#endif
|
||||
|
||||
_medical = _primary select 1;
|
||||
_stats = _primary select 2;
|
||||
@@ -109,9 +95,7 @@ if (count _worldspace > 0) then {
|
||||
_randomSpot = true;
|
||||
};
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("LOGIN: Location: " + str(_worldspace) + " doRnd?: " + str(_randomSpot));
|
||||
#endif
|
||||
|
||||
//set medical values
|
||||
if (count _medical > 0) then {
|
||||
@@ -264,9 +248,7 @@ _clientID publicVariableClient "dayzPlayerLogin2";
|
||||
_playerObj setVariable ["lastTime",time];
|
||||
//_playerObj setVariable ["model_CHK",typeOf _playerObj];
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_PSETUP
|
||||
diag_log ("LOGIN PUBLISHING: " + str(_playerObj) + " Type: " + (typeOf _playerObj));
|
||||
#endif
|
||||
|
||||
dayzLogin = null;
|
||||
dayzLogin2 = null;
|
||||
@@ -6,41 +6,35 @@ _magazines = _this select 1;
|
||||
_forceGear = _this select 3;
|
||||
_force = true;
|
||||
|
||||
if (isNull _character) exitWith {
|
||||
diag_log ("Player is Null FAILED: Exiting, player sync: " + str(_character));
|
||||
};
|
||||
|
||||
_characterID = _character getVariable ["CharacterID","0"];
|
||||
_charPos = getPosATL _character;
|
||||
_isInVehicle = vehicle _character != _character;
|
||||
_timeSince = 0;
|
||||
_humanity = 0;
|
||||
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("DW_DEBUG: (isnil _characterID): " + str(isnil "_characterID"));
|
||||
#endif
|
||||
|
||||
if (_character isKindOf "Animal") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " is an Animal class");
|
||||
#endif
|
||||
};
|
||||
|
||||
if (isnil "_characterID") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " has nil characterID");
|
||||
#endif
|
||||
};
|
||||
|
||||
if (_characterID == "0") exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log ("ERROR: Cannot Sync Character " + (name _character) + " as no characterID");
|
||||
#endif
|
||||
};
|
||||
|
||||
private["_debug","_distance"];
|
||||
_debug = getMarkerpos "respawn_west";
|
||||
_distance = _debug distance _charPos;
|
||||
if (_distance < 2000) exitWith {
|
||||
#ifdef DZE_SERVER_DEBUG_SYNC
|
||||
diag_log format["ERROR: server_playerSync: Cannot Sync Player %1 [%2]. Position in debug! %3",name _character,_characterID,_charPos];
|
||||
#endif
|
||||
};
|
||||
|
||||
//Check for server initiated updates
|
||||
@@ -178,7 +172,7 @@ if (_characterID != "0") then {
|
||||
//Wait for HIVE to be free
|
||||
//Send request
|
||||
_key = format["CHILD:201:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:",_characterID,_playerPos,_playerGear,_playerBackp,_medical,false,false,_kills,_headShots,_distanceFoot,_timeSince,_currentState,_killsH,_killsB,_currentModel,_humanity];
|
||||
//diag_log ("HIVE: WRITE: "+ str(_key) + " / " + _characterID);
|
||||
diag_log ("HIVE: WRITE: "+ str(_key) + " / " + _characterID);
|
||||
_key call server_hiveWrite;
|
||||
};
|
||||
};
|
||||
@@ -187,7 +181,7 @@ if (_characterID != "0") then {
|
||||
if (vehicle _character != _character) then {
|
||||
//[vehicle _character, "position"] call server_updateObject;
|
||||
if (!(vehicle _character in needUpdate_objects)) then {
|
||||
//diag_log format["DEBUG: Added to NeedUpdate=%1",_object];
|
||||
diag_log format["DEBUG: Added to NeedUpdate=%1",_object];
|
||||
needUpdate_objects set [count needUpdate_objects, vehicle _character];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,14 +4,17 @@
|
||||
private ["_object","_type","_objectID","_uid","_lastUpdate","_needUpdate","_object_position","_object_inventory","_object_damage","_isNotOk","_parachuteWest","_firstTime","_object_killed","_object_repair","_isbuildable"];
|
||||
|
||||
_object = _this select 0;
|
||||
|
||||
if(isNull(_object)) exitWith {
|
||||
diag_log format["Skipping Null Object: %1", _object];
|
||||
};
|
||||
|
||||
_type = _this select 1;
|
||||
_parachuteWest = typeOf _object == "ParachuteWest";
|
||||
_isbuildable = (typeOf _object) in dayz_allowedObjects;
|
||||
_isNotOk = false;
|
||||
_firstTime = false;
|
||||
|
||||
if(isNull(_object)) exitWith { };
|
||||
|
||||
_objectID = _object getVariable ["ObjectID","0"];
|
||||
_uid = _object getVariable ["ObjectUID","0"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user