Skip to content

Commit

Permalink
Merge pull request #424 from CBATeam/cleanupFireteamSync
Browse files Browse the repository at this point in the history
Don't run fireteam sync PREH after apex
  • Loading branch information
commy2 committed Jul 12, 2016
2 parents 76ab225 + 31bdd21 commit 66a7ddf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,15 @@ for "_i" from 0 to ((count (CFG)) - 1) do {
};

// system to synch team colors
// Note: 1.62 added Multiplayer synchronization for assigned team
// Run the PFEH only if on previous versions, keep the event for backwards compatability

PREP(onTeamColorChanged);
PREP(synchTeamColors);

["CBA_teamColorChanged", FUNC(onTeamColorChanged)] call CBA_fnc_addEventHandler;

if (hasInterface) then {
if (hasInterface && {(productVersion select 2) < 162}) then {
[FUNC(synchTeamColors), 1, []] call CBA_fnc_addPerFrameHandler;

if (didJIP) then {
Expand Down
3 changes: 3 additions & 0 deletions addons/common/fnc_onTeamColorChanged.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Author:
params ["_unit", "_team"];

_unit assignTeam _team;

if ((productVersion select 2) > 162) exitWith {};

if (local (leader _unit)) then {
_unit setVariable [QGVAR(synchedTeam), _team, true];
};

0 comments on commit 66a7ddf

Please sign in to comment.