Add a check to prevent user to call AStarGrid2D::update when its not needed
This commit is contained in:
1 parent
b97110cd30
commit
453c8753a9
1 file changed
+4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user