diff --git a/OpenSim/Region/Framework/Scenes/EntityBase.cs b/OpenSim/Region/Framework/Scenes/EntityBase.cs
index 213431a7df..320b904ff4 100644
--- a/OpenSim/Region/Framework/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityBase.cs
@@ -26,8 +26,10 @@
*/
using System;
+using System.Reflection;
using System.Runtime.Serialization;
using System.Security.Permissions;
+using log4net;
using OpenSim.Framework;
using OpenMetaverse;
@@ -35,6 +37,8 @@ namespace OpenSim.Region.Framework.Scenes
{
public abstract class EntityBase : ISceneEntity
{
+ private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
///
/// The scene to which this entity belongs
///
@@ -71,12 +75,15 @@ namespace OpenSim.Region.Framework.Scenes
protected Vector3 m_pos;
///
- ///
+ /// Absolute position of this entity in a scene.
///
public virtual Vector3 AbsolutePosition
{
get { return m_pos; }
- set { m_pos = value; }
+ set
+ {
+ m_pos = value;
+ }
}
protected Vector3 m_velocity;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 541469388e..97722b7f59 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -804,7 +804,7 @@ namespace OpenSim.Region.Framework.Scenes
if (av.LinkedPrim == m_uuid)
{
Vector3 offset = (m_offsetPosition - oldpos);
- av.OffsetPosition += offset;
+ av.AbsolutePosition += offset;
av.SendAvatarDataToAllAgents();
}
}
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index fa6945caf3..712ec702d2 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -492,7 +492,9 @@ namespace OpenSim.Region.Framework.Scenes
PhysicsActor actor = m_physicsActor;
// if (actor != null)
if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting!
+ {
m_pos = actor.Position;
+ }
else
{
// Obtain the correct position of a seated avatar.
@@ -540,16 +542,20 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- if (m_parentID == 0) // KF Do NOT update m_pos here if Av is sitting!
+// Changed this to update unconditionally to make npose work
+// if (m_parentID == 0) // KF Do NOT update m_pos here if Av is sitting!
m_pos = value;
m_parentPosition = Vector3.Zero;
+
+// m_log.DebugFormat(
+// "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}",
+// Scene.RegionInfo.RegionName, Name, m_pos);
}
}
public Vector3 OffsetPosition
{
get { return m_pos; }
- set { m_pos = value; }
}
///
@@ -582,6 +588,10 @@ namespace OpenSim.Region.Framework.Scenes
}
m_velocity = value;
+
+// m_log.DebugFormat(
+// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}",
+// Scene.RegionInfo.RegionName, Name, m_velocity);
}
}
@@ -4340,4 +4350,4 @@ namespace OpenSim.Region.Framework.Scenes
}
}
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 769c84ee0a..4f21c6733c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7481,7 +7481,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return;
LSL_Vector v;
v = rules.GetVector3Item(idx++);
- av.OffsetPosition = new Vector3((float)v.x, (float)v.y, (float)v.z);
+ av.AbsolutePosition = new Vector3((float)v.x, (float)v.y, (float)v.z);
av.SendAvatarDataToAllAgents();
break;