aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/EntityBase.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs17
2 files changed, 23 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EntityBase.cs b/OpenSim/Region/Framework/Scenes/EntityBase.cs
index 213431a..320b904 100644
--- a/OpenSim/Region/Framework/Scenes/EntityBase.cs
+++ b/OpenSim/Region/Framework/Scenes/EntityBase.cs
@@ -26,8 +26,10 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Reflection;
29using System.Runtime.Serialization; 30using System.Runtime.Serialization;
30using System.Security.Permissions; 31using System.Security.Permissions;
32using log4net;
31using OpenSim.Framework; 33using OpenSim.Framework;
32using OpenMetaverse; 34using OpenMetaverse;
33 35
@@ -35,6 +37,8 @@ namespace OpenSim.Region.Framework.Scenes
35{ 37{
36 public abstract class EntityBase : ISceneEntity 38 public abstract class EntityBase : ISceneEntity
37 { 39 {
40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41
38 /// <summary> 42 /// <summary>
39 /// The scene to which this entity belongs 43 /// The scene to which this entity belongs
40 /// </summary> 44 /// </summary>
@@ -71,12 +75,15 @@ namespace OpenSim.Region.Framework.Scenes
71 protected Vector3 m_pos; 75 protected Vector3 m_pos;
72 76
73 /// <summary> 77 /// <summary>
74 /// 78 /// Absolute position of this entity in a scene.
75 /// </summary> 79 /// </summary>
76 public virtual Vector3 AbsolutePosition 80 public virtual Vector3 AbsolutePosition
77 { 81 {
78 get { return m_pos; } 82 get { return m_pos; }
79 set { m_pos = value; } 83 set
84 {
85 m_pos = value;
86 }
80 } 87 }
81 88
82 protected Vector3 m_velocity; 89 protected Vector3 m_velocity;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a8eff70..2b7966b 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -467,7 +467,9 @@ namespace OpenSim.Region.Framework.Scenes
467 { 467 {
468 PhysicsActor actor = m_physicsActor; 468 PhysicsActor actor = m_physicsActor;
469 if (actor != null) 469 if (actor != null)
470 {
470 m_pos = actor.Position; 471 m_pos = actor.Position;
472 }
471 else 473 else
472 { 474 {
473 // Obtain the correct position of a seated avatar. 475 // Obtain the correct position of a seated avatar.
@@ -517,13 +519,16 @@ namespace OpenSim.Region.Framework.Scenes
517 519
518 m_pos = value; 520 m_pos = value;
519 m_parentPosition = Vector3.Zero; 521 m_parentPosition = Vector3.Zero;
522
523// m_log.DebugFormat(
524// "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}",
525// Scene.RegionInfo.RegionName, Name, m_pos);
520 } 526 }
521 } 527 }
522 528
523 public Vector3 OffsetPosition 529 public Vector3 OffsetPosition
524 { 530 {
525 get { return m_pos; } 531 get { return m_pos; }
526 set { m_pos = value; }
527 } 532 }
528 533
529 /// <summary> 534 /// <summary>
@@ -556,6 +561,10 @@ namespace OpenSim.Region.Framework.Scenes
556 } 561 }
557 562
558 m_velocity = value; 563 m_velocity = value;
564
565// m_log.DebugFormat(
566// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}",
567// Scene.RegionInfo.RegionName, Name, m_velocity);
559 } 568 }
560 } 569 }
561 570
@@ -1219,7 +1228,9 @@ namespace OpenSim.Region.Framework.Scenes
1219 /// </summary> 1228 /// </summary>
1220 public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) 1229 public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData)
1221 { 1230 {
1222// m_log.DebugFormat("[SCENE PRESENCE]: Received agent update from {0}", remoteClient.Name); 1231// m_log.DebugFormat(
1232// "[SCENE PRESENCE]: In {0} received agent update from {1}",
1233// Scene.RegionInfo.RegionName, remoteClient.Name);
1223 1234
1224 //if (m_isChildAgent) 1235 //if (m_isChildAgent)
1225 //{ 1236 //{
@@ -3323,7 +3334,7 @@ namespace OpenSim.Region.Framework.Scenes
3323 //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f)) 3334 //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f))
3324 // The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents( 3335 // The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents(
3325 // as of this comment the interval is set in AddToPhysicalScene 3336 // as of this comment the interval is set in AddToPhysicalScene
3326 if (Animator!=null) 3337 if (Animator != null)
3327 Animator.UpdateMovementAnimations(); 3338 Animator.UpdateMovementAnimations();
3328 3339
3329 CollisionEventUpdate collisionData = (CollisionEventUpdate)e; 3340 CollisionEventUpdate collisionData = (CollisionEventUpdate)e;