diff options
author | UbitUmarov | 2018-12-28 13:52:59 +0000 |
---|---|---|
committer | UbitUmarov | 2018-12-28 13:52:59 +0000 |
commit | 4a73cc81dc4e03b2b7c46829cecfc0627c3fddb4 (patch) | |
tree | 6e8200b3b7a3c0465853e42bbd790a59ccd4e312 /OpenSim/Region/ClientStack | |
parent | update pbs (diff) | |
download | opensim-SC-4a73cc81dc4e03b2b7c46829cecfc0627c3fddb4.zip opensim-SC-4a73cc81dc4e03b2b7c46829cecfc0627c3fddb4.tar.gz opensim-SC-4a73cc81dc4e03b2b7c46829cecfc0627c3fddb4.tar.bz2 opensim-SC-4a73cc81dc4e03b2b7c46829cecfc0627c3fddb4.tar.xz |
now break several things at same time... sog/sop updates, threads options,...
Diffstat (limited to '')
4 files changed, 87 insertions, 18 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ServerReleaseNotesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ServerReleaseNotesModule.cs index e172db7..cf79982 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ServerReleaseNotesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ServerReleaseNotesModule.cs | |||
@@ -126,8 +126,6 @@ namespace OpenSim.Region.ClientStack.LindenCaps | |||
126 | Hashtable responsedata = new Hashtable(); | 126 | Hashtable responsedata = new Hashtable(); |
127 | responsedata["int_response_code"] = 301; | 127 | responsedata["int_response_code"] = 301; |
128 | responsedata["str_redirect_location"] = m_ServerReleaseNotesURL; | 128 | responsedata["str_redirect_location"] = m_ServerReleaseNotesURL; |
129 | responsedata["content_type"] = "text/plain"; | ||
130 | |||
131 | return responsedata; | 129 | return responsedata; |
132 | } | 130 | } |
133 | } | 131 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index b06e93c..b52f2fd 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | |||
@@ -172,6 +172,11 @@ namespace OpenSim.Region.ClientStack.Linden | |||
172 | if(m_doScriptSyntax && m_scriptSyntaxID != UUID.Zero) | 172 | if(m_doScriptSyntax && m_scriptSyntaxID != UUID.Zero) |
173 | m_features["LSLSyntaxId"] = OSD.FromUUID(m_scriptSyntaxID); | 173 | m_features["LSLSyntaxId"] = OSD.FromUUID(m_scriptSyntaxID); |
174 | 174 | ||
175 | OSDMap meshAnim = new OSDMap(); | ||
176 | meshAnim["AnimatedObjectMaxTris"] = OSD.FromInteger(10000); | ||
177 | meshAnim["MaxAgentAnimatedObjectAttachments"] = OSD.FromInteger(2); | ||
178 | m_features["AnimatedObjects"] = meshAnim; | ||
179 | |||
175 | // Extra information for viewers that want to use it | 180 | // Extra information for viewers that want to use it |
176 | // TODO: Take these out of here into their respective modules, like map-server-url | 181 | // TODO: Take these out of here into their respective modules, like map-server-url |
177 | OSDMap extrasMap; | 182 | OSDMap extrasMap; |
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index c42446c..882f22f 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -454,9 +454,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
454 | public string Name { get { return FirstName + " " + LastName; } } | 454 | public string Name { get { return FirstName + " " + LastName; } } |
455 | 455 | ||
456 | public uint CircuitCode { get { return m_circuitCode; } } | 456 | public uint CircuitCode { get { return m_circuitCode; } } |
457 | |||
458 | protected int m_animationSequenceNumber = (int)(Util.GetTimeStampTicks() & 0x5fffafL); | ||
457 | public int NextAnimationSequenceNumber | 459 | public int NextAnimationSequenceNumber |
458 | { | 460 | { |
459 | get { return m_udpServer.NextAnimationSequenceNumber; } | 461 | get |
462 | { | ||
463 | int ret = Interlocked.Increment(ref m_animationSequenceNumber); | ||
464 | if (ret <= 0) | ||
465 | { | ||
466 | m_animationSequenceNumber = (int)(Util.GetTimeStampTicks() & 0xafff5fL); | ||
467 | ret = Interlocked.Increment(ref m_animationSequenceNumber); | ||
468 | } | ||
469 | return ret; | ||
470 | } | ||
471 | set | ||
472 | { | ||
473 | m_animationSequenceNumber = value; | ||
474 | } | ||
460 | } | 475 | } |
461 | 476 | ||
462 | /// <summary> | 477 | /// <summary> |
@@ -3904,6 +3919,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3904 | OutPacket(ani, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); | 3919 | OutPacket(ani, ThrottleOutPacketType.Task | ThrottleOutPacketType.HighPriority); |
3905 | } | 3920 | } |
3906 | 3921 | ||
3922 | public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId) | ||
3923 | { | ||
3924 | // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name); | ||
3925 | |||
3926 | ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); | ||
3927 | // TODO: don't create new blocks if recycling an old packet | ||
3928 | ani.Sender = new ObjectAnimationPacket.SenderBlock(); | ||
3929 | ani.Sender.ID = senderId; | ||
3930 | ani.AnimationList = new ObjectAnimationPacket.AnimationListBlock[animations.Length]; | ||
3931 | |||
3932 | for (int i = 0; i < animations.Length; ++i) | ||
3933 | { | ||
3934 | ani.AnimationList[i] = new ObjectAnimationPacket.AnimationListBlock(); | ||
3935 | ani.AnimationList[i].AnimID = animations[i]; | ||
3936 | ani.AnimationList[i].AnimSequenceID = seqs[i]; | ||
3937 | } | ||
3938 | OutPacket(ani, ThrottleOutPacketType.Task); | ||
3939 | } | ||
3940 | |||
3907 | #endregion | 3941 | #endregion |
3908 | 3942 | ||
3909 | #region Avatar Packet/Data Sending Methods | 3943 | #region Avatar Packet/Data Sending Methods |
@@ -4127,6 +4161,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4127 | OpenSim.Framework.Lazy<List<EntityUpdate>> compressedUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); | 4161 | OpenSim.Framework.Lazy<List<EntityUpdate>> compressedUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); |
4128 | OpenSim.Framework.Lazy<List<EntityUpdate>> terseUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); | 4162 | OpenSim.Framework.Lazy<List<EntityUpdate>> terseUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); |
4129 | OpenSim.Framework.Lazy<List<EntityUpdate>> terseAgentUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); | 4163 | OpenSim.Framework.Lazy<List<EntityUpdate>> terseAgentUpdates = new OpenSim.Framework.Lazy<List<EntityUpdate>>(); |
4164 | OpenSim.Framework.Lazy<List<SceneObjectPart>> ObjectAnimationUpdates = new OpenSim.Framework.Lazy<List<SceneObjectPart>>(); | ||
4130 | 4165 | ||
4131 | // Check to see if this is a flush | 4166 | // Check to see if this is a flush |
4132 | if (maxUpdatesBytes <= 0) | 4167 | if (maxUpdatesBytes <= 0) |
@@ -4297,12 +4332,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4297 | bool canUseCompressed = true; | 4332 | bool canUseCompressed = true; |
4298 | bool canUseImproved = true; | 4333 | bool canUseImproved = true; |
4299 | 4334 | ||
4300 | |||
4301 | // Compressed object updates only make sense for LL primitives | 4335 | // Compressed object updates only make sense for LL primitives |
4302 | if (!(update.Entity is SceneObjectPart)) | 4336 | if (!(update.Entity is SceneObjectPart)) |
4303 | { | 4337 | { |
4304 | canUseCompressed = false; | 4338 | canUseCompressed = false; |
4305 | } | 4339 | } |
4340 | else | ||
4341 | { | ||
4342 | if(updateFlags.HasFlag(PrimUpdateFlags.Animations)) | ||
4343 | { | ||
4344 | updateFlags &= ~PrimUpdateFlags.Animations; | ||
4345 | SceneObjectPart sop = (SceneObjectPart)update.Entity; | ||
4346 | if(sop.Animations != null) | ||
4347 | { | ||
4348 | ObjectAnimationUpdates.Value.Add(sop); | ||
4349 | maxUpdatesBytes -= 32 * sop.Animations.Count + 16; | ||
4350 | } | ||
4351 | } | ||
4352 | } | ||
4306 | 4353 | ||
4307 | if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate)) | 4354 | if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate)) |
4308 | { | 4355 | { |
@@ -4443,6 +4490,38 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4443 | OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); | 4490 | OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); |
4444 | } | 4491 | } |
4445 | 4492 | ||
4493 | foreach (SceneObjectPart sop in ObjectAnimationUpdates.Value) | ||
4494 | { | ||
4495 | if (sop.Animations == null) | ||
4496 | continue; | ||
4497 | SceneObjectGroup sog = sop.ParentGroup; | ||
4498 | if (sog == null || sog.IsDeleted) | ||
4499 | continue; | ||
4500 | |||
4501 | SceneObjectPart root = sog.RootPart; | ||
4502 | if (root == null || root.Shape == null || !root.Shape.MeshFlagEntry) | ||
4503 | continue; | ||
4504 | |||
4505 | UUID[] ids = null; | ||
4506 | int[] seqs = null; | ||
4507 | int count = sop.GetAnimations(out ids, out seqs); | ||
4508 | if(count < 0) | ||
4509 | continue; | ||
4510 | |||
4511 | ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); | ||
4512 | ani.Sender = new ObjectAnimationPacket.SenderBlock(); | ||
4513 | ani.Sender.ID = sop.UUID; | ||
4514 | ani.AnimationList = new ObjectAnimationPacket.AnimationListBlock[sop.Animations.Count]; | ||
4515 | |||
4516 | for(int i = 0; i< count; i++) | ||
4517 | { | ||
4518 | ani.AnimationList[i] = new ObjectAnimationPacket.AnimationListBlock(); | ||
4519 | ani.AnimationList[i].AnimID = ids[i]; | ||
4520 | ani.AnimationList[i].AnimSequenceID = seqs[i]; | ||
4521 | } | ||
4522 | OutPacket(ani, ThrottleOutPacketType.Task); | ||
4523 | } | ||
4524 | |||
4446 | #endregion Packet Sending | 4525 | #endregion Packet Sending |
4447 | 4526 | ||
4448 | #region Handle deleted objects | 4527 | #region Handle deleted objects |
@@ -4462,6 +4541,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4462 | GroupsInView.Add(grp); | 4541 | GroupsInView.Add(grp); |
4463 | } | 4542 | } |
4464 | } | 4543 | } |
4544 | |||
4465 | #endregion | 4545 | #endregion |
4466 | } | 4546 | } |
4467 | 4547 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 567bbb5..70cca51 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -341,19 +341,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
341 | /// <summary>Flag to signal when clients should send pings</summary> | 341 | /// <summary>Flag to signal when clients should send pings</summary> |
342 | protected bool m_sendPing; | 342 | protected bool m_sendPing; |
343 | 343 | ||
344 | protected int m_animationSequenceNumber; | ||
345 | |||
346 | public int NextAnimationSequenceNumber | ||
347 | { | ||
348 | get | ||
349 | { | ||
350 | m_animationSequenceNumber++; | ||
351 | if (m_animationSequenceNumber > 2147482624) | ||
352 | m_animationSequenceNumber = 1; | ||
353 | return m_animationSequenceNumber; | ||
354 | } | ||
355 | } | ||
356 | |||
357 | protected ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>> m_pendingCache = new ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>>(); | 344 | protected ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>> m_pendingCache = new ExpiringCache<IPEndPoint, Queue<UDPPacketBuffer>>(); |
358 | 345 | ||
359 | protected Pool<IncomingPacket> m_incomingPacketPool; | 346 | protected Pool<IncomingPacket> m_incomingPacketPool; |
@@ -507,7 +494,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
507 | ThrottleRates = new ThrottleRates(configSource); | 494 | ThrottleRates = new ThrottleRates(configSource); |
508 | 495 | ||
509 | Random rnd = new Random(Util.EnvironmentTickCount()); | 496 | Random rnd = new Random(Util.EnvironmentTickCount()); |
510 | m_animationSequenceNumber = rnd.Next(11474826); | ||
511 | 497 | ||
512 | // if (usePools) | 498 | // if (usePools) |
513 | // EnablePools(); | 499 | // EnablePools(); |