Diag_log Cleanup.

Vanilla development commits:

1dbef192bb

10cb0249f0
This commit is contained in:
ebaydayz
2016-07-25 12:06:53 -04:00
parent ff6e11708a
commit 55df36741b
6 changed files with 43 additions and 31 deletions

View File

@@ -17,7 +17,7 @@ if (isNil "_playerObj") exitWith {
};
_puid = [_playerObj] call FNC_GetPlayerUID;
diag_log format["get: %1 (%2), sent: %3 (%4)",typeName _puid, _puid, typeName _playerUID, _playerUID];
//diag_log format["get: %1 (%2), sent: %3 (%4)",typeName _puid, _puid, typeName _playerUID, _playerUID];
//If the the playerObj exists lets run all sync systems
@@ -27,8 +27,11 @@ _Sepsis = _playerObj getVariable["USEC_Sepsis",false];
_lastDamage = round(diag_ticktime - _lastDamage);
//Readded Logout debug info.
diag_log format["Player UID#%1 CID#%2 %3 as %4, logged off at %5%6",
getPlayerUID _playerObj, _characterID, _playerObj call fa_plr2str, typeOf _playerObj,
diag_log format["INFO - Player: %3(UID:%1/CID:%2) as (%4), logged off at %5%6",
getPlayerUID _playerObj,
_characterID,
_playerObj call fa_plr2str,
typeOf _playerObj,
(getPosATL _playerObj) call fa_coor2str,
if ((_lastDamage > 5 AND (_lastDamage < 30)) AND ((alive _playerObj) AND (_playerObj distance (getMarkerpos "respawn_west") >= 2000))) then {" while in combat ("+str(_lastDamage)+" seconds left)"} else {""}
];
@@ -53,7 +56,7 @@ if (_characterID != "?") exitwith {
};
//Record Player Login/LogOut
[_playerUID,_characterID,2] call dayz_recordLogin;
[_playerUID,_characterID,2,_playerName] call dayz_recordLogin;
//if the player object is inside a vehicle lets eject the player
if (vehicle _playerObj != _playerObj) then {

View File

@@ -2,10 +2,6 @@ private ["_doLoop","_hiveVer","_isHiveOk","_playerID","_playerObj","_primary","_
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
#ifdef LOGIN_DEBUG
diag_log ("STARTING LOGIN: " + str(_this));
#endif
_playerID = _this select 0;
_playerObj = _this select 1;
_playerName = name _playerObj;
@@ -30,10 +26,6 @@ if ((_playerID == "") or (isNil "_playerID")) exitWith {
diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
};
#ifdef LOGIN_DEBUG
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
#endif
_endMission = false;
_timeleft = 0;
{
@@ -130,19 +122,21 @@ if (!_isNew) then {
_isHiveOk = if (_hiveVer >= dayz_hiveVersionNo) then {true} else {false}; //EDITED
PVCDZ_plr_Login = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected];
diag_log str(PVCDZ_plr_Login);
(owner _playerObj) publicVariableClient "PVCDZ_plr_Login";
//Make player wait until ghost timer is up.
if (_endMission) exitwith {
_remaining = dayz_ghostTimer - _timeleft;
diag_log format["LOGIN CANCELLED: player: %1 is in ghost mode. Time remianing: %2 before login!!",_playerObj,_remaining];
//Log For GhostMode
diag_log format["INFO - Player:%1(UID:%2/CID%3) Status: LOGIN CANCELLED, GHOSTMODE. Time remianing: %4",_playerName,_playerID,_charID,_remaining];
PVCDZ_plr_Ghost = [_remaining];
(owner _playerObj) publicVariableClient "PVCDZ_plr_Ghost";
};
//Record Player Login/LogOut
[_playerID,_charID,1] call dayz_recordLogin;
[_playerID,_charID,1,_playerName] call dayz_recordLogin;
PVCDZ_plr_PlayerAccepted = [_playerName,diag_ticktime];
(owner _playerObj) publicVariableClient "PVCDZ_plr_PlayerAccepted";

View File

@@ -1,7 +1,5 @@
private ["_characterID","_playerObj","_playerID","_dummy","_worldspace","_state","_doLoop","_key","_primary","_medical","_stats","_humanity","_randomSpot","_position","_debug","_distance","_fractures","_score","_findSpot","_mkr","_j","_isIsland","_w","_clientID","_lastInstance"];
diag_log (format["%1 DEBUG %2", __FILE__, _this]);
_characterID = _this select 0;
_playerObj = _this select 1;
_spawnSelection = _this select 3;
@@ -114,9 +112,9 @@ if (count _medical > 0) then {
if (count _medical >= 12) then {
_playerObj setVariable ["blood_type",(_medical select 11),true];
_playerObj setVariable ["rh_factor",(_medical select 12),true];
diag_log [ "Character data: blood_type,rh_factor,testdone=",
_playerObj getVariable ["blood_type", "?"],_playerObj getVariable ["rh_factor", "?"], _playerObj getVariable ["blood_testdone", false]
];
// diag_log [ "Character data: blood_type,rh_factor,testdone=",
// _playerObj getVariable ["blood_type", "?"],_playerObj getVariable ["rh_factor", "?"], _playerObj getVariable ["blood_testdone", false]
// ];
} else {
_playerObj call player_bloodCalc;
diag_log [ "Character upgrade to 1.8.3: blood_type,rh_factor=",_playerObj getVariable ["blood_type", "?"],_playerObj getVariable ["rh_factor", "?"]];
@@ -130,7 +128,7 @@ if (count _medical > 0) then {
_playerObj setVariable ["USEC_injured",false,true];
_playerObj setVariable ["USEC_inPain",false,true];
_playerObj call player_bloodCalc; // will set blood_type and rh_factor according to real population statitics
diag_log [ "New character setup: blood_type,rh_factor=",_playerObj getVariable ["blood_type", "?"],_playerObj getVariable ["rh_factor", "?"]];
//diag_log [ "New character setup: blood_type,rh_factor=",_playerObj getVariable ["blood_type", "?"],_playerObj getVariable ["rh_factor", "?"]];
_playerObj setVariable ["messing",[0,0,0],true];
_playerObj setVariable ["blood_testdone",false,true];
};
@@ -238,7 +236,7 @@ _clientID publicVariableClient "PVCDZ_plr_plantSpawner";
//record time started
_playerObj setVariable ["lastTime",time];
diag_log format["LOGIN PUBLISHING: UID#%1 CID#%2 %3 as %4 should spawn at %5",getPlayerUID _playerObj,_characterID,_playerObj call fa_plr2str,typeOf _playerObj,(_worldspace select 1) call fa_coor2str];
//diag_log format["LOGIN PUBLISHING: UID#%1 CID#%2 %3 as %4 should spawn at %5",getPlayerUID _playerObj,_characterID,_playerObj call fa_plr2str,typeOf _playerObj,(_worldspace select 1) call fa_coor2str];
PVDZ_plr_Login1 = null;
PVDZ_plr_Login2 = null;