diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/ILandChannel.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 36 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 29 |
3 files changed, 41 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs index f71e31d..20b8ab6 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs | |||
@@ -76,5 +76,8 @@ namespace OpenSim.Region.Framework.Interfaces | |||
76 | void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); | 76 | void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); |
77 | void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); | 77 | void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); |
78 | void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime); | 78 | void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime); |
79 | |||
80 | void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id); | ||
81 | void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id); | ||
79 | } | 82 | } |
80 | } | 83 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 48e65a5..d174d04 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
104 | 104 | ||
105 | #endregion Enumerations | 105 | #endregion Enumerations |
106 | 106 | ||
107 | public class SceneObjectPart : IScriptHost | 107 | public class SceneObjectPart : IScriptHost, ISceneEntity |
108 | { | 108 | { |
109 | /// <value> | 109 | /// <value> |
110 | /// Denote all sides of the prim | 110 | /// Denote all sides of the prim |
@@ -714,6 +714,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
714 | } | 714 | } |
715 | } | 715 | } |
716 | 716 | ||
717 | public Vector3 RelativePosition | ||
718 | { | ||
719 | get | ||
720 | { | ||
721 | if (IsRoot) | ||
722 | { | ||
723 | if (IsAttachment) | ||
724 | return AttachedPos; | ||
725 | else | ||
726 | return AbsolutePosition; | ||
727 | } | ||
728 | else | ||
729 | { | ||
730 | return OffsetPosition; | ||
731 | } | ||
732 | } | ||
733 | } | ||
734 | |||
717 | public Quaternion RotationOffset | 735 | public Quaternion RotationOffset |
718 | { | 736 | { |
719 | get | 737 | get |
@@ -985,7 +1003,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
985 | get { return AggregateScriptEvents; } | 1003 | get { return AggregateScriptEvents; } |
986 | } | 1004 | } |
987 | 1005 | ||
988 | |||
989 | public Quaternion SitTargetOrientation | 1006 | public Quaternion SitTargetOrientation |
990 | { | 1007 | { |
991 | get { return m_sitTargetOrientation; } | 1008 | get { return m_sitTargetOrientation; } |
@@ -2911,11 +2928,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2911 | //if (LocalId != ParentGroup.RootPart.LocalId) | 2928 | //if (LocalId != ParentGroup.RootPart.LocalId) |
2912 | //isattachment = ParentGroup.RootPart.IsAttachment; | 2929 | //isattachment = ParentGroup.RootPart.IsAttachment; |
2913 | 2930 | ||
2914 | byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; | 2931 | remoteClient.SendPrimUpdate(this, PrimUpdateFlags.FullUpdate); |
2915 | remoteClient.SendPrimitiveToClient(new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape, | ||
2916 | lPos, Velocity, Acceleration, RotationOffset, AngularVelocity, clientFlags, m_uuid, _ownerID, | ||
2917 | m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment, | ||
2918 | AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient))); | ||
2919 | } | 2932 | } |
2920 | 2933 | ||
2921 | /// <summary> | 2934 | /// <summary> |
@@ -4627,11 +4640,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4627 | 4640 | ||
4628 | // Causes this thread to dig into the Client Thread Data. | 4641 | // Causes this thread to dig into the Client Thread Data. |
4629 | // Remember your locking here! | 4642 | // Remember your locking here! |
4630 | remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle, | 4643 | remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); |
4631 | m_parentGroup.GetTimeDilation(), LocalId, lPos, | ||
4632 | RotationOffset, Velocity, Acceleration, | ||
4633 | AngularVelocity, FromItemID, | ||
4634 | OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient))); | ||
4635 | } | 4644 | } |
4636 | 4645 | ||
4637 | public void AddScriptLPS(int count) | 4646 | public void AddScriptLPS(int count) |
@@ -4681,7 +4690,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4681 | 4690 | ||
4682 | public Color4 GetTextColor() | 4691 | public Color4 GetTextColor() |
4683 | { | 4692 | { |
4684 | return new Color4((byte)Color.R, (byte)Color.G, (byte)Color.B, (byte)(0xFF - Color.A)); | 4693 | Color color = Color; |
4694 | return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A)); | ||
4685 | } | 4695 | } |
4686 | 4696 | ||
4687 | public void ResetOwnerChangeFlag() | 4697 | public void ResetOwnerChangeFlag() |
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 | { |