assert(_used_rect.get_area() >= 0)

This commit is contained in:
2024-06-01 17:39:16 +02:00
parent 484c0cd080
commit 4543f67a26
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ func _init(map: TileMap):
_used_rect = map.get_used_rect() _used_rect = map.get_used_rect()
# assert stuff here because the extension's assertions just crash without a message # assert stuff here because the extension's assertions just crash without a message
assert(_used_rect.get_area() > 0) assert(_used_rect.get_area() >= 0)
_astar = MultilevelAStarEx.new() _astar = MultilevelAStarEx.new()
_astar.init(_used_rect) _astar.init(_used_rect)

View File

@@ -79,7 +79,7 @@ void MultilevelAStarEx::init(const Rect2i &region)
{ {
DEV_ASSERT(!_init); DEV_ASSERT(!_init);
DEV_ASSERT(region.get_area() > 0); DEV_ASSERT(region.get_area() >= 0);
_region = region; _region = region;
_width = region.get_size().width; _width = region.get_size().width;