Pass cursorTarget to maintain_area.sqf

CursorTarget should always be passed from fn_selfActions, not reacquired
in action scripts. This is to ensure the same object is referenced. Plot
Management maintain_area is called from the dialog button, not
fn_selfactions.
This commit is contained in:
ebaydayz
2016-05-19 13:10:20 -04:00
parent 1a238d1719
commit 914b37a413
7 changed files with 6 additions and 16 deletions

View File

@@ -651,8 +651,8 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
};
} else {
if (s_player_maintain_area < 0) then {
s_player_maintain_area = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", "maintain", 5, false];
s_player_maintain_area_preview = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\maintain_area.sqf", "preview", 5, false];
s_player_maintain_area = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTAREA"], "\z\addons\dayz_code\actions\maintain_area.sqf", ["maintain",_cursorTarget], 5, false];
s_player_maintain_area_preview = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_MAINTPREV"], "\z\addons\dayz_code\actions\maintain_area.sqf", ["preview",_cursorTarget], 5, false];
};
};
_plotDistance = (DZE_PlotPole select 0);