From 2f515d6a27ff67cd740a00788ef4f2bb2285c51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E9=9D=92=E5=B1=B1?= Date: Wed, 18 Sep 2024 07:56:57 +0800 Subject: [PATCH] Add forgotten `get_space()` check in `GodotArea3D::remove_soft_body_from_query()` My fault, I added a `get_space()` check for the other `GodotArea3D::remove_*_from_query()` but forgot about `soft_body`. --- servers/physics_3d/godot_area_3d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/physics_3d/godot_area_3d.h b/servers/physics_3d/godot_area_3d.h index 701dc739177..2c1a782630e 100644 --- a/servers/physics_3d/godot_area_3d.h +++ b/servers/physics_3d/godot_area_3d.h @@ -188,7 +188,7 @@ void GodotArea3D::add_soft_body_to_query(GodotSoftBody3D *p_soft_body, uint32_t void GodotArea3D::remove_soft_body_from_query(GodotSoftBody3D *p_soft_body, uint32_t p_soft_body_shape, uint32_t p_area_shape) { BodyKey bk(p_soft_body, p_soft_body_shape, p_area_shape); monitored_soft_bodies[bk].dec(); - if (!monitor_query_list.in_list()) { + if (get_space() && !monitor_query_list.in_list()) { _queue_monitor_update(); } }