From 31bdd21e04425bef906d7347e008d93ea8e7cfdf Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Tue, 12 Jul 2016 02:10:15 -0500 Subject: [PATCH] Don't run fireteam sync PREH after apex --- addons/common/XEH_postInit.sqf | 5 ++++- addons/common/fnc_onTeamColorChanged.sqf | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 62c4cbb1a..cadc1b356 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -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 { diff --git a/addons/common/fnc_onTeamColorChanged.sqf b/addons/common/fnc_onTeamColorChanged.sqf index ce19091b5..f4d40d438 100644 --- a/addons/common/fnc_onTeamColorChanged.sqf +++ b/addons/common/fnc_onTeamColorChanged.sqf @@ -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]; };