mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
works in singleplayer
This commit is contained in:
parent
d339b9567d
commit
903c41308c
@ -25,8 +25,6 @@ if(GVAR(SwitchToEast)) then {_sides pushBack east};
|
||||
if(GVAR(SwitchToIndependent)) then {_sides pushBack independent};
|
||||
if(GVAR(SwitchToCivilian)) then {_sides pushBack civilian};
|
||||
|
||||
hint "TEST";
|
||||
|
||||
if (player getVariable ["ACE_CanSwitchUnits", false]) then {
|
||||
[player, _sides] call FUNC(initPlayer);
|
||||
};
|
||||
|
@ -30,7 +30,8 @@ if (vehicle _playerUnit == _playerUnit) then {
|
||||
_playerUnit allowDamage false;
|
||||
|
||||
GVAR(OriginalUnit) = _playerUnit;
|
||||
GVAR(OriginalName) = [_playerUnit] call EFUNC(common,getName);
|
||||
//GVAR(OriginalName) = [_playerUnit] call EFUNC(common,getName);
|
||||
GVAR(OriginalName) = name _playerUnit;
|
||||
GVAR(OriginalGroup) = group _playerUnit;
|
||||
|
||||
// remove all starting gear of a player
|
||||
|
@ -27,6 +27,7 @@ DFUNC(pfhMarkAiOnMap) = {
|
||||
_args = _this select 0;
|
||||
_sides = _args select 0;
|
||||
|
||||
|
||||
// delete markers
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
@ -65,4 +66,4 @@ DFUNC(pfhMarkAiOnMap) = {
|
||||
};
|
||||
};
|
||||
|
||||
[FUNC(pfhMarkAiOnMap), 1, _sidesToShow] call CBA_fnc_addPerFrameHandler;
|
||||
[FUNC(pfhMarkAiOnMap), 1.5, [_sidesToShow]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -52,7 +52,6 @@ if (_leave) exitWith {
|
||||
_oldUnit = player;
|
||||
|
||||
|
||||
|
||||
DFUNC(pfhSwitchUnit) = {
|
||||
|
||||
private ["_args", "_unit", "_oldUnit", "_respawnEhId", "_oldOwner"];
|
||||
@ -61,6 +60,8 @@ DFUNC(pfhSwitchUnit) = {
|
||||
_unit = _args select 0;
|
||||
_oldUnit = _args select 1;
|
||||
|
||||
|
||||
|
||||
if (local _unit) exitWith {
|
||||
|
||||
_oldUnit setVariable [QGVAR(IsPlayerControlled), false, true];
|
||||
@ -94,4 +95,4 @@ DFUNC(pfhSwitchUnit) = {
|
||||
};
|
||||
};
|
||||
|
||||
[FUNC(pfhSwitchBack), 0.2, [_unit, _oldUnit]] call cba_fnc_addPerFrameHandler;
|
||||
[FUNC(pfhSwitchUnit), 0.2, [_unit, _oldUnit]] call cba_fnc_addPerFrameHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user