Skip to content

Commit

Permalink
Add a check to prevent user to call AStarGrid2D::update when its no…
Browse files Browse the repository at this point in the history
…t needed
  • Loading branch information
Chaosus committed Jul 6, 2024
1 parent b97110c commit 453c875
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/math/a_star_grid_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ AStarGrid2D::CellShape AStarGrid2D::get_cell_shape() const {
}

void AStarGrid2D::update() {
if (!dirty) {
return;
}

points.clear();

const int32_t end_x = region.get_end().x;
Expand Down

0 comments on commit 453c875

Please sign in to comment.