From 2c8ace3a8d46dbf2712aff29ca876096352deed7 Mon Sep 17 00:00:00 2001 From: vbawol Date: Sat, 30 Sep 2017 22:06:47 -0500 Subject: [PATCH] use player object for RE instead of netID --- .../compile/epoch_player/EPOCH_server_loadPlayer.sqf | 4 ++-- Sources/epoch_server/init/server_securityfunctions.sqf | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf index 6945bd8f..998cde75 100644 --- a/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf +++ b/Sources/epoch_server/compile/epoch_player/EPOCH_server_loadPlayer.sqf @@ -325,7 +325,7 @@ if (!isNull _player) then { diag_log "Epoch: DEBUG: _player object was null reject connection"; } else { // - // TESTING if this is extra setUnitLoadout the cause for random duping on login + // TESTING if this extra setUnitLoadout is the cause for random duping on login (it seems it is, however now we have random loading issue.) // re-add Inventory (needed as workaround for Client / Server synchronizing issue in unitloadout) //_loadout = getUnitLoadout _newPlyr; //_newPlyr setUnitLoadout [_loadout, false]; @@ -365,7 +365,7 @@ if (!isNull _player) then { _newPlyr setVariable["SETUP", true, true]; // Send message to player so they can take over the new body. - [_playerNetID, _playerUID, [_newPlyr, _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, _newPlyr call EPOCH_server_setPToken,_playerGroupArray, _communityStats, _hitpoints], _fsmHandle] call EPOCH_server_pushPlayer; + [_playerNetID, _playerUID, [_newPlyr, _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, _newPlyr call EPOCH_server_setPToken,_playerGroupArray, _communityStats, _hitpoints], _fsmHandle, _player] call EPOCH_server_pushPlayer; // diag_log str([_playerNetID, _playerUID, _player, [_newPlyr, (_player isEqualTo _newPlyr), _vars, _currentWeapon, loadAbs _newPlyr, _playerGroup, _canBeRevived, [],_playerGroupArray, _communityStats, _hitpoints], _fsmHandle]); // revive test diff --git a/Sources/epoch_server/init/server_securityfunctions.sqf b/Sources/epoch_server/init/server_securityfunctions.sqf index 9a95bc86..b815c217 100644 --- a/Sources/epoch_server/init/server_securityfunctions.sqf +++ b/Sources/epoch_server/init/server_securityfunctions.sqf @@ -138,9 +138,9 @@ EPOCH_server_setPToken = compileFinal ("private '_var';_var = 'epochserver' call if (!_skn_enableAntihack) exitWith { EPOCH_server_pushPlayer = compileFinal (" - params ['_playerNetID','_playerUID','_C_SET','_fsmHandle']; + params ['_playerNetID','_playerUID','_C_SET','_fsmHandle','_player']; _C_SET pushBack ''; - [_fsmHandle,['_C_SET', _C_SET]] remoteExecCall ['setFSMVariable', _playerNetID]; + [_fsmHandle,['_C_SET', _C_SET]] remoteExecCall ['setFSMVariable', _player]; "); EPOCH_server_isPAdmin = compileFinal ("false"); EPOCH_server_Authed = compileFinal ("true"); @@ -514,7 +514,7 @@ if (_skn_PVSPrefix == "") then { }; EPOCH_server_pushPlayer = compileFinal (" - params ['_playerNetID','_playerUID','_C_SET','_fsmHandle']; + params ['_playerNetID','_playerUID','_C_SET','_fsmHandle','_player']; if (_playerUID in "+ str _skn_adminUIDArray+") then { _playerNetID publicVariableClient '"+_skn_Admin_Code+"'; _playerNetID publicVariableClient '"+_skn_pv_adminLog+"'; @@ -523,7 +523,7 @@ EPOCH_server_pushPlayer = compileFinal (" } else { _C_SET pushBack '[] spawn "+_skn_AH_Init+"'; }; - [_fsmHandle,['_C_SET', _C_SET]] remoteExecCall ['setFSMVariable', _playerNetID]; + [_fsmHandle,['_C_SET', _C_SET]] remoteExecCall ['setFSMVariable', _player]; true "); EPOCH_server_isPAdmin = compileFinal ("if (isNull _this) then {false} else {getPlayerUID _this in "+str _skn_adminUIDArray+"}");