Map Tools - Fix for 2.14 aspect ratio changes (#9219)

Close #9176
This commit is contained in:
PabstMirror 2023-08-25 10:25:00 -05:00 committed by GitHub
parent 6c0797eaa2
commit 59fa842527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,10 @@ if (GVAR(freedrawing)) then {[_theMap, _textureWidth] call FUNC(drawLinesOnRoame
// Update scale of both parts
getResolution params ["_resWidth", "_resHeight", "", "", "_aspectRatio"];
private _scaleX = 32 * _textureWidth * CONSTANT_SCALE * (call FUNC(calculateMapScale));
private _scaleY = _scaleX * ((_resWidth / _resHeight) / _aspectRatio); //handle bad aspect ratios
private _scaleY = _scaleX;
if (((productVersion # 2) < 213)) then { // remove block after 2.14 release
_scaleY = _scaleX * ((_resWidth / _resHeight) / _aspectRatio); // handle bad aspect ratios
};
// Position of the fixed part
private _xPos = GVAR(mapTool_pos) select 0;