Moved infinite spawned loop to Loaded event for handing save game loads. Events for the win! diag_activeSQFScripts as of this build returns empty on a bare mission.

This commit is contained in:
Nou 2015-04-25 00:49:47 -07:00
parent cd13ee84b4
commit c8e6e7018c

View File

@ -97,14 +97,16 @@ if (!hasInterface) exitWith {};
call COMPILE_FILE(scripts\assignedItemFix); call COMPILE_FILE(scripts\assignedItemFix);
call COMPILE_FILE(scripts\initScrollWheel); call COMPILE_FILE(scripts\initScrollWheel);
0 spawn { DFUNC(mouseZHandler) = {
while {true} do { waitUntil {!isNull (findDisplay 46)}; sleep 0.1;
waitUntil {!isNull (findDisplay 46)}; sleep 0.1; findDisplay 46 displayAddEventHandler ["MouseZChanged", QUOTE( _this call GVAR(onScrollWheel) )];
findDisplay 46 displayAddEventHandler ["MouseZChanged", QUOTE( _this call GVAR(onScrollWheel) )]; [false] call FUNC(disableUserInput);
[false] call FUNC(disableUserInput);
waitUntil {isNull (findDisplay 46)};
};
}; };
addMissionEventHandler ["Loaded", FUNC(mouseZHandler)];
[] spawn FUNC(mouseZHandler);
enableCamShake true; enableCamShake true;
// Set the name for the current player // Set the name for the current player