Skip to content

Commit

Permalink
Merge pull request #295 from CBATeam/3denpreInit
Browse files Browse the repository at this point in the history
always execute XEH preInit in 3den, fix #292
  • Loading branch information
Killswitch00 committed Mar 6, 2016
2 parents 5e2aff7 + 5b4f52d commit 2eea6a3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
5 changes: 3 additions & 2 deletions addons/xeh/CfgEventHandlers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ class Extended_WeaponDisassembled_EventHandlers {};

// display xeh
class Extended_DisplayLoad_EventHandlers {
class RscDisplayInterrupt {
GVAR(3denFix) = QUOTE(call COMPILE_FILE(XEH_interruptDisplayLoad));
// fix for preInit = 1 functions not being executed when entering 3den from main menu
class Display3DEN {
ADDON = "[] call CBA_fnc_preInit;";
};
};
class Extended_DisplayUnload_EventHandlers {};
11 changes: 0 additions & 11 deletions addons/xeh/XEH_interruptDisplayLoad.sqf

This file was deleted.

7 changes: 3 additions & 4 deletions addons/xeh/fnc_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ Author:
---------------------------------------------------------------------------- */
#include "script_component.hpp"

// hack to fix 3den executing preInit unnecessarily when returning from a preview
if (uiNamespace getVariable [QGVAR(3denFix), false]) exitWith {
uiNamespace setVariable [QGVAR(3denFix), false];
diag_log text "[XEH]: 3den preview detected. Abort preInit.";
if (ISPROCESSED(missionNamespace)) exitWith {
diag_log text "[XEH]: preInit already executed. Abort preInit.";
};
SETPROCESSED(missionNamespace);

SLX_XEH_DisableLogging = uiNamespace getVariable ["SLX_XEH_DisableLogging", false]; // get from preStart

Expand Down

0 comments on commit 2eea6a3

Please sign in to comment.