Skip to content

Commit 2a55e5b

Browse files
committed
Merge branch 'master' of https://github.com/CBATeam/CBA_A3 into release
2 parents 2bc8a83 + 54ef2da commit 2a55e5b

24 files changed

+345
-470
lines changed

addons/common/Cfg3DEN.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
class Cfg3DEN {
3+
class Group {
4+
class AttributeCategories {
5+
class Init {
6+
class Attributes {
7+
class Callsign {
8+
expression = "[_this, _value] call CBA_fnc_setCallsign";
9+
};
10+
};
11+
};
12+
};
13+
};
14+
};

addons/common/CfgEventHandlers.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11

2-
class Extended_PreStart_EventHandlers {
3-
class ADDON {
4-
init = QUOTE(call COMPILE_FILE(XEH_preStart));
5-
};
6-
};
7-
82
class Extended_PreInit_EventHandlers {
93
class ADDON {
104
init = QUOTE(call COMPILE_FILE(XEH_preInit));

addons/common/CfgFunctions.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class CfgFunctions {
2525
PATHTO_FNC(getGroupIndex);
2626
PATHTO_FNC(getMagazineIndex);
2727
PATHTO_FNC(currentMagazineIndex);
28+
PATHTO_FNC(setCallsign);
2829
};
2930

3031
class Soldiers {

addons/common/XEH_postInit.sqf

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,11 @@ for "_i" from 0 to ((count (CFG)) - 1) do {
3535
};
3636
};
3737

38-
// system to synch team colors
39-
// Note: 1.62 added Multiplayer synchronization for assigned team
40-
// Run the PFEH only if on previous versions, keep the event for backwards compatability
41-
42-
PREP(onTeamColorChanged);
43-
PREP(synchTeamColors);
44-
45-
["CBA_teamColorChanged", FUNC(onTeamColorChanged)] call CBA_fnc_addEventHandler;
46-
47-
if (hasInterface && {(productVersion select 2) < 162}) then {
48-
[FUNC(synchTeamColors), 1, []] call CBA_fnc_addPerFrameHandler;
49-
50-
if (didJIP) then {
51-
{
52-
private _team = _x getVariable [QGVAR(synchedTeam), ""];
53-
if (_team != "") then {
54-
_x assignTeam _team;
55-
};
56-
true
57-
} count allUnits;
58-
};
59-
};
38+
// event for switching team colors, DEPRECATED
39+
["CBA_teamColorChanged", {
40+
params ["_unit", "_team"];
41+
_unit assignTeam _team;
42+
}] call CBA_fnc_addEventHandler;
6043

6144
//Event for switching vehicle var names from CBA_fnc_switchPlayer
6245
["CBA_setVehicleVarName", {

addons/common/XEH_preStart.sqf

Lines changed: 0 additions & 4 deletions
This file was deleted.

addons/common/config.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ class CfgPatches {
88
units[] = {};
99
weapons[] = {};
1010
requiredVersion = REQUIRED_VERSION;
11-
requiredAddons[] = {"A3_BaseConfig_F"};
11+
requiredAddons[] = {"A3_BaseConfig_F","A3_3DEN"};
1212
version = VERSION;
1313
authors[] = {"Spooner","Sickboy","Rocko"};
1414
};
1515
};
1616

17+
#include "Cfg3DEN.hpp"
1718
#include "CfgEventHandlers.hpp"
1819
#include "CfgFunctions.hpp"
1920

addons/common/fnc_onTeamColorChanged.sqf

Lines changed: 0 additions & 27 deletions
This file was deleted.

addons/common/fnc_setCallsign.sqf

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* ----------------------------------------------------------------------------
2+
Function: CBA_fnc_setCallsign
3+
4+
Description:
5+
Set call sign of a group.
6+
7+
Works in SP, MP and Eden-Editor and at any point.
8+
9+
Parameters:
10+
_group - A group <GROUP, OBJECT>
11+
_callsign - The call sign the group should receive <STRING>
12+
13+
Returns:
14+
Nothing
15+
16+
Example:
17+
(begin example)
18+
[group player, "Banana Squad"] call CBA_fnc_setCallsign
19+
(end)
20+
21+
Author:
22+
snippers, commy2
23+
---------------------------------------------------------------------------- */
24+
#include "script_component.hpp"
25+
SCRIPT(setCallsign);
26+
27+
params [["_group", grpNull, [grpNull, objNull]], ["_callsign", "", [""]]];
28+
29+
private _group = _group call CBA_fnc_getGroup;
30+
31+
if (is3DEN) then {
32+
_group setGroupId [_callsign];
33+
};
34+
35+
[{
36+
params ["_group", "_callsign"];
37+
38+
_group setGroupIdGlobal [_callsign];
39+
}, [_group, _callsign]] call CBA_fnc_execNextFrame;

addons/common/fnc_synchTeamColors.sqf

Lines changed: 0 additions & 26 deletions
This file was deleted.

addons/diagnostic/CfgEventHandlers.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11

2-
class Extended_PreStart_EventHandlers {
3-
class ADDON {
4-
init = QUOTE(call COMPILE_FILE(XEH_preStart));
5-
};
6-
};
7-
82
class Extended_PreInit_EventHandlers {
93
class ADDON {
104
init = QUOTE(call COMPILE_FILE(XEH_preInit));

0 commit comments

Comments
 (0)