prayer: fix HD prayer bar flick location

This commit is contained in:
Hydrox6
2019-07-04 14:51:32 +01:00
parent d7a1e51041
commit f213753c7e

View File

@@ -109,10 +109,11 @@ class PrayerBarOverlay extends Overlay
final double t = plugin.getTickProgress();
final int halfBarWidth = (barWidth / 2) - HD_PRAYER_BAR_PADDING;
final int xOffset = (int) (-Math.cos(t) * halfBarWidth) + ((barWidth / 2) - halfBarWidth);
final int xOffset = (int) (-Math.cos(t) * halfBarWidth) + halfBarWidth;
graphics.setColor(FLICK_HELP_COLOR);
graphics.fillRect(barX + xOffset + HD_PRAYER_BAR_PADDING, barY + HD_PRAYER_BAR_PADDING, 1, barHeight - HD_PRAYER_BAR_PADDING * 2);
// Padding is accounted for in the offset calculation
graphics.fillRect(barX + xOffset, barY + HD_PRAYER_BAR_PADDING, 1, barHeight - HD_PRAYER_BAR_PADDING * 2);
}
return new Dimension(barWidth, barHeight);