diff options
author | UbitUmarov | 2016-07-14 02:11:50 +0100 |
---|---|---|
committer | UbitUmarov | 2016-07-14 02:11:50 +0100 |
commit | aba4e2d13b7c9d40ddfe371f15d3da390b80e297 (patch) | |
tree | d5c4afb12d78181000a7b36aacedb0b2ea73481b /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |
parent | make getBoundsCenter() call GetBoundsRadius() to do the math if needed (diff) | |
download | opensim-SC-aba4e2d13b7c9d40ddfe371f15d3da390b80e297.zip opensim-SC-aba4e2d13b7c9d40ddfe371f15d3da390b80e297.tar.gz opensim-SC-aba4e2d13b7c9d40ddfe371f15d3da390b80e297.tar.bz2 opensim-SC-aba4e2d13b7c9d40ddfe371f15d3da390b80e297.tar.xz |
revert changes to Select/DeSelect, using the SelectObjects as control seems bad
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 47 |
1 files changed, 18 insertions, 29 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 2f5d3c8..34eae44 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -4115,7 +4115,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4115 | 4115 | ||
4116 | if(!inview) | 4116 | if(!inview) |
4117 | { | 4117 | { |
4118 | float bradius = grp.GetBoundsRadius(); // needs to be called before getBoundsCenter | 4118 | float bradius = grp.GetBoundsRadius(); |
4119 | Vector3 partpos = grp.AbsolutePosition + grp.getBoundsCenter(); | 4119 | Vector3 partpos = grp.AbsolutePosition + grp.getBoundsCenter(); |
4120 | // float dcam = (partpos - mycamera).LengthSquared(); | 4120 | // float dcam = (partpos - mycamera).LengthSquared(); |
4121 | float dpos = (partpos - mypos).LengthSquared(); | 4121 | float dpos = (partpos - mypos).LengthSquared(); |
@@ -4419,7 +4419,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4419 | if(grp.IsDeleted || grp.IsAttachment) | 4419 | if(grp.IsDeleted || grp.IsAttachment) |
4420 | continue; | 4420 | continue; |
4421 | 4421 | ||
4422 | float bradius = grp.GetBoundsRadius(); // needs to be called before getBoundsCenter | 4422 | float bradius = grp.GetBoundsRadius(); |
4423 | Vector3 grppos = grp.AbsolutePosition + grp.getBoundsCenter(); | 4423 | Vector3 grppos = grp.AbsolutePosition + grp.getBoundsCenter(); |
4424 | // float dcam = (grppos - mycamera).LengthSquared(); | 4424 | // float dcam = (grppos - mycamera).LengthSquared(); |
4425 | float dpos = (grppos - mypos).LengthSquared(); | 4425 | float dpos = (grppos - mypos).LengthSquared(); |
@@ -7688,22 +7688,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7688 | 7688 | ||
7689 | ObjectSelect handlerObjectSelect = null; | 7689 | ObjectSelect handlerObjectSelect = null; |
7690 | uint objID; | 7690 | uint objID; |
7691 | lock(SelectedObjects) | 7691 | for (int i = 0; i < incomingselect.ObjectData.Length; i++) |
7692 | { | 7692 | { |
7693 | for (int i = 0; i < incomingselect.ObjectData.Length; i++) | 7693 | objID = incomingselect.ObjectData[i].ObjectLocalID; |
7694 | { | 7694 | if (!SelectedObjects.Contains(objID)) |
7695 | objID = incomingselect.ObjectData[i].ObjectLocalID; | 7695 | SelectedObjects.Add(objID); |
7696 | |||
7697 | if (!SelectedObjects.Contains(objID)) | ||
7698 | { | ||
7699 | SelectedObjects.Add(objID); | ||
7700 | 7696 | ||
7701 | handlerObjectSelect = OnObjectSelect; | 7697 | handlerObjectSelect = OnObjectSelect; |
7702 | if (handlerObjectSelect != null) | 7698 | if (handlerObjectSelect != null) |
7703 | { | 7699 | { |
7704 | handlerObjectSelect(objID, this); | 7700 | handlerObjectSelect(objID, this); |
7705 | } | ||
7706 | } | ||
7707 | } | 7701 | } |
7708 | } | 7702 | } |
7709 | return true; | 7703 | return true; |
@@ -7724,21 +7718,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7724 | 7718 | ||
7725 | ObjectDeselect handlerObjectDeselect = null; | 7719 | ObjectDeselect handlerObjectDeselect = null; |
7726 | uint objID; | 7720 | uint objID; |
7727 | lock(SelectedObjects) | 7721 | for (int i = 0; i < incomingdeselect.ObjectData.Length; i++) |
7728 | { | 7722 | { |
7729 | for (int i = 0; i < incomingdeselect.ObjectData.Length; i++) | 7723 | objID = incomingdeselect.ObjectData[i].ObjectLocalID; |
7730 | { | 7724 | if (SelectedObjects.Contains(objID)) |
7731 | objID = incomingdeselect.ObjectData[i].ObjectLocalID; | 7725 | SelectedObjects.Remove(objID); |
7732 | if (SelectedObjects.Contains(objID)) | ||
7733 | { | ||
7734 | SelectedObjects.Remove(objID); | ||
7735 | 7726 | ||
7736 | handlerObjectDeselect = OnObjectDeselect; | 7727 | handlerObjectDeselect = OnObjectDeselect; |
7737 | if (handlerObjectDeselect != null) | 7728 | if (handlerObjectDeselect != null) |
7738 | { | 7729 | { |
7739 | OnObjectDeselect(objID, this); | 7730 | OnObjectDeselect(objID, this); |
7740 | } | ||
7741 | } | ||
7742 | } | 7731 | } |
7743 | } | 7732 | } |
7744 | return true; | 7733 | return true; |