2015-01-15 21:50:48 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-06-21 19:10:50 +00:00
|
|
|
// Exit on Headless as well
|
|
|
|
if !(hasInterface) exitWith {};
|
|
|
|
|
2015-03-14 19:58:05 +00:00
|
|
|
LOG(MSG_INIT);
|
2015-01-16 08:13:29 +00:00
|
|
|
|
2015-03-14 19:58:05 +00:00
|
|
|
// Calculate the maximum zoom allowed for this map
|
|
|
|
call FUNC(determineZoom);
|
2015-01-16 08:13:29 +00:00
|
|
|
|
2015-03-14 20:15:28 +00:00
|
|
|
// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is.
|
|
|
|
// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
|
2015-01-11 16:42:31 +00:00
|
|
|
[] spawn {
|
2015-03-14 19:58:05 +00:00
|
|
|
// Wait until the map display is detected
|
|
|
|
waitUntil {(!isNull findDisplay 12)};
|
2015-01-16 08:13:29 +00:00
|
|
|
|
2015-03-14 19:58:05 +00:00
|
|
|
GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
2015-05-21 16:42:44 +00:00
|
|
|
GVAR(lastStillTime) = ACE_time;
|
2015-03-14 19:58:05 +00:00
|
|
|
GVAR(isShaking) = false;
|
2015-01-16 08:13:29 +00:00
|
|
|
|
2015-03-14 19:58:05 +00:00
|
|
|
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}];
|
2015-01-11 16:42:31 +00:00
|
|
|
};
|
2015-03-14 19:58:05 +00:00
|
|
|
|
2015-06-21 02:19:12 +00:00
|
|
|
["SettingsInitialized", {
|
|
|
|
// Start Blue Force Tracking if Enabled
|
|
|
|
if (GVAR(BFT_Enabled)) then {
|
|
|
|
GVAR(BFT_markers) = [];
|
|
|
|
[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler;
|
|
|
|
};
|
|
|
|
}] call EFUNC(common,addEventHandler);
|