diff --git a/SQF/dayz_code/actions/dog/tame_dog.sqf b/SQF/dayz_code/actions/dog/tame_dog.sqf index 55e085301..eacc64e68 100644 --- a/SQF/dayz_code/actions/dog/tame_dog.sqf +++ b/SQF/dayz_code/actions/dog/tame_dog.sqf @@ -43,7 +43,12 @@ if (_hasMeat) then { _fsmid setFSMVariable ["_handle", _fsmid]; _fsmid setFSMVariable ["_isTamed", true]; player setVariable ["dogID", _fsmid]; - _dog setVariable ["CharacterID", dayz_characterID, true]; + + if (DZE_plotforLife) then { + _dog setVariable ["ownerPUID", dayz_playerUID, true]; + } else { + _dog setVariable ["CharacterID", dayz_characterID, true]; + }; format[localize "str_epoch_player_173",_textRemoved] call dayz_rollingMessages; } else { diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index e04430515..b1ae5cc2e 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -1000,7 +1000,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur player removeAction s_player_tamedog; s_player_tamedog = -1; }; - if (_isDog && {_ownerID == dayz_characterID} && {_isAlive}) then { + if (_isDog && {_ownerID == _playerUID} && {_isAlive}) then { if (s_player_feeddog < 0 && _hasRawMeat) then { s_player_feeddog = player addAction [localize "str_actions_feeddog","\z\addons\dayz_code\actions\dog\feed.sqf",[_dogHandle,0], 0, false, true]; }; @@ -1176,8 +1176,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur if (_dogHandle > 0) then { _dog = _dogHandle getFSMVariable "_dog"; if (isNil "_dog") exitWith {}; - _ownerID = if (!isNull _cursorTarget) then {_cursorTarget getVariable ["CharacterID","0"]} else {"0"}; - if (_canDo && !_inVehicle && alive _dog && _ownerID != dayz_characterID) then { + if (isNil "_ownerID") then {_ownerID = "0"}; + if (_canDo && !_inVehicle && alive _dog && !(_ownerID in [dayz_characterID,dayz_playerUID])) then { if (s_player_movedog < 0) then { s_player_movedog = player addAction [localize "str_actions_movedog", "\z\addons\dayz_code\actions\dog\move.sqf", player getVariable ["dogID",0], 1, false, true]; };