Skip to content

Commit

Permalink
remove obsolete team synch code (#511)
Browse files Browse the repository at this point in the history
* remove obsolete team synch code

* readd event for backwards compatibility
  • Loading branch information
commy2 authored Sep 24, 2016
1 parent b04553d commit 54ef2da
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 85 deletions.
6 changes: 0 additions & 6 deletions addons/common/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@

class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};

class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
Expand Down
27 changes: 5 additions & 22 deletions addons/common/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,11 @@ 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 && {(productVersion select 2) < 162}) then {
[FUNC(synchTeamColors), 1, []] call CBA_fnc_addPerFrameHandler;

if (didJIP) then {
{
private _team = _x getVariable [QGVAR(synchedTeam), ""];
if (_team != "") then {
_x assignTeam _team;
};
true
} count allUnits;
};
};
// event for switching team colors, DEPRECATED
["CBA_teamColorChanged", {
params ["_unit", "_team"];
_unit assignTeam _team;
}] call CBA_fnc_addEventHandler;

//Event for switching vehicle var names from CBA_fnc_switchPlayer
["CBA_setVehicleVarName", {
Expand Down
4 changes: 0 additions & 4 deletions addons/common/XEH_preStart.sqf

This file was deleted.

27 changes: 0 additions & 27 deletions addons/common/fnc_onTeamColorChanged.sqf

This file was deleted.

26 changes: 0 additions & 26 deletions addons/common/fnc_synchTeamColors.sqf

This file was deleted.

0 comments on commit 54ef2da

Please sign in to comment.