mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
@@ -11,6 +11,6 @@ if ((count _magazineArray) > 0) then {
|
|||||||
publicVariableServer "PVDZ_plr_Save";
|
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;
|
dayz_lastSave = diag_tickTime;
|
||||||
|
|||||||
@@ -1202,7 +1202,9 @@ class FSM
|
|||||||
name = "Finish";
|
name = "Finish";
|
||||||
itemno = 32;
|
itemno = 32;
|
||||||
init = /*%FSM<STATEINIT""">*/"diag_log 'player_forceSave called from fsm';" \n
|
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""">*/;
|
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||||
class Links
|
class Links
|
||||||
{
|
{
|
||||||
@@ -1938,15 +1940,22 @@ class FSM
|
|||||||
{
|
{
|
||||||
name = "Finish_1";
|
name = "Finish_1";
|
||||||
itemno = 106;
|
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
|
"progressLoadingScreen 1;" \n
|
||||||
"publicVariableServer ""PVDZ_plr_LoginRecord"";" \n
|
"" \n
|
||||||
"diag_log ['Sent to server: PVDZ_plr_LoginRecord', PVDZ_plr_LoginRecord]; " \n
|
"diag_log ['Sent to server: PVDZ_plr_LoginRecord', PVDZ_plr_LoginRecord]; " \n
|
||||||
|
"" \n
|
||||||
"_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n
|
"_world = toUpper(worldName); //toUpper(getText (configFile >> ""CfgWorlds"" >> (worldName) >> ""description""));" \n
|
||||||
"_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n
|
"_nearestCity = nearestLocations [getPos player, [""NameCityCapital"",""NameCity"",""NameVillage"",""NameLocal""],1000];" \n
|
||||||
|
"" \n
|
||||||
"Dayz_logonTown = ""Wilderness"";" \n
|
"Dayz_logonTown = ""Wilderness"";" \n
|
||||||
"if (count _nearestCity > 0) then {Dayz_logonTown = text (_nearestCity select 0)};" \n
|
"if (count _nearestCity > 0) then {Dayz_logonTown = text (_nearestCity select 0)};" \n
|
||||||
|
"" \n
|
||||||
"[_world,Dayz_logonTown,format[localize ""str_player_06"",dayz_Survived]] spawn {uiSleep 5; _this spawn BIS_fnc_infoText;};" \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_myPosition = getPosATL player;" \n
|
||||||
"Dayz_loginCompleted = true;" \n
|
"Dayz_loginCompleted = true;" \n
|
||||||
"" \n
|
"" \n
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ if (isNil "_playerObj") exitWith {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_puid = [_playerObj] call FNC_GetPlayerUID;
|
_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
|
//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);
|
_lastDamage = round(diag_ticktime - _lastDamage);
|
||||||
|
|
||||||
//Readded Logout debug info.
|
//Readded Logout debug info.
|
||||||
diag_log format["Player UID#%1 CID#%2 %3 as %4, logged off at %5%6",
|
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,
|
getPlayerUID _playerObj,
|
||||||
|
_characterID,
|
||||||
|
_playerObj call fa_plr2str,
|
||||||
|
typeOf _playerObj,
|
||||||
(getPosATL _playerObj) call fa_coor2str,
|
(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 {""}
|
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
|
//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 the player object is inside a vehicle lets eject the player
|
||||||
if (vehicle _playerObj != _playerObj) then {
|
if (vehicle _playerObj != _playerObj) then {
|
||||||
|
|||||||
@@ -2,10 +2,6 @@ private ["_doLoop","_hiveVer","_isHiveOk","_playerID","_playerObj","_primary","_
|
|||||||
|
|
||||||
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
#include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
|
||||||
|
|
||||||
#ifdef LOGIN_DEBUG
|
|
||||||
diag_log ("STARTING LOGIN: " + str(_this));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_playerID = _this select 0;
|
_playerID = _this select 0;
|
||||||
_playerObj = _this select 1;
|
_playerObj = _this select 1;
|
||||||
_playerName = name _playerObj;
|
_playerName = name _playerObj;
|
||||||
@@ -30,10 +26,6 @@ if ((_playerID == "") or (isNil "_playerID")) exitWith {
|
|||||||
diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
|
diag_log ("LOGIN FAILED: Player [" + _playerName + "] has no login ID");
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef LOGIN_DEBUG
|
|
||||||
diag_log ("LOGIN ATTEMPT: " + str(_playerID) + " " + _playerName);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_endMission = false;
|
_endMission = false;
|
||||||
_timeleft = 0;
|
_timeleft = 0;
|
||||||
{
|
{
|
||||||
@@ -130,19 +122,21 @@ if (!_isNew) then {
|
|||||||
_isHiveOk = if (_hiveVer >= dayz_hiveVersionNo) then {true} else {false}; //EDITED
|
_isHiveOk = if (_hiveVer >= dayz_hiveVersionNo) then {true} else {false}; //EDITED
|
||||||
|
|
||||||
PVCDZ_plr_Login = [_charID,_inventory,_backpack,_survival,_isNew,dayz_versionNo,_model,_isHiveOk,_newPlayer,_isInfected];
|
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";
|
(owner _playerObj) publicVariableClient "PVCDZ_plr_Login";
|
||||||
|
|
||||||
//Make player wait until ghost timer is up.
|
//Make player wait until ghost timer is up.
|
||||||
if (_endMission) exitwith {
|
if (_endMission) exitwith {
|
||||||
_remaining = dayz_ghostTimer - _timeleft;
|
_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];
|
PVCDZ_plr_Ghost = [_remaining];
|
||||||
(owner _playerObj) publicVariableClient "PVCDZ_plr_Ghost";
|
(owner _playerObj) publicVariableClient "PVCDZ_plr_Ghost";
|
||||||
};
|
};
|
||||||
|
|
||||||
//Record Player Login/LogOut
|
//Record Player Login/LogOut
|
||||||
[_playerID,_charID,1] call dayz_recordLogin;
|
[_playerID,_charID,1,_playerName] call dayz_recordLogin;
|
||||||
|
|
||||||
PVCDZ_plr_PlayerAccepted = [_playerName,diag_ticktime];
|
PVCDZ_plr_PlayerAccepted = [_playerName,diag_ticktime];
|
||||||
(owner _playerObj) publicVariableClient "PVCDZ_plr_PlayerAccepted";
|
(owner _playerObj) publicVariableClient "PVCDZ_plr_PlayerAccepted";
|
||||||
@@ -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"];
|
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;
|
_characterID = _this select 0;
|
||||||
_playerObj = _this select 1;
|
_playerObj = _this select 1;
|
||||||
_spawnSelection = _this select 3;
|
_spawnSelection = _this select 3;
|
||||||
@@ -114,9 +112,9 @@ if (count _medical > 0) then {
|
|||||||
if (count _medical >= 12) then {
|
if (count _medical >= 12) then {
|
||||||
_playerObj setVariable ["blood_type",(_medical select 11),true];
|
_playerObj setVariable ["blood_type",(_medical select 11),true];
|
||||||
_playerObj setVariable ["rh_factor",(_medical select 12),true];
|
_playerObj setVariable ["rh_factor",(_medical select 12),true];
|
||||||
diag_log [ "Character data: blood_type,rh_factor,testdone=",
|
// diag_log [ "Character data: blood_type,rh_factor,testdone=",
|
||||||
_playerObj getVariable ["blood_type", "?"],_playerObj getVariable ["rh_factor", "?"], _playerObj getVariable ["blood_testdone", false]
|
// _playerObj getVariable ["blood_type", "?"],_playerObj getVariable ["rh_factor", "?"], _playerObj getVariable ["blood_testdone", false]
|
||||||
];
|
// ];
|
||||||
} else {
|
} else {
|
||||||
_playerObj call player_bloodCalc;
|
_playerObj call player_bloodCalc;
|
||||||
diag_log [ "Character upgrade to 1.8.3: blood_type,rh_factor=",_playerObj getVariable ["blood_type", "?"],_playerObj getVariable ["rh_factor", "?"]];
|
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_injured",false,true];
|
||||||
_playerObj setVariable ["USEC_inPain",false,true];
|
_playerObj setVariable ["USEC_inPain",false,true];
|
||||||
_playerObj call player_bloodCalc; // will set blood_type and rh_factor according to real population statitics
|
_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 ["messing",[0,0,0],true];
|
||||||
_playerObj setVariable ["blood_testdone",false,true];
|
_playerObj setVariable ["blood_testdone",false,true];
|
||||||
};
|
};
|
||||||
@@ -238,7 +236,7 @@ _clientID publicVariableClient "PVCDZ_plr_plantSpawner";
|
|||||||
//record time started
|
//record time started
|
||||||
_playerObj setVariable ["lastTime",time];
|
_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_Login1 = null;
|
||||||
PVDZ_plr_Login2 = null;
|
PVDZ_plr_Login2 = null;
|
||||||
@@ -228,9 +228,17 @@ dayz_objectUID2 = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
dayz_recordLogin = {
|
dayz_recordLogin = {
|
||||||
private "_key";
|
private ["_key","_status"];
|
||||||
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
|
_key = format["CHILD:103:%1:%2:%3:",_this select 0,_this select 1,_this select 2];
|
||||||
_key call server_hiveWrite;
|
_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 = {
|
dayz_reseed = {
|
||||||
|
|||||||
Reference in New Issue
Block a user