diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ad66273..179ecdc 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
68 | 68 | ||
69 | public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence); | 69 | public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence); |
70 | 70 | ||
71 | public class ScenePresence : EntityBase | 71 | public class ScenePresence : EntityBase, ISceneEntity |
72 | { | 72 | { |
73 | // ~ScenePresence() | 73 | // ~ScenePresence() |
74 | // { | 74 | // { |
@@ -491,6 +491,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
491 | } | 491 | } |
492 | } | 492 | } |
493 | 493 | ||
494 | public Vector3 OffsetPosition | ||
495 | { | ||
496 | get { return m_pos; } | ||
497 | set { m_pos = value; } | ||
498 | } | ||
499 | |||
494 | /// <summary> | 500 | /// <summary> |
495 | /// Current velocity of the avatar. | 501 | /// Current velocity of the avatar. |
496 | /// </summary> | 502 | /// </summary> |
@@ -1120,8 +1126,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1120 | 1126 | ||
1121 | m_updateCount = UPDATE_COUNT; //KF: Trigger Anim updates to catch falling anim. | 1127 | m_updateCount = UPDATE_COUNT; //KF: Trigger Anim updates to catch falling anim. |
1122 | 1128 | ||
1123 | ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | 1129 | ControllingClient.SendPrimUpdate(this, PrimUpdateFlags.Position); |
1124 | AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient))); | 1130 | //ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, |
1131 | // AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient))); | ||
1125 | } | 1132 | } |
1126 | 1133 | ||
1127 | public void AddNeighbourRegion(ulong regionHandle, string cap) | 1134 | public void AddNeighbourRegion(ulong regionHandle, string cap) |
@@ -2604,8 +2611,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2604 | 2611 | ||
2605 | //m_log.DebugFormat("[SCENEPRESENCE]: TerseUpdate: Pos={0} Rot={1} Vel={2}", m_pos, m_bodyRot, m_velocity); | 2612 | //m_log.DebugFormat("[SCENEPRESENCE]: TerseUpdate: Pos={0} Rot={1} Vel={2}", m_pos, m_bodyRot, m_velocity); |
2606 | 2613 | ||
2607 | remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | 2614 | remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); |
2608 | pos, velocity, Vector3.Zero, m_bodyRot, CollisionPlane, m_uuid, null, GetUpdatePriority(remoteClient))); | ||
2609 | 2615 | ||
2610 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); | 2616 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); |
2611 | m_scene.StatsReporter.AddAgentUpdates(1); | 2617 | m_scene.StatsReporter.AddAgentUpdates(1); |
@@ -2701,9 +2707,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2701 | Vector3 pos = m_pos; | 2707 | Vector3 pos = m_pos; |
2702 | pos.Z += m_appearance.HipOffset; | 2708 | pos.Z += m_appearance.HipOffset; |
2703 | 2709 | ||
2704 | remoteAvatar.m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, | 2710 | remoteAvatar.m_controllingClient.SendAvatarDataImmediate(this); |
2705 | LocalId, pos, m_appearance.Texture.GetBytes(), | ||
2706 | m_parentID, m_bodyRot)); | ||
2707 | m_scene.StatsReporter.AddAgentUpdates(1); | 2711 | m_scene.StatsReporter.AddAgentUpdates(1); |
2708 | } | 2712 | } |
2709 | 2713 | ||
@@ -2771,8 +2775,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2771 | Vector3 pos = m_pos; | 2775 | Vector3 pos = m_pos; |
2772 | pos.Z += m_appearance.HipOffset; | 2776 | pos.Z += m_appearance.HipOffset; |
2773 | 2777 | ||
2774 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | 2778 | m_controllingClient.SendAvatarDataImmediate(this); |
2775 | pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot)); | ||
2776 | 2779 | ||
2777 | SendInitialFullUpdateToAllClients(); | 2780 | SendInitialFullUpdateToAllClients(); |
2778 | SendAppearanceToAllOtherAgents(); | 2781 | SendAppearanceToAllOtherAgents(); |
@@ -2882,9 +2885,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2882 | Vector3 pos = m_pos; | 2885 | Vector3 pos = m_pos; |
2883 | pos.Z += m_appearance.HipOffset; | 2886 | pos.Z += m_appearance.HipOffset; |
2884 | 2887 | ||
2885 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | 2888 | m_controllingClient.SendAvatarDataImmediate(this); |
2886 | pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot)); | ||
2887 | |||
2888 | } | 2889 | } |
2889 | 2890 | ||
2890 | public void SetWearable(int wearableId, AvatarWearable wearable) | 2891 | public void SetWearable(int wearableId, AvatarWearable wearable) |
@@ -4219,7 +4220,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
4219 | 4220 | ||
4220 | private void Reprioritize(object sender, ElapsedEventArgs e) | 4221 | private void Reprioritize(object sender, ElapsedEventArgs e) |
4221 | { | 4222 | { |
4222 | m_controllingClient.ReprioritizeUpdates(StateUpdateTypes.All, UpdatePriority); | 4223 | m_controllingClient.ReprioritizeUpdates(UpdatePriority); |
4223 | 4224 | ||
4224 | lock (m_reprioritization_timer) | 4225 | lock (m_reprioritization_timer) |
4225 | { | 4226 | { |