Merge pull request #68072 from sambriels/backport-of-pull-request-67939
fix: emit target_reached signal after updating state
This commit is contained in:
commit
9f4d767514
1 changed files with 1 additions and 1 deletions
|
@ -481,8 +481,8 @@ void NavigationAgent2D::_request_repath() {
|
||||||
void NavigationAgent2D::_check_distance_to_target() {
|
void NavigationAgent2D::_check_distance_to_target() {
|
||||||
if (!target_reached) {
|
if (!target_reached) {
|
||||||
if (distance_to_target() < target_desired_distance) {
|
if (distance_to_target() < target_desired_distance) {
|
||||||
emit_signal("target_reached");
|
|
||||||
target_reached = true;
|
target_reached = true;
|
||||||
|
emit_signal("target_reached");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue