aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs64
1 files changed, 56 insertions, 8 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 410ac00..4c77c18 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
@@ -4157,8 +4200,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4157 { 4200 {
4158 SceneObjectPart part = (SceneObjectPart)update.Entity; 4201 SceneObjectPart part = (SceneObjectPart)update.Entity;
4159 SceneObjectGroup grp = part.ParentGroup; 4202 SceneObjectGroup grp = part.ParentGroup;
4160 if (grp.inTransit) 4203 if (grp.inTransit && !update.Flags.HasFlag(PrimUpdateFlags.SendInTransit))
4161 continue; 4204 continue;
4205 if (update.Flags.HasFlag(PrimUpdateFlags.SendInTransit))
4206 {
4207
4208
4209 }
4162 4210
4163 if (grp.IsDeleted) 4211 if (grp.IsDeleted)
4164 { 4212 {