mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#1383 - Fix map shake interfering with other anims
Don't run ctrlMapAnimClear each frame, only when ending the animation
This commit is contained in:
parent
4a12f53855
commit
7dec983397
@ -57,12 +57,12 @@ if (GVAR(mapShake)) then {
|
|||||||
} else {
|
} else {
|
||||||
if (GVAR(isShaking)) then {
|
if (GVAR(isShaking)) then {
|
||||||
// Stop shaking, return to original position
|
// Stop shaking, return to original position
|
||||||
|
ctrlMapAnimClear _mapCtrl;
|
||||||
_mapCtrl ctrlMapAnimAdd [0, _mapScale, GVAR(lastStillPosition)];
|
_mapCtrl ctrlMapAnimAdd [0, _mapScale, GVAR(lastStillPosition)];
|
||||||
ctrlMapAnimCommit _mapCtrl;
|
ctrlMapAnimCommit _mapCtrl;
|
||||||
GVAR(isShaking) = false;
|
GVAR(isShaking) = false;
|
||||||
} else {
|
} else {
|
||||||
// The map is still, store state
|
// The map is still, store state
|
||||||
ctrlMapAnimClear _mapCtrl;
|
|
||||||
GVAR(lastStillPosition) = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5];
|
GVAR(lastStillPosition) = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5];
|
||||||
GVAR(lastStillTime) = ACE_time;
|
GVAR(lastStillTime) = ACE_time;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user