forked from CBATeam/CBA_A3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to watchdog to run preInit in 3den
- Loading branch information
1 parent
92a141d
commit e7286f8
Showing
2 changed files
with
9 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
#include "script_component.hpp" | ||
|
||
// fix for preInit = 1 functions not being executed when entering 3den from main menu | ||
[] call CBA_fnc_preInit; | ||
params ["_display"]; | ||
|
||
// since 1.60, preInit = 1 functions aren't executed when returning from a preview either ... | ||
add3DENEventHandler ["OnMissionPreviewEnd", {[] call CBA_fnc_preInit}]; | ||
private _fnc_watchDog = { | ||
if (!ISPROCESSED(missionNamespace)) then { | ||
diag_log text format ["XEH: missionNamespace processed [%1]", ISPROCESSED(missionNamespace)]; | ||
[] call CBA_fnc_preInit; | ||
}; | ||
}; | ||
|
||
// switching terrains in 3den will reset missionNamespace | ||
add3DENEventHandler ["OnTerrainNew", {[] call CBA_fnc_preInit}]; | ||
add3DENEventHandler ["OnMissionNew", {[] call CBA_fnc_preInit}]; | ||
add3DENEventHandler ["OnMissionLoad", {[] call CBA_fnc_preInit}]; | ||
_display displayAddEventHandler ["MouseMoving", _fnc_watchDog]; | ||
_display displayAddEventHandler ["MouseHolding", _fnc_watchDog]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters