diff options
author | Melanie Thielker | 2014-08-27 11:25:17 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-08-27 11:25:17 +0200 |
commit | 012d0b07bc797db3d230337745bb543c33800855 (patch) | |
tree | 08e688f166939f459ffe3aca371c09a0fa6c126b /OpenSim | |
parent | Merge branch 'ubitworkmaster' (diff) | |
parent | enqueue also if m_nextPackets[category] is not null. This is really the (diff) | |
download | opensim-SC_OLD-012d0b07bc797db3d230337745bb543c33800855.zip opensim-SC_OLD-012d0b07bc797db3d230337745bb543c33800855.tar.gz opensim-SC_OLD-012d0b07bc797db3d230337745bb543c33800855.tar.bz2 opensim-SC_OLD-012d0b07bc797db3d230337745bb543c33800855.tar.xz |
Merge branch 'ubitworkmaster'
Diffstat (limited to 'OpenSim')
5 files changed, 95 insertions, 41 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e19877c..7087bb7 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5393,6 +5393,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5393 | //update.JointType = 0; | 5393 | //update.JointType = 0; |
5394 | update.Material = data.Material; | 5394 | update.Material = data.Material; |
5395 | update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim | 5395 | update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim |
5396 | /* | ||
5396 | if (data.ParentGroup.IsAttachment) | 5397 | if (data.ParentGroup.IsAttachment) |
5397 | { | 5398 | { |
5398 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID); | 5399 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID); |
@@ -5406,6 +5407,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5406 | // case for attachments may contain conflicting values that can end up crashing the viewer. | 5407 | // case for attachments may contain conflicting values that can end up crashing the viewer. |
5407 | update.State = data.ParentGroup.RootPart.Shape.State; | 5408 | update.State = data.ParentGroup.RootPart.Shape.State; |
5408 | } | 5409 | } |
5410 | */ | ||
5411 | |||
5412 | if (data.ParentGroup.IsAttachment) | ||
5413 | { | ||
5414 | if (data.IsRoot) | ||
5415 | { | ||
5416 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID); | ||
5417 | } | ||
5418 | else | ||
5419 | update.NameValue = Utils.EmptyBytes; | ||
5420 | |||
5421 | int st = (int)data.ParentGroup.AttachmentPoint; | ||
5422 | update.State = (byte)(((st & 0xf0) >> 4) + ((st & 0x0f) << 4)); ; | ||
5423 | } | ||
5424 | else | ||
5425 | { | ||
5426 | update.NameValue = Utils.EmptyBytes; | ||
5427 | update.State = data.Shape.State; // not sure about this | ||
5428 | } | ||
5429 | |||
5409 | 5430 | ||
5410 | // m_log.DebugFormat( | 5431 | // m_log.DebugFormat( |
5411 | // "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}", | 5432 | // "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}", |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs index fe31bd9..8852715 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs | |||
@@ -364,6 +364,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
364 | int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; | 364 | int texture = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); pos += 4; |
365 | int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); | 365 | int asset = (int)(BitConverter.ToSingle(adjData, pos) * 0.125f); |
366 | 366 | ||
367 | int total = resend + land + wind + cloud + task + texture + asset; | ||
368 | total /= 128; | ||
369 | |||
367 | // Make sure none of the throttles are set below our packet MTU, | 370 | // Make sure none of the throttles are set below our packet MTU, |
368 | // otherwise a throttle could become permanently clogged | 371 | // otherwise a throttle could become permanently clogged |
369 | resend = Math.Max(resend, LLUDPServer.MTU); | 372 | resend = Math.Max(resend, LLUDPServer.MTU); |
@@ -379,8 +382,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
379 | // the task queue (e.g. object updates) | 382 | // the task queue (e.g. object updates) |
380 | task = task + (int)(m_cannibalrate * texture); | 383 | task = task + (int)(m_cannibalrate * texture); |
381 | texture = (int)((1 - m_cannibalrate) * texture); | 384 | texture = (int)((1 - m_cannibalrate) * texture); |
382 | 385 | ||
383 | //int total = resend + land + wind + cloud + task + texture + asset; | 386 | total = resend + land + wind + cloud + task + texture + asset; |
387 | total /= 128; | ||
384 | //m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}", | 388 | //m_log.DebugFormat("[LLUDPCLIENT]: {0} is setting throttles. Resend={1}, Land={2}, Wind={3}, Cloud={4}, Task={5}, Texture={6}, Asset={7}, Total={8}", |
385 | // AgentID, resend, land, wind, cloud, task, texture, asset, total); | 389 | // AgentID, resend, land, wind, cloud, task, texture, asset, total); |
386 | 390 | ||
@@ -484,7 +488,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
484 | // Don't send this packet if there is already a packet waiting in the queue | 488 | // Don't send this packet if there is already a packet waiting in the queue |
485 | // even if we have the tokens to send it, tokens should go to the already | 489 | // even if we have the tokens to send it, tokens should go to the already |
486 | // queued packets | 490 | // queued packets |
487 | if (queue.Count > 0) | 491 | if (queue.Count > 0 || m_nextPackets[category] != null) |
488 | { | 492 | { |
489 | queue.Enqueue(packet, highPriority); | 493 | queue.Enqueue(packet, highPriority); |
490 | return true; | 494 | return true; |
@@ -528,7 +532,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
528 | /// <returns>True if any packets were sent, otherwise false</returns> | 532 | /// <returns>True if any packets were sent, otherwise false</returns> |
529 | public bool DequeueOutgoing() | 533 | public bool DequeueOutgoing() |
530 | { | 534 | { |
531 | if (m_deliverPackets == false) return false; | 535 | // if (m_deliverPackets == false) return false; |
532 | 536 | ||
533 | OutgoingPacket packet = null; | 537 | OutgoingPacket packet = null; |
534 | DoubleLocklessQueue<OutgoingPacket> queue; | 538 | DoubleLocklessQueue<OutgoingPacket> queue; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 3b0312d..dea9d7f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -1245,7 +1245,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1245 | int dataLength = buffer.DataLength; | 1245 | int dataLength = buffer.DataLength; |
1246 | 1246 | ||
1247 | // NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here | 1247 | // NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here |
1248 | if (!isZerocoded) | 1248 | if (!isZerocoded && !isResend) |
1249 | { | 1249 | { |
1250 | // Keep appending ACKs until there is no room left in the buffer or there are | 1250 | // Keep appending ACKs until there is no room left in the buffer or there are |
1251 | // no more ACKs to append | 1251 | // no more ACKs to append |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 37aae08..b3e556f 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -986,7 +986,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
986 | // Well, this is it. The agent is over there. | 986 | // Well, this is it. The agent is over there. |
987 | // KillEntity(sp.Scene, sp.LocalId); | 987 | // KillEntity(sp.Scene, sp.LocalId); |
988 | 988 | ||
989 | sp.HasMovedAway(); | 989 | bool nearRegion = sp.KnownRegions.ContainsKey(destinationHandle); |
990 | sp.HasMovedAway(nearRegion); | ||
990 | 991 | ||
991 | // Now let's make it officially a child agent | 992 | // Now let's make it officially a child agent |
992 | sp.MakeChildAgent(); | 993 | sp.MakeChildAgent(); |
@@ -1141,7 +1142,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1141 | 1142 | ||
1142 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); | 1143 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); |
1143 | 1144 | ||
1144 | sp.HasMovedAway(); | 1145 | bool nearRegion = sp.KnownRegions.ContainsKey(destinationHandle); |
1146 | sp.HasMovedAway(nearRegion); | ||
1145 | 1147 | ||
1146 | // Need to signal neighbours whether child agents may need closing irrespective of whether this | 1148 | // Need to signal neighbours whether child agents may need closing irrespective of whether this |
1147 | // one needed closing. We also need to close child agents as quickly as possible to avoid complicated | 1149 | // one needed closing. We also need to close child agents as quickly as possible to avoid complicated |
@@ -1784,9 +1786,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1784 | m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); | 1786 | m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); |
1785 | 1787 | ||
1786 | // this may need the attachments | 1788 | // this may need the attachments |
1787 | agent.parcelRegionCross(); | ||
1788 | 1789 | ||
1789 | AgentHasMovedAway(agent, true); | 1790 | agent.HasMovedAway(true); |
1791 | // agent.parcelRegionCross(); | ||
1792 | |||
1793 | // AgentHasMovedAway(agent, true); | ||
1790 | 1794 | ||
1791 | agent.MakeChildAgent(); | 1795 | agent.MakeChildAgent(); |
1792 | 1796 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4fa95fd..5868251 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1887,29 +1887,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
1887 | m_log.DebugFormat( | 1887 | m_log.DebugFormat( |
1888 | "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); | 1888 | "[SCENE PRESENCE]: Restarting scripts in attachments for {0} in {1}", Name, Scene.Name); |
1889 | 1889 | ||
1890 | // Resume scripts this possible should also be moved down after sending the avatar to viewer ? | 1890 | foreach(SceneObjectGroup sog in m_attachments) |
1891 | foreach (SceneObjectGroup sog in m_attachments) | ||
1892 | { | 1891 | { |
1893 | SendFullUpdateToClient(ControllingClient); | 1892 | sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); |
1894 | SendAttachmentFullUpdateToAgentNF(sog, this); | 1893 | sog.ResumeScripts(); |
1894 | } | ||
1895 | 1895 | ||
1896 | if (!sog.HasPrivateAttachmentPoint) | 1896 | foreach (ScenePresence p in allpresences) |
1897 | { | ||
1898 | if (p == this) | ||
1897 | { | 1899 | { |
1898 | // sog.ScheduleGroupForFullUpdate(); | 1900 | SendTerseUpdateToAgentNF(this); |
1899 | foreach(ScenePresence p in allpresences) | 1901 | SendAttachmentsToAgentNF(this); |
1900 | { | 1902 | continue; |
1901 | if (p == this) | 1903 | } |
1902 | continue; | ||
1903 | 1904 | ||
1904 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 1905 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) |
1905 | continue; | 1906 | continue; |
1906 | 1907 | ||
1907 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path | 1908 | SendTerseUpdateToAgentNF(p); |
1908 | SendAttachmentFullUpdateToAgentNF(sog, p); | 1909 | SendAttachmentsToAgentNF(p); |
1909 | }; | ||
1910 | } | ||
1911 | sog.RootPart.ParentGroup.CreateScriptInstances(0, false, m_scene.DefaultScriptEngine, GetStateSource()); | ||
1912 | sog.ResumeScripts(); | ||
1913 | } | 1910 | } |
1914 | } | 1911 | } |
1915 | } | 1912 | } |
@@ -3428,7 +3425,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3428 | if (remoteClient.IsActive) | 3425 | if (remoteClient.IsActive) |
3429 | { | 3426 | { |
3430 | //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); | 3427 | //m_log.DebugFormat("[SCENE PRESENCE]: " + Name + " sending TerseUpdate to " + remoteClient.Name + " : Pos={0} Rot={1} Vel={2}", m_pos, Rotation, m_velocity); |
3431 | remoteClient.SendEntityUpdate(this, PrimUpdateFlags.FullUpdate); | 3428 | remoteClient.SendEntityUpdate(this, |
3429 | PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | ||
3430 | | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); | ||
3432 | m_scene.StatsReporter.AddAgentUpdates(1); | 3431 | m_scene.StatsReporter.AddAgentUpdates(1); |
3433 | } | 3432 | } |
3434 | } | 3433 | } |
@@ -4761,8 +4760,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4761 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) | 4760 | if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && p.GodLevel < 200) |
4762 | return; | 4761 | return; |
4763 | 4762 | ||
4763 | SendTerseUpdateToAgentNF(p); | ||
4764 | SendAttachmentFullUpdateToAgentNF(sog, p); | 4764 | SendAttachmentFullUpdateToAgentNF(sog, p); |
4765 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path | ||
4766 | }); | 4765 | }); |
4767 | } | 4766 | } |
4768 | } | 4767 | } |
@@ -4772,13 +4771,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4772 | // for now they are checked in several places down the line... | 4771 | // for now they are checked in several places down the line... |
4773 | public void SendAttachmentsToAgentNF(ScenePresence p) | 4772 | public void SendAttachmentsToAgentNF(ScenePresence p) |
4774 | { | 4773 | { |
4774 | SendTerseUpdateToAgentNF(p); | ||
4775 | lock (m_attachments) | 4775 | lock (m_attachments) |
4776 | { | 4776 | { |
4777 | foreach (SceneObjectGroup sog in m_attachments) | 4777 | foreach (SceneObjectGroup sog in m_attachments) |
4778 | { | 4778 | { |
4779 | SendAttachmentFullUpdateToAgentNF(sog, p); | 4779 | SendAttachmentFullUpdateToAgentNF(sog, p); |
4780 | } | 4780 | } |
4781 | SendFullUpdateToClient(p.ControllingClient); // resend our data by updates path | ||
4782 | } | 4781 | } |
4783 | } | 4782 | } |
4784 | 4783 | ||
@@ -5963,21 +5962,47 @@ namespace OpenSim.Region.Framework.Scenes | |||
5963 | } | 5962 | } |
5964 | } | 5963 | } |
5965 | 5964 | ||
5966 | public void HasMovedAway() | 5965 | public void HasMovedAway(bool nearRegion) |
5967 | { | 5966 | { |
5968 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | 5967 | |
5969 | foreach (ScenePresence p in allpresences) | 5968 | if (nearRegion) |
5970 | { | 5969 | { |
5971 | if (p == this) | 5970 | if (Scene.AttachmentsModule != null) |
5972 | continue; | 5971 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); |
5973 | SendKillTo(p); | 5972 | |
5974 | if (!p.IsChildAgent) | 5973 | if (!ParcelHideThisAvatar || GodLevel >= 200) |
5975 | p.SendKillTo(this); | 5974 | return; |
5975 | |||
5976 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | ||
5977 | foreach (ScenePresence p in allpresences) | ||
5978 | { | ||
5979 | if (p.IsDeleted || p == this || p.IsChildAgent || p.ControllingClient == null || !p.ControllingClient.IsActive) | ||
5980 | continue; | ||
5981 | |||
5982 | if (p.currentParcelUUID == m_currentParcelUUID) | ||
5983 | { | ||
5984 | p.SendKillTo(this); | ||
5985 | } | ||
5986 | } | ||
5987 | } | ||
5988 | else | ||
5989 | { | ||
5990 | List<ScenePresence> allpresences = m_scene.GetScenePresences(); | ||
5991 | foreach (ScenePresence p in allpresences) | ||
5992 | { | ||
5993 | if (p == this) | ||
5994 | continue; | ||
5995 | SendKillTo(p); | ||
5996 | if (!p.IsChildAgent) | ||
5997 | p.SendKillTo(this); | ||
5998 | } | ||
5999 | |||
6000 | if (Scene.AttachmentsModule != null) | ||
6001 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | ||
5976 | } | 6002 | } |
5977 | if (Scene.AttachmentsModule != null) | ||
5978 | Scene.AttachmentsModule.DeleteAttachmentsFromScene(this, true); | ||
5979 | } | 6003 | } |
5980 | 6004 | ||
6005 | |||
5981 | // kill with attachs root kills | 6006 | // kill with attachs root kills |
5982 | public void SendKillTo(ScenePresence p) | 6007 | public void SendKillTo(ScenePresence p) |
5983 | { | 6008 | { |