Fix tap shoulder msg display

Missing efunc on displayTextStructured
Calculate a shoulder side when using keybind
This commit is contained in:
PabstMirror 2015-11-24 11:25:56 -06:00
parent 86f7ee2ad2
commit 51a463de24

View File

@ -29,8 +29,8 @@ GVAR(isOpeningDoor) = false;
if (_unit == ACE_player) then {
addCamShake [4, 0.5, 5];
private _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 0));
[_message] call FUNC(displayTextStructured);
private _message = parseText format ([["%1 >", localize LSTRING(YouWereTappedRight)], ["< %1", localize LSTRING(YouWereTappedLeft)]] select (_shoulderNum == 1));
[_message] call EFUNC(common,displayTextStructured);
};
}] call EFUNC(common,addEventHandler);
@ -67,8 +67,11 @@ private "_team";
// Conditions: specific
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
//Tap whichever shoulder is closest
private _shoulderNum = [0, 1] select (([cursorTarget, ACE_player] call BIS_fnc_relativeDirTo) > 180);
// Statement
[ACE_player, cursorTarget, 0] call FUNC(tapShoulder);
[ACE_player, cursorTarget, _shoulderNum] call FUNC(tapShoulder);
true
},
{false},