diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 59d1c69..b0cb4ea 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -358,7 +358,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
358 | // protected HashSet<uint> m_attachmentsSent; | 358 | // protected HashSet<uint> m_attachmentsSent; |
359 | 359 | ||
360 | private bool m_deliverPackets = true; | 360 | private bool m_deliverPackets = true; |
361 | private int m_animationSequenceNumber = 1; | 361 | |
362 | private bool m_SendLogoutPacketWhenClosing = true; | 362 | private bool m_SendLogoutPacketWhenClosing = true; |
363 | 363 | ||
364 | /// <summary> | 364 | /// <summary> |
@@ -419,6 +419,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
419 | public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } | 419 | public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } |
420 | public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } | 420 | public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } |
421 | 421 | ||
422 | public int PingTimeMS | ||
423 | { | ||
424 | get | ||
425 | { | ||
426 | if (UDPClient != null) | ||
427 | return UDPClient.PingTimeMS; | ||
428 | return 0; | ||
429 | } | ||
430 | } | ||
431 | |||
422 | /// <summary> | 432 | /// <summary> |
423 | /// Entity update queues | 433 | /// Entity update queues |
424 | /// </summary> | 434 | /// </summary> |
@@ -440,7 +450,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
440 | public string Name { get { return FirstName + " " + LastName; } } | 450 | public string Name { get { return FirstName + " " + LastName; } } |
441 | 451 | ||
442 | public uint CircuitCode { get { return m_circuitCode; } } | 452 | public uint CircuitCode { get { return m_circuitCode; } } |
443 | public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } | 453 | public int NextAnimationSequenceNumber |
454 | { | ||
455 | get { return m_udpServer.NextAnimationSequenceNumber; } | ||
456 | } | ||
444 | 457 | ||
445 | /// <summary> | 458 | /// <summary> |
446 | /// As well as it's function in IClientAPI, in LLClientView we are locking on this property in order to | 459 | /// As well as it's function in IClientAPI, in LLClientView we are locking on this property in order to |
@@ -461,6 +474,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
461 | set { m_disableFacelights = value; } | 474 | set { m_disableFacelights = value; } |
462 | } | 475 | } |
463 | 476 | ||
477 | |||
464 | public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } | 478 | public bool SendLogoutPacketWhenClosing { set { m_SendLogoutPacketWhenClosing = value; } } |
465 | 479 | ||
466 | 480 | ||
@@ -1638,6 +1652,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1638 | pc.PingID.OldestUnacked = 0; | 1652 | pc.PingID.OldestUnacked = 0; |
1639 | 1653 | ||
1640 | OutPacket(pc, ThrottleOutPacketType.Unknown); | 1654 | OutPacket(pc, ThrottleOutPacketType.Unknown); |
1655 | UDPClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount(); | ||
1641 | } | 1656 | } |
1642 | 1657 | ||
1643 | public void SendKillObject(List<uint> localIDs) | 1658 | public void SendKillObject(List<uint> localIDs) |
@@ -3813,8 +3828,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3813 | { | 3828 | { |
3814 | SceneObjectPart e = (SceneObjectPart)entity; | 3829 | SceneObjectPart e = (SceneObjectPart)entity; |
3815 | SceneObjectGroup g = e.ParentGroup; | 3830 | SceneObjectGroup g = e.ParentGroup; |
3816 | if (g.RootPart.Shape.State > 30 && g.RootPart.Shape.State < 39) // HUD | 3831 | if (g.HasPrivateAttachmentPoint && g.OwnerID != AgentId) |
3817 | if (g.OwnerID != AgentId) | ||
3818 | return; // Don't send updates for other people's HUDs | 3832 | return; // Don't send updates for other people's HUDs |
3819 | } | 3833 | } |
3820 | 3834 | ||
@@ -3932,8 +3946,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3932 | 3946 | ||
3933 | if (part.ParentGroup.IsAttachment) | 3947 | if (part.ParentGroup.IsAttachment) |
3934 | { // Someone else's HUD, why are we getting these? | 3948 | { // Someone else's HUD, why are we getting these? |
3935 | if (part.ParentGroup.OwnerID != AgentId && | 3949 | if (part.ParentGroup.OwnerID != AgentId && part.ParentGroup.HasPrivateAttachmentPoint) |
3936 | part.ParentGroup.RootPart.Shape.State > 30 && part.ParentGroup.RootPart.Shape.State < 39) | ||
3937 | continue; | 3950 | continue; |
3938 | ScenePresence sp; | 3951 | ScenePresence sp; |
3939 | // Owner is not in the sim, don't update it to | 3952 | // Owner is not in the sim, don't update it to |
@@ -5278,16 +5291,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5278 | 5291 | ||
5279 | byte[] objectData = new byte[76]; | 5292 | byte[] objectData = new byte[76]; |
5280 | 5293 | ||
5281 | data.CollisionPlane.ToBytes(objectData, 0); | ||
5282 | offsetPosition.ToBytes(objectData, 16); | ||
5283 | Vector3 velocity = new Vector3(0, 0, 0); | 5294 | Vector3 velocity = new Vector3(0, 0, 0); |
5284 | Vector3 acceleration = new Vector3(0, 0, 0); | 5295 | Vector3 acceleration = new Vector3(0, 0, 0); |
5296 | rotation.Normalize(); | ||
5297 | Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z); | ||
5298 | |||
5299 | data.CollisionPlane.ToBytes(objectData, 0); | ||
5300 | offsetPosition.ToBytes(objectData, 16); | ||
5285 | velocity.ToBytes(objectData, 28); | 5301 | velocity.ToBytes(objectData, 28); |
5286 | acceleration.ToBytes(objectData, 40); | 5302 | acceleration.ToBytes(objectData, 40); |
5287 | // data.Velocity.ToBytes(objectData, 28); | 5303 | vrot.ToBytes(objectData, 52); |
5288 | // data.Acceleration.ToBytes(objectData, 40); | 5304 | data.AngularVelocity.ToBytes(objectData, 64); |
5289 | rotation.ToBytes(objectData, 52); | ||
5290 | //data.AngularVelocity.ToBytes(objectData, 64); | ||
5291 | 5305 | ||
5292 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); | 5306 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); |
5293 | 5307 | ||
@@ -5343,15 +5357,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5343 | data.RelativePosition.ToBytes(objectData, 0); | 5357 | data.RelativePosition.ToBytes(objectData, 0); |
5344 | data.Velocity.ToBytes(objectData, 12); | 5358 | data.Velocity.ToBytes(objectData, 12); |
5345 | data.Acceleration.ToBytes(objectData, 24); | 5359 | data.Acceleration.ToBytes(objectData, 24); |
5346 | try | 5360 | |
5347 | { | 5361 | Quaternion rotation = data.RotationOffset; |
5348 | data.RotationOffset.ToBytes(objectData, 36); | 5362 | rotation.Normalize(); |
5349 | } | 5363 | Vector3 vrot = new Vector3(rotation.X, rotation.Y, rotation.Z); |
5350 | catch (Exception e) | 5364 | vrot.ToBytes(objectData, 36); |
5351 | { | ||
5352 | m_log.Warn("[LLClientView]: exception converting quaternion to bytes, using Quaternion.Identity. Exception: " + e.ToString()); | ||
5353 | OpenMetaverse.Quaternion.Identity.ToBytes(objectData, 36); | ||
5354 | } | ||
5355 | data.AngularVelocity.ToBytes(objectData, 48); | 5365 | data.AngularVelocity.ToBytes(objectData, 48); |
5356 | 5366 | ||
5357 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); | 5367 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); |