From e3a711536b4c2dad76184747faa0118942368400 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 14 Feb 2008 01:57:19 +0000 Subject: * ODE - This fixes a few things and breaks a few more. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index bf54b02..12da6a7 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -92,7 +92,7 @@ namespace OpenSim.Region.Physics.OdePlugin private int debugcounter = 0; - public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size, + public OdePrim(String primName, OdeScene parent_scene, PhysicsVector pos, PhysicsVector size, Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode) { ode = dode; @@ -126,7 +126,7 @@ namespace OpenSim.Region.Physics.OdePlugin _pbs = pbs; _parent_scene = parent_scene; - m_targetSpace = targetSpace; + m_targetSpace = (IntPtr)0; if (pos.Z < 0) m_isphysical = false; @@ -433,6 +433,14 @@ namespace OpenSim.Region.Physics.OdePlugin } public void changeadd(float timestep) { + int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position); + IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position); + + if (targetspace == IntPtr.Zero) + targetspace = _parent_scene.createprimspace(iprimspaceArrItem[0], iprimspaceArrItem[1]); + + m_targetSpace = targetspace; + if (_mesh != null) { } @@ -630,11 +638,11 @@ namespace OpenSim.Region.Physics.OdePlugin public void changesize(float timestamp) { - if (!_parent_scene.geom_name_map.ContainsKey(prim_geom)) - { - m_taintsize = _size; - return; - } + //if (!_parent_scene.geom_name_map.ContainsKey(prim_geom)) + //{ + // m_taintsize = _size; + //return; + //} string oldname = _parent_scene.geom_name_map[prim_geom]; -- cgit v1.1