Skip to content

Commit

Permalink
change incompatible class check to use own namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 committed Jul 4, 2016
1 parent a87f99b commit cd910d0
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 cd910d0

Please sign in to comment.