diff options
author | John Hurliman | 2009-10-18 20:24:20 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-18 20:24:20 -0700 |
commit | 233e16b99cc80190d41143ecdfe01308eb39932a (patch) | |
tree | 340a75427ec8fc9082a0f543021dbfebacdb3033 /OpenSim/Framework/IClientAPI.cs | |
parent | * Process the avatar terse update priority queue as soon as an update for our... (diff) | |
download | opensim-SC-233e16b99cc80190d41143ecdfe01308eb39932a.zip opensim-SC-233e16b99cc80190d41143ecdfe01308eb39932a.tar.gz opensim-SC-233e16b99cc80190d41143ecdfe01308eb39932a.tar.bz2 opensim-SC-233e16b99cc80190d41143ecdfe01308eb39932a.tar.xz |
* Rewrote the methods that build ObjectUpdate and ImprovedTerseObjectUpdate packets to fill in the data more accurately and avoid allocating memory that is immediately thrown away
* Changed the Send*Data structs in IClientAPI to use public readonly members instead of private members and getters
* Made Parallel.ProcessorCount public
* Started switching over packet building methods in LLClientView to use Util.StringToBytes[256/1024]() instead of Utils.StringToBytes()
* More cleanup of the ScenePresences vs. ClientManager nightmare
* ScenePresence.HandleAgentUpdate() will now time out and drop incoming AgentUpdate packets after three seconds. This fixes a deadlock on m_AgentUpdates that was blocking up the LLUDP server
Diffstat (limited to 'OpenSim/Framework/IClientAPI.cs')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 186 |
1 files changed, 81 insertions, 105 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 1e03d4c..d304345 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -523,124 +523,100 @@ namespace OpenSim.Framework | |||
523 | 523 | ||
524 | public struct SendAvatarData | 524 | public struct SendAvatarData |
525 | { | 525 | { |
526 | private ulong m_regionHandle; | 526 | public readonly ulong RegionHandle; |
527 | private string m_firstName; | 527 | public readonly string FirstName; |
528 | private string m_lastName; | 528 | public readonly string LastName; |
529 | private string m_grouptitle; | 529 | public readonly string GroupTitle; |
530 | private UUID m_avatarID; | 530 | public readonly UUID AvatarID; |
531 | private uint m_avatarLocalID; | 531 | public readonly uint AvatarLocalID; |
532 | private Vector3 m_Pos; | 532 | public readonly Vector3 Position; |
533 | private byte[] m_textureEntry; | 533 | public readonly byte[] TextureEntry; |
534 | private uint m_parentID; | 534 | public readonly uint ParentID; |
535 | private Quaternion m_rotation; | 535 | public readonly Quaternion Rotation; |
536 | 536 | ||
537 | public SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, | 537 | public SendAvatarData(ulong regionHandle, string firstName, string lastName, string groupTitle, UUID avatarID, |
538 | uint avatarLocalID, | 538 | uint avatarLocalID, Vector3 position, byte[] textureEntry, uint parentID, Quaternion rotation) |
539 | Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) | ||
540 | { | 539 | { |
541 | this.m_regionHandle = regionHandle; | 540 | RegionHandle = regionHandle; |
542 | this.m_firstName = firstName; | 541 | FirstName = firstName; |
543 | this.m_lastName = lastName; | 542 | LastName = lastName; |
544 | this.m_grouptitle = grouptitle; | 543 | GroupTitle = groupTitle; |
545 | this.m_avatarID = avatarID; | 544 | AvatarID = avatarID; |
546 | this.m_avatarLocalID = avatarLocalID; | 545 | AvatarLocalID = avatarLocalID; |
547 | this.m_Pos = Pos; | 546 | Position = position; |
548 | this.m_textureEntry = textureEntry; | 547 | TextureEntry = textureEntry; |
549 | this.m_parentID = parentID; | 548 | ParentID = parentID; |
550 | this.m_rotation = rotation; | 549 | Rotation = rotation; |
551 | } | 550 | } |
552 | |||
553 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
554 | public string firstName { get { return this.m_firstName; } } | ||
555 | public string lastName { get { return this.m_lastName; } } | ||
556 | public string grouptitle { get { return this.m_grouptitle; } } | ||
557 | public UUID avatarID { get { return this.m_avatarID; } } | ||
558 | public uint avatarLocalID { get { return this.m_avatarLocalID; } } | ||
559 | public Vector3 Pos { get { return this.m_Pos; } } | ||
560 | public byte[] textureEntry { get { return this.m_textureEntry; } } | ||
561 | public uint parentID { get { return this.m_parentID; } } | ||
562 | public Quaternion rotation { get { return this.m_rotation; } } | ||
563 | } | 551 | } |
564 | 552 | ||
565 | public struct SendAvatarTerseData | 553 | public struct SendAvatarTerseData |
566 | { | 554 | { |
567 | private ulong m_regionHandle; | 555 | public readonly ulong RegionHandle; |
568 | private ushort m_timeDilation; | 556 | public readonly ushort TimeDilation; |
569 | private uint m_localID; | 557 | public readonly uint LocalID; |
570 | private Vector3 m_position; | 558 | public readonly Vector3 Position; |
571 | private Vector3 m_velocity; | 559 | public readonly Vector3 Velocity; |
572 | private Quaternion m_rotation; | 560 | public readonly Vector3 Acceleration; |
573 | private UUID m_agentid; | 561 | public readonly Quaternion Rotation; |
574 | private double m_priority; | 562 | public readonly Vector4 CollisionPlane; |
575 | 563 | public readonly UUID AgentID; | |
576 | public SendAvatarTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | 564 | public readonly byte[] TextureEntry; |
577 | Vector3 velocity, Quaternion rotation, UUID agentid, double priority) | 565 | public readonly double Priority; |
566 | |||
567 | public SendAvatarTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, | ||
568 | Vector3 acceleration, Quaternion rotation, Vector4 collisionPlane, UUID agentid, byte[] textureEntry, double priority) | ||
578 | { | 569 | { |
579 | this.m_regionHandle = regionHandle; | 570 | RegionHandle = regionHandle; |
580 | this.m_timeDilation = timeDilation; | 571 | TimeDilation = timeDilation; |
581 | this.m_localID = localID; | 572 | LocalID = localID; |
582 | this.m_position = position; | 573 | Position = position; |
583 | this.m_velocity = velocity; | 574 | Velocity = velocity; |
584 | this.m_rotation = rotation; | 575 | Acceleration = acceleration; |
585 | this.m_agentid = agentid; | 576 | Rotation = rotation; |
586 | this.m_priority = priority; | 577 | CollisionPlane = collisionPlane; |
578 | AgentID = agentid; | ||
579 | TextureEntry = textureEntry; | ||
580 | Priority = priority; | ||
587 | } | 581 | } |
588 | |||
589 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
590 | public ushort timeDilation { get { return this.m_timeDilation; } } | ||
591 | public uint localID { get { return this.m_localID; } } | ||
592 | public Vector3 position { get { return this.m_position; } } | ||
593 | public Vector3 velocity { get { return this.m_velocity; } } | ||
594 | public Quaternion rotation { get { return this.m_rotation; } } | ||
595 | public UUID agentid { get { return this.m_agentid; } } | ||
596 | public double priority { get { return this.m_priority; } } | ||
597 | } | 582 | } |
598 | 583 | ||
599 | public struct SendPrimitiveTerseData | 584 | public struct SendPrimitiveTerseData |
600 | { | 585 | { |
601 | private ulong m_regionHandle; | 586 | public readonly ulong RegionHandle; |
602 | private ushort m_timeDilation; | 587 | public readonly ushort TimeDilation; |
603 | private uint m_localID; | 588 | public readonly uint LocalID; |
604 | private Vector3 m_position; | 589 | public readonly Vector3 Position; |
605 | private Quaternion m_rotation; | 590 | public readonly Quaternion Rotation; |
606 | private Vector3 m_velocity; | 591 | public readonly Vector3 Velocity; |
607 | private Vector3 m_rotationalvelocity; | 592 | public readonly Vector3 Acceleration; |
608 | private byte m_state; | 593 | public readonly Vector3 AngularVelocity; |
609 | private UUID m_AssetId; | 594 | public readonly byte State; |
610 | private UUID m_owner; | 595 | public readonly UUID AssetID; |
611 | private int m_attachPoint; | 596 | public readonly UUID OwnerID; |
612 | private double m_priority; | 597 | public readonly int AttachPoint; |
598 | public readonly byte[] TextureEntry; | ||
599 | public readonly double Priority; | ||
613 | 600 | ||
614 | public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | 601 | public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, |
615 | Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, | 602 | Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 rotationalvelocity, byte state, |
616 | UUID AssetId, UUID owner, int attachPoint, double priority) | 603 | UUID assetID, UUID ownerID, int attachPoint, byte[] textureEntry, double priority) |
617 | { | 604 | { |
618 | this.m_regionHandle = regionHandle; | 605 | RegionHandle = regionHandle; |
619 | this.m_timeDilation = timeDilation; | 606 | TimeDilation = timeDilation; |
620 | this.m_localID = localID; | 607 | LocalID = localID; |
621 | this.m_position = position; | 608 | Position = position; |
622 | this.m_rotation = rotation; | 609 | Rotation = rotation; |
623 | this.m_velocity = velocity; | 610 | Velocity = velocity; |
624 | this.m_rotationalvelocity = rotationalvelocity; | 611 | Acceleration = acceleration; |
625 | this.m_state = state; | 612 | AngularVelocity = rotationalvelocity; |
626 | this.m_AssetId = AssetId; | 613 | State = state; |
627 | this.m_owner = owner; | 614 | AssetID = assetID; |
628 | this.m_attachPoint = attachPoint; | 615 | OwnerID = ownerID; |
629 | this.m_priority = priority; | 616 | AttachPoint = attachPoint; |
617 | TextureEntry = textureEntry; | ||
618 | Priority = priority; | ||
630 | } | 619 | } |
631 | |||
632 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
633 | public ushort timeDilation { get { return this.m_timeDilation; } } | ||
634 | public uint localID { get { return this.m_localID; } } | ||
635 | public Vector3 position { get { return this.m_position; } } | ||
636 | public Quaternion rotation { get { return this.m_rotation; } } | ||
637 | public Vector3 velocity { get { return this.m_velocity; } } | ||
638 | public Vector3 rotationalvelocity { get { return this.m_rotationalvelocity; } } | ||
639 | public byte state { get { return this.m_state; } } | ||
640 | public UUID AssetId { get { return this.m_AssetId; } } | ||
641 | public UUID owner { get { return this.m_owner; } } | ||
642 | public int attachPoint { get { return this.m_attachPoint; } } | ||
643 | public double priority { get { return this.m_priority; } } | ||
644 | } | 620 | } |
645 | 621 | ||
646 | public struct SendPrimitiveData | 622 | public struct SendPrimitiveData |
@@ -654,7 +630,7 @@ namespace OpenSim.Framework | |||
654 | private Vector3 m_acc; | 630 | private Vector3 m_acc; |
655 | private Quaternion m_rotation; | 631 | private Quaternion m_rotation; |
656 | private Vector3 m_rvel; | 632 | private Vector3 m_rvel; |
657 | private uint m_flags; | 633 | private PrimFlags m_flags; |
658 | private UUID m_objectID; | 634 | private UUID m_objectID; |
659 | private UUID m_ownerID; | 635 | private UUID m_ownerID; |
660 | private string m_text; | 636 | private string m_text; |
@@ -699,7 +675,7 @@ namespace OpenSim.Framework | |||
699 | this.m_acc = acc; | 675 | this.m_acc = acc; |
700 | this.m_rotation = rotation; | 676 | this.m_rotation = rotation; |
701 | this.m_rvel = rvel; | 677 | this.m_rvel = rvel; |
702 | this.m_flags = flags; | 678 | this.m_flags = (PrimFlags)flags; |
703 | this.m_objectID = objectID; | 679 | this.m_objectID = objectID; |
704 | this.m_ownerID = ownerID; | 680 | this.m_ownerID = ownerID; |
705 | this.m_text = text; | 681 | this.m_text = text; |
@@ -728,7 +704,7 @@ namespace OpenSim.Framework | |||
728 | public Vector3 acc { get { return this.m_acc; } } | 704 | public Vector3 acc { get { return this.m_acc; } } |
729 | public Quaternion rotation { get { return this.m_rotation; } } | 705 | public Quaternion rotation { get { return this.m_rotation; } } |
730 | public Vector3 rvel { get { return this.m_rvel; } } | 706 | public Vector3 rvel { get { return this.m_rvel; } } |
731 | public uint flags { get { return this.m_flags; } } | 707 | public PrimFlags flags { get { return this.m_flags; } } |
732 | public UUID objectID { get { return this.m_objectID; } } | 708 | public UUID objectID { get { return this.m_objectID; } } |
733 | public UUID ownerID { get { return this.m_ownerID; } } | 709 | public UUID ownerID { get { return this.m_ownerID; } } |
734 | public string text { get { return this.m_text; } } | 710 | public string text { get { return this.m_text; } } |