runelite-api: fix worldToMiniMap not working correctly in stretched mode

Fixes Perspective#worldToMinimap not returning correct values if in fixed mode and using the stretched fixed mode plugin.
This commit is contained in:
Lotto
2018-03-07 00:23:26 +01:00
parent bc5d21675a
commit 01483c9f8e

View File

@@ -230,7 +230,9 @@ public class Perspective
int xx = y * sin + cos * x >> 16;
int yy = sin * x - y * cos >> 16;
int miniMapX = client.getCanvas().getWidth() - (!client.isResized() ? 208 : 167);
int miniMapX = client.isResized()
? client.getCanvas().getWidth() - 167
: Constants.GAME_FIXED_WIDTH - 208;
x = (miniMapX + 167 / 2) + xx;
y = (167 / 2 - 1) + yy;