summaryrefslogtreecommitdiffstats
path: root/scene/3d/navigation_agent_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/navigation_agent_3d.cpp')
-rw-r--r--scene/3d/navigation_agent_3d.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/scene/3d/navigation_agent_3d.cpp b/scene/3d/navigation_agent_3d.cpp
index 87b8087e44..b311495a7f 100644
--- a/scene/3d/navigation_agent_3d.cpp
+++ b/scene/3d/navigation_agent_3d.cpp
@@ -311,11 +311,9 @@ void NavigationAgent3D::_notification(int p_what) {
}
void NavigationAgent3D::_validate_property(PropertyInfo &p_property) const {
- if (p_property.name == "keep_y_velocity") {
- if (use_3d_avoidance) {
- p_property.usage = PROPERTY_USAGE_NONE;
- return;
- }
+ if (p_property.name == "keep_y_velocity" && use_3d_avoidance) {
+ p_property.usage = PROPERTY_USAGE_NONE;
+ return;
}
}