From 3da613adf5c803edfcca41f260017b96b1d80fb5 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 24 Apr 2012 23:13:57 +0100 Subject: fix chODE loosing some part positions when doing isPhysical false --- OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/UbitOdePlugin') diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs index dc6c18d..2d587ab 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs @@ -2467,15 +2467,14 @@ namespace OpenSim.Region.Physics.OdePlugin { if (prim_geom != IntPtr.Zero) { - d.Quaternion qtmp = new d.Quaternion { }; + d.Quaternion qtmp; d.GeomCopyQuaternion(prim_geom, out qtmp); _orientation.W = qtmp.W; _orientation.X = qtmp.X; _orientation.Y = qtmp.Y; _orientation.Z = qtmp.Z; - d.Vector3 lpos; - d.GeomCopyPosition(prim_geom, out lpos); + d.Vector3 lpos = d.GeomGetPosition(prim_geom); _position.X = lpos.X; _position.Y = lpos.Y; _position.Z = lpos.Z; @@ -3565,8 +3564,7 @@ namespace OpenSim.Region.Physics.OdePlugin { bool lastZeroFlag = _zeroFlag; - d.Vector3 lpos; - d.GeomCopyPosition(prim_geom, out lpos); // root position that is seem by rest of simulator + d.Vector3 lpos = d.GeomGetPosition(prim_geom); d.Quaternion ori; d.GeomCopyQuaternion(prim_geom, out ori); -- cgit v1.1