mirror of
https://github.com/godotengine/godot.git
synced 2024-11-23 12:43:43 +00:00
Fix TileMap error msg when optional navigation node is not set
Fixes TileMap error msg spam when bake_navigation=true but the optional and depr navigation node is not set.
(cherry picked from commit 30d4555c65
)
This commit is contained in:
parent
fe075cf6d5
commit
a6b75da78c
@ -157,7 +157,11 @@ void TileMap::_update_quadrant_transform() {
|
||||
|
||||
Transform2D nav_rel;
|
||||
if (bake_navigation) {
|
||||
nav_rel = get_relative_transform_to_parent(navigation);
|
||||
if (navigation) {
|
||||
nav_rel = get_relative_transform_to_parent(navigation);
|
||||
} else {
|
||||
nav_rel = get_transform();
|
||||
}
|
||||
}
|
||||
|
||||
for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) {
|
||||
@ -339,7 +343,11 @@ void TileMap::update_dirty_quadrants() {
|
||||
Vector2 tofs = get_cell_draw_offset();
|
||||
Transform2D nav_rel;
|
||||
if (bake_navigation) {
|
||||
nav_rel = get_relative_transform_to_parent(navigation);
|
||||
if (navigation) {
|
||||
nav_rel = get_relative_transform_to_parent(navigation);
|
||||
} else {
|
||||
nav_rel = get_transform();
|
||||
}
|
||||
}
|
||||
|
||||
Vector2 qofs;
|
||||
|
Loading…
Reference in New Issue
Block a user