Update dog actions in fn_selfActions

When PlotForLife was added these were not updated to reflect the
_ownerID change:

https://github.com/EpochModTeam/DayZ-Epoch/blob/master/SQF/dayz_code/compile/fn_selfActions.sqf#L253
This commit is contained in:
ebaydayz
2016-05-20 13:45:52 -04:00
parent edd53597b0
commit ec27cfd29c
2 changed files with 9 additions and 4 deletions

View File

@@ -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 {

View File

@@ -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];
};