Skip to content

Commit

Permalink
devtools: fix zone borders to draw at tile height
Browse files Browse the repository at this point in the history
This was confusing planes and y
  • Loading branch information
Adam- committed Oct 31, 2024
1 parent 6b6f796 commit 5282315
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ private void renderZoneBorders(Graphics2D graphics)
boolean first = true;
for (int z = startZ; z <= endZ; z += Constants.CHUNK_SIZE)
{
Point p = Perspective.localToCanvas(client,
x << Perspective.LOCAL_COORD_BITS, z << Perspective.LOCAL_COORD_BITS,
client.getPlane());
LocalPoint lp = new LocalPoint(x << Perspective.LOCAL_COORD_BITS, z << Perspective.LOCAL_COORD_BITS);
Point p = Perspective.localToCanvas(client, lp, client.getPlane());
if (p != null)
{
if (first)
Expand All @@ -158,9 +157,8 @@ private void renderZoneBorders(Graphics2D graphics)
boolean first = true;
for (int x = startX; x <= endX; x += Constants.CHUNK_SIZE)
{
Point p = Perspective.localToCanvas(client,
x << Perspective.LOCAL_COORD_BITS, z << Perspective.LOCAL_COORD_BITS,
client.getPlane());
LocalPoint lp = new LocalPoint(x << Perspective.LOCAL_COORD_BITS, z << Perspective.LOCAL_COORD_BITS);
Point p = Perspective.localToCanvas(client, lp, client.getPlane());
if (p != null)
{
if (first)
Expand Down

0 comments on commit 5282315

Please sign in to comment.