Merge pull request #9281 from Hydrox6/hd-prayer-bar-flick-fix

prayer: fix HD prayer bar flick location
This commit is contained in:
Adam
2019-07-08 11:48:09 -04:00
committed by GitHub

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);