From 3a628c335ea55458407d641512123e31771bc1e8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 29 Oct 2022 03:47:45 +0100 Subject: [PATCH] ubode: fix physical prims space destroy --- OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs index fa1ce4da05..6dcc415f57 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -1446,7 +1446,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde //waitForSpaceUnlock(currentspace); SafeNativeMethods.SpaceRemove(currentspace, geom); - if (SafeNativeMethods.SpaceGetSublevel(currentspace) > 2 && SafeNativeMethods.SpaceGetNumGeoms(currentspace) == 0) + if (SafeNativeMethods.SpaceGetSublevel(currentspace) == 0 && SafeNativeMethods.SpaceGetNumGeoms(currentspace) == 0) { SafeNativeMethods.SpaceDestroy(currentspace); } @@ -1467,7 +1467,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde //waitForSpaceUnlock(currentspace); SafeNativeMethods.SpaceRemove(currentspace, geom); - if (SafeNativeMethods.SpaceGetSublevel(currentspace) > 2 && SafeNativeMethods.SpaceGetNumGeoms(currentspace) == 0) + if (SafeNativeMethods.SpaceGetSublevel(currentspace) == 0 && SafeNativeMethods.SpaceGetNumGeoms(currentspace) == 0) { SafeNativeMethods.SpaceDestroy(currentspace); }