Skip to content

Commit

Permalink
fix marker spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
mgkid3310 committed Apr 28, 2021
1 parent 10171e0 commit 3dc588a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions addons/atc/functions/fnc_updateMarkerSpacing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ private _scaleNow = ctrlMapScale ((findDisplay 12) displayCtrl 51);

private _xOffset = GVAR(xOffset) * (_scaleNow / GVAR(scaleStd));
private _yOffset = GVAR(yOffset) * (_scaleNow / GVAR(scaleStd));
private _ySpace = (linearConversion [GVAR(fontMin), GVAR(fontMax), _scaleNow, GVAR(spaceMax), GVAR(spaceMin), true]) * (_scaleNow / GVAR(scaleStd));

private _size = getMarkerSize _marker1;
private _xSpace = (_size select 0) * (_scaleNow / GVAR(scaleStd));
private _ySpace = ((_size select 1) + linearConversion [GVAR(fontMin), GVAR(fontMax), _scaleNow, GVAR(spaceMax), GVAR(spaceMin), true]) * (_scaleNow / GVAR(scaleStd));

_marker1 setMarkerPosLocal (_pos vectorAdd [_xOffset + _xSpace, _yOffset, 0]);
_marker2 setMarkerPosLocal (_pos vectorAdd [_xOffset + _xSpace, _yOffset - _ySpace, 0]);
_marker3 setMarkerPosLocal (_pos vectorAdd [_xOffset + _xSpace, _yOffset - (_ySpace * 2), 0]);
_marker4 setMarkerPosLocal (_pos vectorAdd [_xOffset + (_xSpace * 2), _yOffset + _ySpace, 0]);
_marker1 setMarkerPosLocal (_pos vectorAdd [_xOffset, _yOffset, 0]);
_marker2 setMarkerPosLocal (_pos vectorAdd [_xOffset, _yOffset - _ySpace, 0]);
_marker3 setMarkerPosLocal (_pos vectorAdd [_xOffset, _yOffset - (_ySpace * 2), 0]);
_marker4 setMarkerPosLocal (_pos vectorAdd [_xOffset, _yOffset + _ySpace, 0]);
} forEach _array;

0 comments on commit 3dc588a

Please sign in to comment.