From 3bb4cd51fda642fa7df32f724400e9f60242027a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 18 Nov 2007 20:24:51 +0000 Subject: * 2nd attempt to fix the Spaceborder/copy bug --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index ee5e777..2e28a81 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -409,7 +409,11 @@ namespace OpenSim.Region.Physics.OdePlugin // If the geometry is in the targetspace, remove it from the target space if (d.SpaceQuery(((OdePrim)prim).m_targetSpace, ((OdePrim)prim).prim_geom)) { - d.SpaceRemove(((OdePrim)prim).m_targetSpace, ((OdePrim)prim).prim_geom); + if (!(((OdePrim)prim).m_targetSpace.Equals(null))) + { + if (d.GeomIsSpace(((OdePrim)prim).m_targetSpace)) + d.SpaceRemove(((OdePrim)prim).m_targetSpace, ((OdePrim)prim).prim_geom); + } } @@ -466,6 +470,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (!(sGeomIsIn.Equals(null))) { if (sGeomIsIn != (IntPtr)0) + if (d.GeomIsSpace(currentspace)) d.SpaceRemove(sGeomIsIn, geom); } } -- cgit v1.1