Map - Fix map shake (#7252)

This commit is contained in:
PabstMirror 2019-10-29 17:10:54 -05:00 committed by GitHub
parent 40a66f0bde
commit 82c6c343b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,12 @@ if (ctrlIDD _display != IDD_MAIN_MAP) exitWith {};
private _control = _display displayCtrl IDC_MAP;
GVAR(lastStillPosition) = _control ctrlMapScreenToWorld [0.5, 0.5];
[{
if (!GVAR(isShaking)) then { // player map position won't be correct until a frame later
GVAR(lastStillPosition) = _this ctrlMapScreenToWorld [0.5, 0.5];
};
}, _control] call CBA_fnc_execNextFrame;
GVAR(lastStillTime) = CBA_missionTime;
GVAR(isShaking) = false;