diff options
author | UbitUmarov | 2015-11-06 21:27:42 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-06 21:27:42 +0000 |
commit | 69fefd1d008a8648b0cd5a7f990ec06d6b597425 (patch) | |
tree | f4f625da8119dc8099895d04b2b2dd8e15f78544 | |
parent | change OfflineMessageModule from new avination code to original master, for ... (diff) | |
download | opensim-SC-69fefd1d008a8648b0cd5a7f990ec06d6b597425.zip opensim-SC-69fefd1d008a8648b0cd5a7f990ec06d6b597425.tar.gz opensim-SC-69fefd1d008a8648b0cd5a7f990ec06d6b597425.tar.bz2 opensim-SC-69fefd1d008a8648b0cd5a7f990ec06d6b597425.tar.xz |
send the estimation of time dilation at packet build time, not the one at unknown past.
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e20ab50..41debb3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -3857,8 +3857,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3857 | objupdate.Header.Zerocoded = true; | 3857 | objupdate.Header.Zerocoded = true; |
3858 | 3858 | ||
3859 | objupdate.RegionData.RegionHandle = presence.RegionHandle; | 3859 | objupdate.RegionData.RegionHandle = presence.RegionHandle; |
3860 | objupdate.RegionData.TimeDilation = ushort.MaxValue; | 3860 | // objupdate.RegionData.TimeDilation = ushort.MaxValue; |
3861 | 3861 | objupdate.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); | |
3862 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 3862 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
3863 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); | 3863 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); |
3864 | 3864 | ||
@@ -4014,7 +4014,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4014 | 4014 | ||
4015 | // We must lock for both manipulating the kill record and sending the packet, in order to avoid a race | 4015 | // We must lock for both manipulating the kill record and sending the packet, in order to avoid a race |
4016 | // condition where a kill can be processed before an out-of-date update for the same object. | 4016 | // condition where a kill can be processed before an out-of-date update for the same object. |
4017 | float avgTimeDilation = 1.0f; | 4017 | // float avgTimeDilation = 0.0f; |
4018 | IEntityUpdate iupdate; | 4018 | IEntityUpdate iupdate; |
4019 | Int32 timeinqueue; // this is just debugging code & can be dropped later | 4019 | Int32 timeinqueue; // this is just debugging code & can be dropped later |
4020 | 4020 | ||
@@ -4026,8 +4026,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4026 | 4026 | ||
4027 | EntityUpdate update = (EntityUpdate)iupdate; | 4027 | EntityUpdate update = (EntityUpdate)iupdate; |
4028 | 4028 | ||
4029 | avgTimeDilation += update.TimeDilation; | 4029 | // avgTimeDilation += update.TimeDilation; |
4030 | avgTimeDilation *= 0.5f; | ||
4031 | 4030 | ||
4032 | if (update.Entity is SceneObjectPart) | 4031 | if (update.Entity is SceneObjectPart) |
4033 | { | 4032 | { |
@@ -4198,8 +4197,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4198 | #region Packet Sending | 4197 | #region Packet Sending |
4199 | 4198 | ||
4200 | // const float TIME_DILATION = 1.0f; | 4199 | // const float TIME_DILATION = 1.0f; |
4201 | ushort timeDilation = Utils.FloatToUInt16(avgTimeDilation, 0.0f, 1.0f); | 4200 | ushort timeDilation; |
4202 | 4201 | // if(updatesThisCall > 0) | |
4202 | // timeDilation = Utils.FloatToUInt16(avgTimeDilation/updatesThisCall, 0.0f, 1.0f); | ||
4203 | // else | ||
4204 | // timeDilation = ushort.MaxValue; // 1.0; | ||
4205 | |||
4206 | timeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); | ||
4207 | |||
4203 | if (terseAgentUpdateBlocks.IsValueCreated) | 4208 | if (terseAgentUpdateBlocks.IsValueCreated) |
4204 | { | 4209 | { |
4205 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value; | 4210 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseAgentUpdateBlocks.Value; |
@@ -4274,7 +4279,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4274 | SceneObjectPart part = (SceneObjectPart)ent; | 4279 | SceneObjectPart part = (SceneObjectPart)ent; |
4275 | ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | 4280 | ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); |
4276 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; | 4281 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
4277 | packet.RegionData.TimeDilation = 1; | 4282 | packet.RegionData.TimeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f); |
4278 | packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 4283 | packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
4279 | 4284 | ||
4280 | ObjectUpdatePacket.ObjectDataBlock blk = CreatePrimUpdateBlock(part, this.m_agentId); | 4285 | ObjectUpdatePacket.ObjectDataBlock blk = CreatePrimUpdateBlock(part, this.m_agentId); |
@@ -13199,8 +13204,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
13199 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock block = | 13204 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock block = |
13200 | CreateImprovedTerseBlock(p, false); | 13205 | CreateImprovedTerseBlock(p, false); |
13201 | 13206 | ||
13202 | const float TIME_DILATION = 1.0f; | 13207 | // const float TIME_DILATION = 1.0f; |
13203 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); | 13208 | ushort timeDilation = Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);; |
13204 | 13209 | ||
13205 | ImprovedTerseObjectUpdatePacket packet | 13210 | ImprovedTerseObjectUpdatePacket packet |
13206 | = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket( | 13211 | = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket( |