Fix potential undefined dayz_characterID variable on login

The scheduler can start running fn_selfActions before player_monitor.fsm
defines dayz_characterID when login or network return is slow.
This commit is contained in:
ebayShopper
2017-04-08 19:19:40 -04:00
parent 992ab199dd
commit df526285cd
3 changed files with 6 additions and 4 deletions

View File

@@ -69,7 +69,7 @@ _targetType = if(typeOf _target in DZE_DoorsLocked) then { "DOOR"; } else { "GEN
// determine owner and player id
// and check if player is owner of target object
_playerUID = getPlayerUID _player;
_characterID = dayz_characterID;
_characterID = player getVariable ["CharacterID","0"];
if (DZE_permanentPlot) then {
_targetOwnerUID = if (isPlayer _target) then { getPlayerUID _target } else { _target getVariable ["ownerPUID","0"] };
_isOwner = (_playerUID == _targetOwnerUID);