# HG changeset patch # User alys # Date 2021-04-10 05:02:49 # Node ID c85bdc15caa1b77f286878fbc99453acd54b96f3 # Parent a559764ef4c9ea1503f0d15870fb412745aaab9b Make code more comprehensible. diff --git a/isometric-park-fna/FNAGame.cs b/isometric-park-fna/FNAGame.cs --- a/isometric-park-fna/FNAGame.cs +++ b/isometric-park-fna/FNAGame.cs @@ -624,9 +624,8 @@ #region draw_cursor //drawTileAt((int)this.mouseGrid.X, (int)this.mouseGrid.Y, 2, 1, 0.85f); //between tiles and gridlines - //TODO figure out why it has to be -1 - if (MathUtils.Between(this.mouseGrid.X, -1, this.simulation.map.MapWidth) - && MathUtils.Between(this.mouseGrid.Y, -1, this.simulation.map.MapHeight)) + if (MathUtils.BetweenInclusive(this.mouseGrid.X, 0, this.simulation.map.MapWidth) + && MathUtils.BetweenInclusive(this.mouseGrid.Y, 0, this.simulation.map.MapHeight)) { Tile.OutlineSquare(batch, this.mouseGrid.X, this.mouseGrid.Y, Color.Yellow, 1); }