ubode: fix physical prims space destroy

This commit is contained in:
UbitUmarov
2022-10-29 03:47:45 +01:00
parent c3107713f4
commit 3a628c335e

View File

@@ -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);
}