Skip to content

Commit

Permalink
Merge pull request #408 from CBATeam/xeh-namespace-for-incompatible-c…
Browse files Browse the repository at this point in the history
…lasses

change incompatible class check to use own namespace
  • Loading branch information
Killswitch00 authored Jul 5, 2016
2 parents 011e17c + cd910d0 commit 6868825
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions addons/xeh/fnc_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ GVAR(EventsLowercase) = [];
} forEach [XEH_EVENTS];

// generate list of incompatible classes
GVAR(incompatible) = [] call CBA_fnc_createNamespace;

{
private _class = configFile >> "CfgVehicles" >> _x;

Expand Down
5 changes: 2 additions & 3 deletions addons/xeh/script_component.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
#define SETEVENTHANDLERS(type,class,events) (missionNamespace setVariable [SYS_EVENTHANDLERS(type,class), events])

// For any class that does not comply with XEH or has at least one incompatible descendant.
#define SYS_INCOMP(class) format [QGVAR(\%1), class]
#define SETINCOMP(class) missionNamespace setVariable [SYS_INCOMP(class), true]
#define ISINCOMP(class) !isNil SYS_INCOMP(class)
#define ISINCOMP(class) !isNil {GVAR(incompatible) getVariable class}
#define SETINCOMP(class) GVAR(incompatible) setVariable [class, true]

// Event handler variables set.
#define ISPROCESSED(obj) (obj getVariable [QGVAR(isProcessed), false])
Expand Down

0 comments on commit 6868825

Please sign in to comment.