Merge pull request #3057 from acemod/miscMedicalFixes

Fix medical menu not closing on range, litter dir
This commit is contained in:
PabstMirror 2015-12-30 13:52:54 -06:00
commit e367b0f0ef
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@
if(!hasInterface) exitWith { false };
params ["_litterClass", "_position", "_unit"];
params ["_litterClass", "_position", "_direction"];
private["_litterObject", "_maxLitterCount"];
//IGNORE_PRIVATE_WARNING(_values);

View File

@ -77,11 +77,11 @@ GVAR(MenuPFHID) = [{
[GVAR(LatestDisplayOptionMenu)] call FUNC(handleUI_DisplayOptions);
//Check that it's valid to stay open:
if !(([ACE_player, _target, ["isNotInside"]] call EFUNC(common,canInteractWith)) && {[ACE_player, _target] call FUNC(canOpenMenu)}) then {
if !(([ACE_player, GVAR(INTERACTION_TARGET), ["isNotInside"]] call EFUNC(common,canInteractWith)) && {[ACE_player, GVAR(INTERACTION_TARGET)] call FUNC(canOpenMenu)}) then {
closeDialog 314412;
//If we failed because of distance check, show UI message:
if ((ACE_player distance GVAR(INTERACTION_TARGET)) > GVAR(maxRange)) then {
["displayTextStructured", [ACE_player], [[ELSTRING(medical,DistanceToFar), [GVAR(INTERACTION_TARGET)] call EFUNC(common,getName)], 1.75, ACE_player]] call EFUNC(common,targetEvent);
["displayTextStructured", [[ELSTRING(medical,DistanceToFar), [GVAR(INTERACTION_TARGET)] call EFUNC(common,getName)], 2, ACE_player]] call EFUNC(common,localEvent);
};
};