ACE3/addons/mapfx/XEH_postClientInit.sqf
Nicolás Badano 8d0cc787b0 Initial port/reimplementation of ace_mapfx, providing:
- dynamic map illumination
- shacking maps when on the move
- optional max zoom
2015-03-12 21:04:10 -03:00

22 lines
561 B
Plaintext

#include "script_component.hpp"
ADDON = false;
LOG(MSG_INIT);
call FUNC(determineZoom);
//Probably need this spawn, because CBA_fnc_addPerFrameHandler doesn't work durring briefing.
[] spawn {
// Wait until the map display is detected
waitUntil {(!isNull findDisplay 12)};
GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
GVAR(lastStillTime) = time;
GVAR(isShaking) = false;
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapFx);}];
};
ADDON = true;