aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2011-10-11 22:11:44 +0100
committerMelanie2011-10-11 22:11:44 +0100
commit6978ae0a592bf357373377324bee51032aa21d3c (patch)
tree6d24c511977e38923e63492b08bad4cbd4e5829c /OpenSim/Region
parentMerge commit 'c38b25a1d21540fd5be4ae438b38ab67ba88d166' into bigmerge (diff)
parentRemove setter from SP.OffsetPosition, since all sets should flow through SP.A... (diff)
downloadopensim-SC_OLD-6978ae0a592bf357373377324bee51032aa21d3c.zip
opensim-SC_OLD-6978ae0a592bf357373377324bee51032aa21d3c.tar.gz
opensim-SC_OLD-6978ae0a592bf357373377324bee51032aa21d3c.tar.bz2
opensim-SC_OLD-6978ae0a592bf357373377324bee51032aa21d3c.tar.xz
Merge commit 'b2356340d22578143af2daab979ea4633faa93dc' into bigmerge
Conflicts: OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/EntityBase.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs16
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs2
4 files changed, 24 insertions, 7 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/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 5414693..97722b7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -804,7 +804,7 @@ namespace OpenSim.Region.Framework.Scenes
804 if (av.LinkedPrim == m_uuid) 804 if (av.LinkedPrim == m_uuid)
805 { 805 {
806 Vector3 offset = (m_offsetPosition - oldpos); 806 Vector3 offset = (m_offsetPosition - oldpos);
807 av.OffsetPosition += offset; 807 av.AbsolutePosition += offset;
808 av.SendAvatarDataToAllAgents(); 808 av.SendAvatarDataToAllAgents();
809 } 809 }
810 } 810 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index fa6945c..712ec70 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -492,7 +492,9 @@ namespace OpenSim.Region.Framework.Scenes
492 PhysicsActor actor = m_physicsActor; 492 PhysicsActor actor = m_physicsActor;
493// if (actor != null) 493// if (actor != null)
494 if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting! 494 if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting!
495 {
495 m_pos = actor.Position; 496 m_pos = actor.Position;
497 }
496 else 498 else
497 { 499 {
498 // Obtain the correct position of a seated avatar. 500 // Obtain the correct position of a seated avatar.
@@ -540,16 +542,20 @@ namespace OpenSim.Region.Framework.Scenes
540 } 542 }
541 } 543 }
542 544
543 if (m_parentID == 0) // KF Do NOT update m_pos here if Av is sitting! 545// Changed this to update unconditionally to make npose work
546// if (m_parentID == 0) // KF Do NOT update m_pos here if Av is sitting!
544 m_pos = value; 547 m_pos = value;
545 m_parentPosition = Vector3.Zero; 548 m_parentPosition = Vector3.Zero;
549
550// m_log.DebugFormat(
551// "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}",
552// Scene.RegionInfo.RegionName, Name, m_pos);
546 } 553 }
547 } 554 }
548 555
549 public Vector3 OffsetPosition 556 public Vector3 OffsetPosition
550 { 557 {
551 get { return m_pos; } 558 get { return m_pos; }
552 set { m_pos = value; }
553 } 559 }
554 560
555 /// <summary> 561 /// <summary>
@@ -582,6 +588,10 @@ namespace OpenSim.Region.Framework.Scenes
582 } 588 }
583 589
584 m_velocity = value; 590 m_velocity = value;
591
592// m_log.DebugFormat(
593// "[SCENE PRESENCE]: In {0} set velocity of {1} to {2}",
594// Scene.RegionInfo.RegionName, Name, m_velocity);
585 } 595 }
586 } 596 }
587 597
@@ -4340,4 +4350,4 @@ namespace OpenSim.Region.Framework.Scenes
4340 } 4350 }
4341 } 4351 }
4342 } 4352 }
4343} \ No newline at end of file 4353}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 769c84e..4f21c67 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
7481 return; 7481 return;
7482 LSL_Vector v; 7482 LSL_Vector v;
7483 v = rules.GetVector3Item(idx++); 7483 v = rules.GetVector3Item(idx++);
7484 av.OffsetPosition = new Vector3((float)v.x, (float)v.y, (float)v.z); 7484 av.AbsolutePosition = new Vector3((float)v.x, (float)v.y, (float)v.z);
7485 av.SendAvatarDataToAllAgents(); 7485 av.SendAvatarDataToAllAgents();
7486 7486
7487 break; 7487 break;