mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Common - Only switch side if necessary on person loading (#6334)
Co-authored-by: Serg Vergun <1197314+severgun@users.noreply.github.com> Co-authored-by: jonpas <jonpas33@gmail.com>
This commit is contained in:
parent
0a203fdde4
commit
6128b8ef06
@ -30,7 +30,15 @@ if (isNull _vehicle) then {
|
||||
};
|
||||
|
||||
if (!isNull _vehicle) then {
|
||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||
switch (true) do {
|
||||
case ((crew _vehicle isEqualTo []) && {side group _caller != side group _unit}): {
|
||||
[_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide);
|
||||
};
|
||||
case (side group _vehicle != side group _unit): {
|
||||
[_unit, true, GROUP_SWITCH_ID, side group _vehicle] call FUNC(switchToGroupSide);
|
||||
};
|
||||
};
|
||||
|
||||
TRACE_3("sending ace_loadPersonEvent",_unit,_vehicle,_caller);
|
||||
["ace_loadPersonEvent", [_unit, _vehicle, _caller], _unit] call CBA_fnc_targetEvent;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user