diff options
author | UbitUmarov | 2012-06-17 11:38:40 +0100 |
---|---|---|
committer | UbitUmarov | 2012-06-17 11:38:40 +0100 |
commit | 8cf414ba32ba995562e574cd2a58ce7ee204a562 (patch) | |
tree | 63c66c8dc249bc91b38f0066829c908dd7088240 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | split ugly expression in a if making it simpler to read (diff) | |
download | opensim-SC-8cf414ba32ba995562e574cd2a58ce7ee204a562.zip opensim-SC-8cf414ba32ba995562e574cd2a58ce7ee204a562.tar.gz opensim-SC-8cf414ba32ba995562e574cd2a58ce7ee204a562.tar.bz2 opensim-SC-8cf414ba32ba995562e574cd2a58ce7ee204a562.tar.xz |
*CHECK/REVIEW* comented out not used sp.ParentPosition. Comented out SOG.AbsolutePosition changing 'linked' avatars positions ( reason in code coment )
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index aab6a49..96eeec4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -631,6 +631,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
631 | if (triggerScriptEvent) | 631 | if (triggerScriptEvent) |
632 | part.TriggerScriptChangedEvent(Changed.POSITION); | 632 | part.TriggerScriptChangedEvent(Changed.POSITION); |
633 | } | 633 | } |
634 | |||
635 | /* | ||
636 | This seems not needed and should not be needed: | ||
637 | sp absolute position depends on sit part absolute position fixed above. | ||
638 | sp ParentPosition is not used anywhere. | ||
639 | Since presence is sitting, viewer considers it 'linked' to root prim, so it will move/rotate it | ||
640 | Sending a extra packet with avatar position is not only bandwidth waste, but may cause jitter in viewers due to UPD nature. | ||
641 | |||
634 | if (!m_dupeInProgress) | 642 | if (!m_dupeInProgress) |
635 | { | 643 | { |
636 | foreach (ScenePresence av in m_linkedAvatars) | 644 | foreach (ScenePresence av in m_linkedAvatars) |
@@ -640,12 +648,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
640 | { | 648 | { |
641 | Vector3 offset = p.GetWorldPosition() - av.ParentPosition; | 649 | Vector3 offset = p.GetWorldPosition() - av.ParentPosition; |
642 | av.AbsolutePosition += offset; | 650 | av.AbsolutePosition += offset; |
643 | av.ParentPosition = p.GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition | 651 | // av.ParentPosition = p.GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition |
644 | av.SendAvatarDataToAllAgents(); | 652 | av.SendAvatarDataToAllAgents(); |
645 | } | 653 | } |
646 | } | 654 | } |
647 | } | 655 | } |
648 | 656 | */ | |
649 | //if (m_rootPart.PhysActor != null) | 657 | //if (m_rootPart.PhysActor != null) |
650 | //{ | 658 | //{ |
651 | //m_rootPart.PhysActor.Position = | 659 | //m_rootPart.PhysActor.Position = |
@@ -676,8 +684,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
676 | if (agent.ParentUUID != UUID.Zero) | 684 | if (agent.ParentUUID != UUID.Zero) |
677 | { | 685 | { |
678 | agent.ParentPart = null; | 686 | agent.ParentPart = null; |
679 | agent.ParentPosition = Vector3.Zero; | 687 | // agent.ParentPosition = Vector3.Zero; |
680 | // agent.ParentUUID = UUID.Zero; | 688 | // agent.ParentUUID = UUID.Zero; |
681 | } | 689 | } |
682 | } | 690 | } |
683 | 691 | ||
@@ -3752,7 +3760,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3752 | else | 3760 | else |
3753 | // ugly rotation update of all parts | 3761 | // ugly rotation update of all parts |
3754 | { | 3762 | { |
3755 | group.AbsolutePosition = AbsolutePosition; | 3763 | group.ResetChildPrimPhysicsPositions(); |
3756 | } | 3764 | } |
3757 | 3765 | ||
3758 | } | 3766 | } |