Remove setter from SP.OffsetPosition, since all sets should flow through SP.AbsolutePosition
OffsetPosition is also misnamed - it returns the absolute position and never contains an offset.remove-scene-viewer
parent
c38b25a1d2
commit
b2356340d2
|
@ -26,8 +26,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
using System.Security.Permissions;
|
using System.Security.Permissions;
|
||||||
|
using log4net;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
@ -35,6 +37,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
public abstract class EntityBase : ISceneEntity
|
public abstract class EntityBase : ISceneEntity
|
||||||
{
|
{
|
||||||
|
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The scene to which this entity belongs
|
/// The scene to which this entity belongs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -71,12 +75,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
protected Vector3 m_pos;
|
protected Vector3 m_pos;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Absolute position of this entity in a scene.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual Vector3 AbsolutePosition
|
public virtual Vector3 AbsolutePosition
|
||||||
{
|
{
|
||||||
get { return m_pos; }
|
get { return m_pos; }
|
||||||
set { m_pos = value; }
|
set
|
||||||
|
{
|
||||||
|
m_pos = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Vector3 m_velocity;
|
protected Vector3 m_velocity;
|
||||||
|
|
|
@ -467,7 +467,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
PhysicsActor actor = m_physicsActor;
|
PhysicsActor actor = m_physicsActor;
|
||||||
if (actor != null)
|
if (actor != null)
|
||||||
|
{
|
||||||
m_pos = actor.Position;
|
m_pos = actor.Position;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Obtain the correct position of a seated avatar.
|
// Obtain the correct position of a seated avatar.
|
||||||
|
@ -517,13 +519,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_pos = value;
|
m_pos = value;
|
||||||
m_parentPosition = Vector3.Zero;
|
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
|
public Vector3 OffsetPosition
|
||||||
{
|
{
|
||||||
get { return m_pos; }
|
get { return m_pos; }
|
||||||
set { m_pos = value; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -556,6 +561,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
m_velocity = value;
|
m_velocity = value;
|
||||||
|
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}",
|
||||||
|
// Scene.RegionInfo.RegionName, Name, m_velocity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1219,7 +1228,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: Received agent update from {0}", remoteClient.Name);
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE PRESENCE]: In {0} received agent update from {1}",
|
||||||
|
// Scene.RegionInfo.RegionName, remoteClient.Name);
|
||||||
|
|
||||||
//if (m_isChildAgent)
|
//if (m_isChildAgent)
|
||||||
//{
|
//{
|
||||||
|
|
Loading…
Reference in New Issue