From 327fad2a6e2edbc202797a22501f69d363b8191d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 29 Oct 2022 03:49:53 +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 ae84f3d0b8..975bbeca31 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEScene.cs @@ -1582,7 +1582,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); } @@ -1603,7 +1603,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); }