diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 234 |
1 files changed, 144 insertions, 90 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index df34668..cf96a8b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3950,24 +3950,68 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3950 | /// <summary> | 3950 | /// <summary> |
3951 | /// Send an ObjectUpdate packet with information about an avatar | 3951 | /// Send an ObjectUpdate packet with information about an avatar |
3952 | /// </summary> | 3952 | /// </summary> |
3953 | public void SendAvatarDataImmediate(ISceneEntity avatar) | 3953 | public void SendEntityFullUpdateImmediate(ISceneEntity ent) |
3954 | { | 3954 | { |
3955 | // m_log.DebugFormat( | 3955 | // m_log.DebugFormat( |
3956 | // "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}", | 3956 | // "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}", |
3957 | // avatar.Name, avatar.UUID, Name, AgentId); | 3957 | // avatar.Name, avatar.UUID, Name, AgentId); |
3958 | 3958 | ||
3959 | ScenePresence presence = avatar as ScenePresence; | 3959 | if (ent == null) |
3960 | if (presence == null) | ||
3961 | return; | 3960 | return; |
3962 | 3961 | ||
3963 | ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | 3962 | ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); |
3964 | objupdate.Header.Zerocoded = true; | 3963 | objupdate.Header.Zerocoded = true; |
3965 | 3964 | ||
3966 | objupdate.RegionData.RegionHandle = presence.RegionHandle; | ||
3967 | // objupdate.RegionData.TimeDilation = ushort.MaxValue; | ||
3968 | objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); | 3965 | objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); |
3969 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 3966 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
3970 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); | 3967 | |
3968 | if(ent is ScenePresence) | ||
3969 | { | ||
3970 | ScenePresence presence = ent as ScenePresence; | ||
3971 | objupdate.RegionData.RegionHandle = presence.RegionHandle; | ||
3972 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); | ||
3973 | } | ||
3974 | else if(ent is SceneObjectPart) | ||
3975 | { | ||
3976 | SceneObjectPart part = ent as SceneObjectPart; | ||
3977 | objupdate.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
3978 | objupdate.ObjectData[0] = CreatePrimUpdateBlock(part, (ScenePresence)SceneAgent); | ||
3979 | } | ||
3980 | |||
3981 | OutPacket(objupdate, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); | ||
3982 | |||
3983 | // We need to record the avatar local id since the root prim of an attachment points to this. | ||
3984 | // m_attachmentsSent.Add(avatar.LocalId); | ||
3985 | } | ||
3986 | |||
3987 | public void SendEntityTerseUpdateImmediate(ISceneEntity ent) | ||
3988 | { | ||
3989 | // m_log.DebugFormat( | ||
3990 | // "[LLCLIENTVIEW]: Sending immediate object update for avatar {0} {1} to {2} {3}", | ||
3991 | // avatar.Name, avatar.UUID, Name, AgentId); | ||
3992 | |||
3993 | if (ent == null) | ||
3994 | return; | ||
3995 | |||
3996 | ImprovedTerseObjectUpdatePacket objupdate = | ||
3997 | (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); | ||
3998 | objupdate.Header.Zerocoded = true; | ||
3999 | |||
4000 | objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); | ||
4001 | objupdate.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; | ||
4002 | |||
4003 | if(ent is ScenePresence) | ||
4004 | { | ||
4005 | ScenePresence presence = ent as ScenePresence; | ||
4006 | objupdate.RegionData.RegionHandle = presence.RegionHandle; | ||
4007 | objupdate.ObjectData[0] = CreateImprovedTerseBlock(ent, false); | ||
4008 | } | ||
4009 | else if(ent is SceneObjectPart) | ||
4010 | { | ||
4011 | SceneObjectPart part = ent as SceneObjectPart; | ||
4012 | objupdate.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | ||
4013 | objupdate.ObjectData[0] = CreateImprovedTerseBlock(ent, false); | ||
4014 | } | ||
3971 | 4015 | ||
3972 | OutPacket(objupdate, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); | 4016 | OutPacket(objupdate, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); |
3973 | 4017 | ||
@@ -4021,7 +4065,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4021 | 4065 | ||
4022 | #region Primitive Packet/Data Sending Methods | 4066 | #region Primitive Packet/Data Sending Methods |
4023 | 4067 | ||
4024 | |||
4025 | /// <summary> | 4068 | /// <summary> |
4026 | /// Generate one of the object update packets based on PrimUpdateFlags | 4069 | /// Generate one of the object update packets based on PrimUpdateFlags |
4027 | /// and broadcast the packet to clients | 4070 | /// and broadcast the packet to clients |
@@ -4044,10 +4087,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4044 | */ | 4087 | */ |
4045 | if (entity is SceneObjectPart) | 4088 | if (entity is SceneObjectPart) |
4046 | { | 4089 | { |
4047 | SceneObjectPart e = (SceneObjectPart)entity; | 4090 | SceneObjectPart p = (SceneObjectPart)entity; |
4048 | SceneObjectGroup g = e.ParentGroup; | 4091 | SceneObjectGroup g = p.ParentGroup; |
4049 | if (g.HasPrivateAttachmentPoint && g.OwnerID != AgentId) | 4092 | if (g.HasPrivateAttachmentPoint && g.OwnerID != AgentId) |
4050 | return; // Don't send updates for other people's HUDs | 4093 | return; // Don't send updates for other people's HUDs |
4094 | |||
4095 | if((updateFlags ^ PrimUpdateFlags.SendInTransit) == 0) | ||
4096 | { | ||
4097 | List<uint> partIDs = (new List<uint> {p.LocalId}); | ||
4098 | lock (m_entityProps.SyncRoot) | ||
4099 | m_entityProps.Remove(partIDs); | ||
4100 | lock (m_entityUpdates.SyncRoot) | ||
4101 | m_entityUpdates.Remove(partIDs); | ||
4102 | return; | ||
4103 | } | ||
4051 | } | 4104 | } |
4052 | 4105 | ||
4053 | //double priority = m_prioritizer.GetUpdatePriority(this, entity); | 4106 | //double priority = m_prioritizer.GetUpdatePriority(this, entity); |
@@ -4126,14 +4179,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4126 | // Vector3 mycamera = Vector3.Zero; | 4179 | // Vector3 mycamera = Vector3.Zero; |
4127 | Vector3 mypos = Vector3.Zero; | 4180 | Vector3 mypos = Vector3.Zero; |
4128 | ScenePresence mysp = (ScenePresence)SceneAgent; | 4181 | ScenePresence mysp = (ScenePresence)SceneAgent; |
4129 | if(mysp != null && !mysp.IsDeleted) | 4182 | |
4183 | // we should have a presence | ||
4184 | if(mysp == null) | ||
4185 | return; | ||
4186 | |||
4187 | if(doCulling) | ||
4130 | { | 4188 | { |
4131 | cullingrange = mysp.DrawDistance + m_scene.ReprioritizationDistance + 16f; | 4189 | cullingrange = mysp.DrawDistance + m_scene.ReprioritizationDistance + 16f; |
4132 | // mycamera = mysp.CameraPosition; | 4190 | // mycamera = mysp.CameraPosition; |
4133 | mypos = mysp.AbsolutePosition; | 4191 | mypos = mysp.AbsolutePosition; |
4134 | } | 4192 | } |
4135 | else | ||
4136 | doCulling = false; | ||
4137 | 4193 | ||
4138 | while (maxUpdatesBytes > 0) | 4194 | while (maxUpdatesBytes > 0) |
4139 | { | 4195 | { |
@@ -4154,9 +4210,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4154 | { | 4210 | { |
4155 | SceneObjectPart part = (SceneObjectPart)update.Entity; | 4211 | SceneObjectPart part = (SceneObjectPart)update.Entity; |
4156 | SceneObjectGroup grp = part.ParentGroup; | 4212 | SceneObjectGroup grp = part.ParentGroup; |
4157 | if (grp.inTransit) | 4213 | if (grp.inTransit && !update.Flags.HasFlag(PrimUpdateFlags.SendInTransit)) |
4158 | continue; | 4214 | continue; |
4215 | /* debug | ||
4216 | if (update.Flags.HasFlag(PrimUpdateFlags.SendInTransit)) | ||
4217 | { | ||
4218 | |||
4159 | 4219 | ||
4220 | } | ||
4221 | */ | ||
4160 | if (grp.IsDeleted) | 4222 | if (grp.IsDeleted) |
4161 | { | 4223 | { |
4162 | // Don't send updates for objects that have been marked deleted. | 4224 | // Don't send updates for objects that have been marked deleted. |
@@ -4213,14 +4275,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4213 | { | 4275 | { |
4214 | part.Shape.LightEntry = false; | 4276 | part.Shape.LightEntry = false; |
4215 | } | 4277 | } |
4216 | |||
4217 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) | ||
4218 | { | ||
4219 | // Ensure that mesh has at least 8 valid faces | ||
4220 | part.Shape.ProfileBegin = 12500; | ||
4221 | part.Shape.ProfileEnd = 0; | ||
4222 | part.Shape.ProfileHollow = 27500; | ||
4223 | } | ||
4224 | } | 4278 | } |
4225 | 4279 | ||
4226 | if(doCulling && !grp.IsAttachment) | 4280 | if(doCulling && !grp.IsAttachment) |
@@ -4248,14 +4302,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4248 | continue; | 4302 | continue; |
4249 | } | 4303 | } |
4250 | } | 4304 | } |
4251 | |||
4252 | if (part.Shape != null && (part.Shape.SculptType == (byte)SculptType.Mesh)) | ||
4253 | { | ||
4254 | // Ensure that mesh has at least 8 valid faces | ||
4255 | part.Shape.ProfileBegin = 12500; | ||
4256 | part.Shape.ProfileEnd = 0; | ||
4257 | part.Shape.ProfileHollow = 27500; | ||
4258 | } | ||
4259 | } | 4305 | } |
4260 | else if (update.Entity is ScenePresence) | 4306 | else if (update.Entity is ScenePresence) |
4261 | { | 4307 | { |
@@ -4330,7 +4376,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4330 | if (update.Entity is ScenePresence) | 4376 | if (update.Entity is ScenePresence) |
4331 | ablock = CreateAvatarUpdateBlock((ScenePresence)update.Entity); | 4377 | ablock = CreateAvatarUpdateBlock((ScenePresence)update.Entity); |
4332 | else | 4378 | else |
4333 | ablock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId); | 4379 | ablock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, mysp); |
4334 | objectUpdateBlocks.Add(ablock); | 4380 | objectUpdateBlocks.Add(ablock); |
4335 | objectUpdates.Value.Add(update); | 4381 | objectUpdates.Value.Add(update); |
4336 | maxUpdatesBytes -= ablock.Length; | 4382 | maxUpdatesBytes -= ablock.Length; |
@@ -4462,6 +4508,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4462 | } | 4508 | } |
4463 | 4509 | ||
4464 | // hack.. dont use | 4510 | // hack.. dont use |
4511 | /* | ||
4465 | public void SendPartFullUpdate(ISceneEntity ent, uint? parentID) | 4512 | public void SendPartFullUpdate(ISceneEntity ent, uint? parentID) |
4466 | { | 4513 | { |
4467 | if (ent is SceneObjectPart) | 4514 | if (ent is SceneObjectPart) |
@@ -4472,7 +4519,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4472 | packet.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); | 4519 | packet.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); |
4473 | packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 4520 | packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
4474 | 4521 | ||
4475 | ObjectUpdatePacket.ObjectDataBlock blk = CreatePrimUpdateBlock(part, this.m_agentId); | 4522 | ObjectUpdatePacket.ObjectDataBlock blk = CreatePrimUpdateBlock(part, mysp); |
4476 | if (parentID.HasValue) | 4523 | if (parentID.HasValue) |
4477 | { | 4524 | { |
4478 | blk.ParentID = parentID.Value; | 4525 | blk.ParentID = parentID.Value; |
@@ -4488,7 +4535,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4488 | // updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name); | 4535 | // updatesThisCall, Name, SceneAgent.IsChildAgent ? "child" : "root", Scene.Name); |
4489 | // | 4536 | // |
4490 | } | 4537 | } |
4491 | 4538 | */ | |
4492 | public void ReprioritizeUpdates() | 4539 | public void ReprioritizeUpdates() |
4493 | { | 4540 | { |
4494 | lock (m_entityUpdates.SyncRoot) | 4541 | lock (m_entityUpdates.SyncRoot) |
@@ -5726,28 +5773,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5726 | return update; | 5773 | return update; |
5727 | } | 5774 | } |
5728 | 5775 | ||
5729 | protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, UUID recipientID) | 5776 | // protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, UUID recipientID) |
5777 | protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart part, ScenePresence sp) | ||
5730 | { | 5778 | { |
5731 | byte[] objectData = new byte[60]; | 5779 | byte[] objectData = new byte[60]; |
5732 | data.RelativePosition.ToBytes(objectData, 0); | 5780 | part.RelativePosition.ToBytes(objectData, 0); |
5733 | data.Velocity.ToBytes(objectData, 12); | 5781 | part.Velocity.ToBytes(objectData, 12); |
5734 | data.Acceleration.ToBytes(objectData, 24); | 5782 | part.Acceleration.ToBytes(objectData, 24); |
5735 | 5783 | ||
5736 | Quaternion rotation = data.RotationOffset; | 5784 | Quaternion rotation = part.RotationOffset; |
5737 | rotation.Normalize(); | 5785 | rotation.Normalize(); |
5738 | rotation.ToBytes(objectData, 36); | 5786 | rotation.ToBytes(objectData, 36); |
5739 | data.AngularVelocity.ToBytes(objectData, 48); | 5787 | part.AngularVelocity.ToBytes(objectData, 48); |
5740 | 5788 | ||
5741 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); | 5789 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); |
5742 | update.ClickAction = (byte)data.ClickAction; | 5790 | update.ClickAction = (byte)part.ClickAction; |
5743 | update.CRC = 0; | 5791 | update.CRC = 0; |
5744 | update.ExtraParams = data.Shape.ExtraParams ?? Utils.EmptyBytes; | 5792 | update.ExtraParams = part.Shape.ExtraParams ?? Utils.EmptyBytes; |
5745 | update.FullID = data.UUID; | 5793 | update.FullID = part.UUID; |
5746 | update.ID = data.LocalId; | 5794 | update.ID = part.LocalId; |
5747 | //update.JointAxisOrAnchor = Vector3.Zero; // These are deprecated | 5795 | //update.JointAxisOrAnchor = Vector3.Zero; // These are deprecated |
5748 | //update.JointPivot = Vector3.Zero; | 5796 | //update.JointPivot = Vector3.Zero; |
5749 | //update.JointType = 0; | 5797 | //update.JointType = 0; |
5750 | update.Material = data.Material; | 5798 | update.Material = part.Material; |
5751 | update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim | 5799 | update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim |
5752 | /* | 5800 | /* |
5753 | if (data.ParentGroup.IsAttachment) | 5801 | if (data.ParentGroup.IsAttachment) |
@@ -5776,68 +5824,74 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5776 | } | 5824 | } |
5777 | */ | 5825 | */ |
5778 | 5826 | ||
5779 | if (data.ParentGroup.IsAttachment) | 5827 | if (part.ParentGroup.IsAttachment) |
5780 | { | 5828 | { |
5781 | if (data.IsRoot) | 5829 | if (part.IsRoot) |
5782 | { | 5830 | { |
5783 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID); | 5831 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + part.ParentGroup.FromItemID); |
5784 | } | 5832 | } |
5785 | else | 5833 | else |
5786 | update.NameValue = Utils.EmptyBytes; | 5834 | update.NameValue = Utils.EmptyBytes; |
5787 | 5835 | ||
5788 | int st = (int)data.ParentGroup.AttachmentPoint; | 5836 | int st = (int)part.ParentGroup.AttachmentPoint; |
5789 | update.State = (byte)(((st & 0xf0) >> 4) + ((st & 0x0f) << 4)); ; | 5837 | update.State = (byte)(((st & 0xf0) >> 4) + ((st & 0x0f) << 4)); ; |
5790 | } | 5838 | } |
5791 | else | 5839 | else |
5792 | { | 5840 | { |
5793 | update.NameValue = Utils.EmptyBytes; | 5841 | update.NameValue = Utils.EmptyBytes; |
5794 | update.State = data.Shape.State; // not sure about this | 5842 | update.State = part.Shape.State; // not sure about this |
5795 | } | 5843 | } |
5796 | 5844 | ||
5797 | 5845 | ||
5798 | update.ObjectData = objectData; | 5846 | update.ObjectData = objectData; |
5799 | update.ParentID = data.ParentID; | 5847 | update.ParentID = part.ParentID; |
5800 | update.PathBegin = data.Shape.PathBegin; | 5848 | update.PathBegin = part.Shape.PathBegin; |
5801 | update.PathCurve = data.Shape.PathCurve; | 5849 | update.PathCurve = part.Shape.PathCurve; |
5802 | update.PathEnd = data.Shape.PathEnd; | 5850 | update.PathEnd = part.Shape.PathEnd; |
5803 | update.PathRadiusOffset = data.Shape.PathRadiusOffset; | 5851 | update.PathRadiusOffset = part.Shape.PathRadiusOffset; |
5804 | update.PathRevolutions = data.Shape.PathRevolutions; | 5852 | update.PathRevolutions = part.Shape.PathRevolutions; |
5805 | update.PathScaleX = data.Shape.PathScaleX; | 5853 | update.PathScaleX = part.Shape.PathScaleX; |
5806 | update.PathScaleY = data.Shape.PathScaleY; | 5854 | update.PathScaleY = part.Shape.PathScaleY; |
5807 | update.PathShearX = data.Shape.PathShearX; | 5855 | update.PathShearX = part.Shape.PathShearX; |
5808 | update.PathShearY = data.Shape.PathShearY; | 5856 | update.PathShearY = part.Shape.PathShearY; |
5809 | update.PathSkew = data.Shape.PathSkew; | 5857 | update.PathSkew = part.Shape.PathSkew; |
5810 | update.PathTaperX = data.Shape.PathTaperX; | 5858 | update.PathTaperX = part.Shape.PathTaperX; |
5811 | update.PathTaperY = data.Shape.PathTaperY; | 5859 | update.PathTaperY = part.Shape.PathTaperY; |
5812 | update.PathTwist = data.Shape.PathTwist; | 5860 | update.PathTwist = part.Shape.PathTwist; |
5813 | update.PathTwistBegin = data.Shape.PathTwistBegin; | 5861 | update.PathTwistBegin = part.Shape.PathTwistBegin; |
5814 | update.PCode = data.Shape.PCode; | 5862 | update.PCode = part.Shape.PCode; |
5815 | update.ProfileBegin = data.Shape.ProfileBegin; | 5863 | update.ProfileBegin = part.Shape.ProfileBegin; |
5816 | update.ProfileCurve = data.Shape.ProfileCurve; | 5864 | update.ProfileCurve = part.Shape.ProfileCurve; |
5817 | update.ProfileEnd = data.Shape.ProfileEnd; | 5865 | |
5818 | update.ProfileHollow = data.Shape.ProfileHollow; | 5866 | if(part.Shape.SculptType == (byte)SculptType.Mesh) // filter out hack |
5819 | update.PSBlock = data.ParticleSystem ?? Utils.EmptyBytes; | 5867 | update.ProfileCurve = (byte)(part.Shape.ProfileCurve & 0x0f); |
5820 | update.TextColor = data.GetTextColor().GetBytes(false); | 5868 | else |
5821 | update.TextureAnim = data.TextureAnimation ?? Utils.EmptyBytes; | 5869 | update.ProfileCurve = part.Shape.ProfileCurve; |
5822 | update.TextureEntry = data.Shape.TextureEntry ?? Utils.EmptyBytes; | 5870 | |
5823 | update.Scale = data.Shape.Scale; | 5871 | update.ProfileEnd = part.Shape.ProfileEnd; |
5824 | update.Text = Util.StringToBytes256(data.Text); | 5872 | update.ProfileHollow = part.Shape.ProfileHollow; |
5825 | update.MediaURL = Util.StringToBytes256(data.MediaUrl); | 5873 | update.PSBlock = part.ParticleSystem ?? Utils.EmptyBytes; |
5874 | update.TextColor = part.GetTextColor().GetBytes(false); | ||
5875 | update.TextureAnim = part.TextureAnimation ?? Utils.EmptyBytes; | ||
5876 | update.TextureEntry = part.Shape.TextureEntry ?? Utils.EmptyBytes; | ||
5877 | update.Scale = part.Shape.Scale; | ||
5878 | update.Text = Util.StringToBytes256(part.Text); | ||
5879 | update.MediaURL = Util.StringToBytes256(part.MediaUrl); | ||
5826 | 5880 | ||
5827 | #region PrimFlags | 5881 | #region PrimFlags |
5828 | 5882 | ||
5829 | PrimFlags flags = (PrimFlags)m_scene.Permissions.GenerateClientFlags(recipientID, data.UUID); | 5883 | PrimFlags flags = (PrimFlags)m_scene.Permissions.GenerateClientFlags(part, sp); |
5830 | 5884 | ||
5831 | // Don't send the CreateSelected flag to everyone | 5885 | // Don't send the CreateSelected flag to everyone |
5832 | flags &= ~PrimFlags.CreateSelected; | 5886 | flags &= ~PrimFlags.CreateSelected; |
5833 | 5887 | ||
5834 | if (recipientID == data.OwnerID) | 5888 | if (sp.UUID == part.OwnerID) |
5835 | { | 5889 | { |
5836 | if (data.CreateSelected) | 5890 | if (part.CreateSelected) |
5837 | { | 5891 | { |
5838 | // Only send this flag once, then unset it | 5892 | // Only send this flag once, then unset it |
5839 | flags |= PrimFlags.CreateSelected; | 5893 | flags |= PrimFlags.CreateSelected; |
5840 | data.CreateSelected = false; | 5894 | part.CreateSelected = false; |
5841 | } | 5895 | } |
5842 | } | 5896 | } |
5843 | 5897 | ||
@@ -5849,21 +5903,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5849 | 5903 | ||
5850 | #endregion PrimFlags | 5904 | #endregion PrimFlags |
5851 | 5905 | ||
5852 | if (data.Sound != UUID.Zero) | 5906 | if (part.Sound != UUID.Zero) |
5853 | { | 5907 | { |
5854 | update.Sound = data.Sound; | 5908 | update.Sound = part.Sound; |
5855 | update.OwnerID = data.OwnerID; | 5909 | update.OwnerID = part.OwnerID; |
5856 | update.Gain = (float)data.SoundGain; | 5910 | update.Gain = (float)part.SoundGain; |
5857 | update.Radius = (float)data.SoundRadius; | 5911 | update.Radius = (float)part.SoundRadius; |
5858 | update.Flags = data.SoundFlags; | 5912 | update.Flags = part.SoundFlags; |
5859 | } | 5913 | } |
5860 | 5914 | ||
5861 | switch ((PCode)data.Shape.PCode) | 5915 | switch ((PCode)part.Shape.PCode) |
5862 | { | 5916 | { |
5863 | case PCode.Grass: | 5917 | case PCode.Grass: |
5864 | case PCode.Tree: | 5918 | case PCode.Tree: |
5865 | case PCode.NewTree: | 5919 | case PCode.NewTree: |
5866 | update.Data = new byte[] { data.Shape.State }; | 5920 | update.Data = new byte[] { part.Shape.State }; |
5867 | break; | 5921 | break; |
5868 | default: | 5922 | default: |
5869 | update.Data = Utils.EmptyBytes; | 5923 | update.Data = Utils.EmptyBytes; |
@@ -7753,10 +7807,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7753 | 7807 | ||
7754 | ObjectDuplicate handlerObjectDuplicate = null; | 7808 | ObjectDuplicate handlerObjectDuplicate = null; |
7755 | 7809 | ||
7756 | for (int i = 0; i < dupe.ObjectData.Length; i++) | 7810 | handlerObjectDuplicate = OnObjectDuplicate; |
7811 | if (handlerObjectDuplicate != null) | ||
7757 | { | 7812 | { |
7758 | handlerObjectDuplicate = OnObjectDuplicate; | 7813 | for (int i = 0; i < dupe.ObjectData.Length; i++) |
7759 | if (handlerObjectDuplicate != null) | ||
7760 | { | 7814 | { |
7761 | UUID rezGroupID = dupe.AgentData.GroupID; | 7815 | UUID rezGroupID = dupe.AgentData.GroupID; |
7762 | if(!IsGroupMember(rezGroupID)) | 7816 | if(!IsGroupMember(rezGroupID)) |