mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
parent
c99e122d84
commit
e25b02263a
@ -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;
|
||||
}];
|
||||
|
@ -18,8 +18,7 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_faction", "_pos"];
|
||||
_faction params ["", "_sides"];
|
||||
params ["_sides", "_pos"];
|
||||
|
||||
private _nearestObjects = nearestObjects [_pos, ["Man"], 15];
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_playerUnit", "_sides"];
|
||||
params ["_playerUnit"];
|
||||
|
||||
if (vehicle _playerUnit == _playerUnit) then {
|
||||
[_sides] call FUNC(markAiOnMap);
|
||||
[GVAR(switchableSides)] call FUNC(markAiOnMap);
|
||||
|
||||
_playerUnit setVariable [QGVAR(IsPlayerUnit), true, true];
|
||||
_playerUnit allowDamage false;
|
||||
@ -38,5 +38,5 @@ if (vehicle _playerUnit == _playerUnit) then {
|
||||
|
||||
[_playerUnit, "forceWalk", "ACE_SwitchUnits", true] call EFUNC(common,statusEffect_set);
|
||||
|
||||
[_playerUnit, _sides] call FUNC(addMapFunction);
|
||||
[] call FUNC(addMapFunction);
|
||||
};
|
||||
|
@ -18,14 +18,14 @@
|
||||
params ["_player"];
|
||||
|
||||
if (GVAR(EnableSwitchUnits)) then {
|
||||
private _sides = [];
|
||||
GVAR(switchableSides) = [];
|
||||
|
||||
if (GVAR(SwitchToWest)) then {_sides pushBack west;};
|
||||
if (GVAR(SwitchToEast)) then {_sides pushBack east;};
|
||||
if (GVAR(SwitchToIndependent)) then {_sides pushBack independent;};
|
||||
if (GVAR(SwitchToCivilian)) then {_sides pushBack civilian;};
|
||||
if (GVAR(SwitchToWest)) then {GVAR(switchableSides) pushBack west;};
|
||||
if (GVAR(SwitchToEast)) then {GVAR(switchableSides) pushBack east;};
|
||||
if (GVAR(SwitchToIndependent)) then {GVAR(switchableSides) pushBack independent;};
|
||||
if (GVAR(SwitchToCivilian)) then {GVAR(switchableSides) pushBack civilian;};
|
||||
|
||||
if (_player getVariable ["ACE_CanSwitchUnits", false]) then {
|
||||
[_player, _sides] call FUNC(initPlayer);
|
||||
[_player] call FUNC(initPlayer);
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user