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