Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/CBATeam/CBA_A3 into release
Browse files Browse the repository at this point in the history
  • Loading branch information
ViperMaul committed Sep 28, 2016
2 parents 2bc8a83 + 54ef2da commit 2a55e5b
Show file tree
Hide file tree
Showing 24 changed files with 345 additions and 470 deletions.
14 changes: 14 additions & 0 deletions addons/common/Cfg3DEN.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

class Cfg3DEN {
class Group {
class AttributeCategories {
class Init {
class Attributes {
class Callsign {
expression = "[_this, _value] call CBA_fnc_setCallsign";
};
};
};
};
};
};
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
1 change: 1 addition & 0 deletions addons/common/CfgFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CfgFunctions {
PATHTO_FNC(getGroupIndex);
PATHTO_FNC(getMagazineIndex);
PATHTO_FNC(currentMagazineIndex);
PATHTO_FNC(setCallsign);
};

class Soldiers {
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.

3 changes: 2 additions & 1 deletion addons/common/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ class CfgPatches {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"A3_BaseConfig_F"};
requiredAddons[] = {"A3_BaseConfig_F","A3_3DEN"};
version = VERSION;
authors[] = {"Spooner","Sickboy","Rocko"};
};
};

#include "Cfg3DEN.hpp"
#include "CfgEventHandlers.hpp"
#include "CfgFunctions.hpp"

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

This file was deleted.

39 changes: 39 additions & 0 deletions addons/common/fnc_setCallsign.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* ----------------------------------------------------------------------------
Function: CBA_fnc_setCallsign
Description:
Set call sign of a group.
Works in SP, MP and Eden-Editor and at any point.
Parameters:
_group - A group <GROUP, OBJECT>
_callsign - The call sign the group should receive <STRING>
Returns:
Nothing
Example:
(begin example)
[group player, "Banana Squad"] call CBA_fnc_setCallsign
(end)
Author:
snippers, commy2
---------------------------------------------------------------------------- */
#include "script_component.hpp"
SCRIPT(setCallsign);

params [["_group", grpNull, [grpNull, objNull]], ["_callsign", "", [""]]];

private _group = _group call CBA_fnc_getGroup;

if (is3DEN) then {
_group setGroupId [_callsign];
};

[{
params ["_group", "_callsign"];

_group setGroupIdGlobal [_callsign];
}, [_group, _callsign]] call CBA_fnc_execNextFrame;
26 changes: 0 additions & 26 deletions addons/common/fnc_synchTeamColors.sqf

This file was deleted.

6 changes: 0 additions & 6 deletions addons/diagnostic/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
9 changes: 5 additions & 4 deletions addons/diagnostic/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Any registered functions used in the PreINIT phase must use the uiNamespace copies of the variable.
// So uiNamespace getVariable "CBA_fnc_hashCreate" instead of just CBA_fnc_hashCreate -VM
#include "script_component.hpp"
SCRIPT(XEH_preInit);

LOG(MSG_INIT);

[QUOTE(GVAR(debug)), { _this call (uiNamespace getVariable "CBA_fnc_debug") }] call (uiNamespace getVariable "CBA_fnc_addEventHandler");
ADDON = false;

PREP(perf_loop);
[QGVAR(debug), {_this call CBA_fnc_debug}] call CBA_fnc_addEventHandler;

ADDON = true;
3 changes: 0 additions & 3 deletions addons/diagnostic/XEH_preStart.sqf

This file was deleted.

Loading

0 comments on commit 2a55e5b

Please sign in to comment.