move AliveTime to local pt2

This commit is contained in:
vbawol 2017-09-05 16:28:07 -05:00
parent 422fdcc487
commit 3c13af5944
3 changed files with 5 additions and 3 deletions

View File

@ -33,7 +33,6 @@ EPOCH_equippedItem_PVS = [];
EPOCH_nearPower = false;
EPOCH_pendingP2ptradeTarget = objNull;
EPOCH_lastNPCtradeTarget = objNull;
EPOCH_clientAliveTimer = diag_tickTime;
EPOCH_lastJumptime = diag_tickTime;
EPOCH_lastAGTime = diag_tickTime;
EPOCH_lastMineRocks = diag_tickTime;

View File

@ -86,8 +86,8 @@ if !(_powerSources isEqualTo[]) then {
// downtick Alcohol
EPOCH_playerAlcohol = ((EPOCH_playerAlcohol - 1) min 100) max 0;
_playerAliveTime = round(_playerAliveTime + (_tickTime - EPOCH_clientAliveTimer));
EPOCH_clientAliveTimer = _tickTime;
_playerAliveTime = round(_playerAliveTime + (_tickTime - _clientAliveTimer));
_clientAliveTimer = _tickTime;
// force update after 60 seconds
_forceUpdate = true;

View File

@ -11,6 +11,9 @@ EPOCH_forceUpdateNow = false;
_playerRadiation = EPOCH_playerRadiation;
_playerAliveTime = EPOCH_playerAliveTime;
// start alive timer
_clientAliveTimer = diag_tickTime;
// inline function to sync player stats to server
_fnc_forceUpdate = {
private _customVars = [];