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

@@ -11,6 +11,6 @@ if ((count _magazineArray) > 0) then {
publicVariableServer "PVDZ_plr_Save";
};
diag_log format["Player_forceSave with magazines: %1",_magazineArray];
//diag_log format["Player_forceSave with magazines: %1",_magazineArray];
dayz_lastSave = diag_tickTime;

View File

@@ -1202,7 +1202,9 @@ class FSM
name = "Finish";
itemno = 32;
init = /*%FSM<STATEINIT""">*/"diag_log 'player_forceSave called from fsm';" \n
"call player_forceSave;"/*%FSM</STATEINIT""">*/;
"//call player_forceSave;" \n
"" \n
"publicVariableServer ""PVDZ_plr_LoginRecord"";"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
@@ -1938,16 +1940,23 @@ class FSM
{
name = "Finish_1";
itemno = 106;
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Finish'];};PVDZ_plr_LoginRecord = [_playerUID,_charID,0];" \n
init = /*%FSM<STATEINIT""">*/"if (_debug == 1) then {diag_log [diag_tickTime,'Finish'];};" \n
"" \n
"PVDZ_plr_LoginRecord = [_playerUID,_charID,0,(name vehicle player)];" \n
"" \n
"progressLoadingScreen 1;" \n
"publicVariableServer ""PVDZ_plr_LoginRecord"";" \n
"" \n
"diag_log ['Sent to server: PVDZ_plr_LoginRecord', PVDZ_plr_LoginRecord]; " \n
"_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n
"" \n
"_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n
"_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n
"Dayz_logonTown = ""Wilderness"";" \n
"" \n
"Dayz_logonTown = ""Wilderness"";" \n
"if (count _nearestCity > 0) then {Dayz_logonTown = text (_nearestCity select 0)};" \n
"[_world,Dayz_logonTown,format[localize ""str_player_06"",dayz_Survived]] spawn {uiSleep 5; _this spawn BIS_fnc_infoText;};" \n
"dayz_myPosition = getPosATL player;" \n
"" \n
"[_world,Dayz_logonTown,format[localize ""str_player_06"",dayz_Survived]] spawn {uiSleep 5; _this spawn BIS_fnc_infoText;};" \n
"" \n
"dayz_myPosition = getPosATL player;" \n
"Dayz_loginCompleted = true;" \n
"" \n
"//Other Counters" \n

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;

View File

@@ -228,9 +228,17 @@ dayz_objectUID2 = {
};
dayz_recordLogin = {
private "_key";
private ["_key","_status"];
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
_key call server_hiveWrite;
_status = switch (1==1) do {
case ((_this select 2) == 0): { "CLIENT LOADED & PLAYING" };
case ((_this select 2) == 1): { "LOGGED IN" };
case ((_this select 2) == 2): { "LOGGED OUT" };
};
diag_log format["INFO - Player: %1(UID:%3/CID:%4) Status: %2",(_this select 3),_status,(_this select 0),(_this select 1)];
};
dayz_reseed = {