Add missing break in NavigationObstacle2D

This commit is contained in:
Haoyu Qiu 2022-01-06 21:23:53 +08:00
parent 72dcf3816d
commit e97cae86b8

View file

@ -87,10 +87,10 @@ void NavigationObstacle2D::_notification(int p_what) {
case NOTIFICATION_PARENTED: { case NOTIFICATION_PARENTED: {
parent_node2d = Object::cast_to<Node2D>(get_parent()); parent_node2d = Object::cast_to<Node2D>(get_parent());
reevaluate_agent_radius(); reevaluate_agent_radius();
} } break;
case NOTIFICATION_UNPARENTED: { case NOTIFICATION_UNPARENTED: {
parent_node2d = nullptr; parent_node2d = nullptr;
} } break;
case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: { case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
if (parent_node2d) { if (parent_node2d) {
Navigation2DServer::get_singleton()->agent_set_position(agent, parent_node2d->get_global_transform().get_origin()); Navigation2DServer::get_singleton()->agent_set_position(agent, parent_node2d->get_global_transform().get_origin());