works in singleplayer

This commit is contained in:
bux578 2015-02-03 20:33:15 +01:00
parent d339b9567d
commit 903c41308c
4 changed files with 7 additions and 6 deletions

View File

@ -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);
};

View File

@ -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

View File

@ -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;

View File

@ -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;