Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common - Only switch side if necessary on person loading #6334

Merged
merged 3 commits into from
Oct 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion addons/common/functions/fnc_loadPerson.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

side OBJECT will report stuff like sideEnemy and sideFriendly. side GROUP will only report west, east, resistance, civilian. Are you sure you don't want to keep side group _something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, my bad. I'll fix it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So will it be fixed and merged? We playing with this "fixed fix" for more than a year. But it is pain in the ass to track our temporary fixes on every ACE release. Would be nice to see solved issue in next release.


TRACE_3("sending ace_loadPersonEvent",_unit,_vehicle,_caller);
["ace_loadPersonEvent", [_unit, _vehicle, _caller], _unit] call CBA_fnc_targetEvent;
};
Expand Down