switchUnits - Fix switching units not working (#6188) (#7676)

This commit is contained in:
McDiod
2020-06-08 01:25:11 +02:00
committed by GitHub
parent c99e122d84
commit e25b02263a
4 changed files with 14 additions and 18 deletions

View File

@ -16,12 +16,9 @@
* Public: No
*/
params ["_unit", "_sides"];
["theMapClick", "onMapSingleClick", {
// IGNORE_PRIVATE_WARNING(_pos,_shift,_alt)
addMissionEventHandler ["MapSingleClick", {
params ["", "_pos"];
if (alive ACE_player && {GVAR(OriginalUnit) getVariable ["ACE_CanSwitchUnits", false]}) then {
[_this, _pos, _shift, _alt] call FUNC(handleMapClick);
[GVAR(switchableSides), _pos] call FUNC(handleMapClick);
};
}, [_unit, _sides]] call BIS_fnc_addStackedEventHandler;
}];