Put the arrows into the minimap. Fixed the issue with curved section of port marks.

#fix #implement
This commit is contained in:
Calum
2017-09-28 10:19:32 +13:00
parent 275a2cbab7
commit d1edbc4b8a
2 changed files with 2 additions and 2 deletions
@@ -30,7 +30,7 @@ public class MiniMap extends MapPreview {
this.boats = boats;
this.player = player;
setBoats(boats);
// player.addMarkRoundingListener(this::updateMarkArrows);
player.addMarkRoundingListener(this::updateMarkArrows);
}
public void setBoats(List<ClientYacht> yachts) {
@@ -106,7 +106,7 @@ public class MarkArrowFactory {
Arc roundSection = new Arc(
0, 0, MARK_ARROW_SEPARATION, MARK_ARROW_SEPARATION,
//Where to start drawing arc from
(roundingSide == RoundingSide.PORT ? 0 : angleOfEntry),
(roundingSide == RoundingSide.PORT ? 180 + angleOfEntry : angleOfEntry),
//Which way to go around the mark. (clockwise vs anticlockwise)
roundingSide == RoundingSide.PORT ? Math.abs(angleOfExit - angleOfEntry) : -Math.abs(angleOfEntry - angleOfExit)
);