Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache incompatibleClasses at preStart #1053

Merged
merged 2 commits into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addons/xeh/fnc_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ GVAR(EventsLowercase) = [];

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

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

while {isClass _class && {!ISINCOMP(configName _class)}} do {
SETINCOMP(configName _class);

_class = inheritsFrom _class;
};
} forEach ([false, true] call CBA_fnc_supportMonitor);
} forEach call (uiNamespace getVariable [QGVAR(incompatibleClasses), {[]}]);

// always recompile extended event handlers
#ifdef DEBUG_MODE_FULL
Expand Down
3 changes: 3 additions & 0 deletions addons/xeh/fnc_preStart.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@ with uiNamespace do {
diag_log text format ["[XEH]: %1 does not support Extended Event Handlers! Addon: %2", _classname, _addon];
};
} forEach (true call CBA_fnc_supportMonitor);

// cache incompatible classes that are needed in preInit
GVAR(incompatibleClasses) = compileFinal str ([false, true] call CBA_fnc_supportMonitor);
};