diff options
author | UbitUmarov | 2019-04-05 12:32:36 +0100 |
---|---|---|
committer | UbitUmarov | 2019-04-05 12:32:36 +0100 |
commit | 3bc0690a7a49fe38644ca3ae3cfae6bb5f34c91a (patch) | |
tree | 27046c4c98216d0f4c4c58ba740af627aef7ff2f /OpenSim | |
parent | kill avatar on agents that do not see its new region (diff) | |
download | opensim-SC-3bc0690a7a49fe38644ca3ae3cfae6bb5f34c91a.zip opensim-SC-3bc0690a7a49fe38644ca3ae3cfae6bb5f34c91a.tar.gz opensim-SC-3bc0690a7a49fe38644ca3ae3cfae6bb5f34c91a.tar.bz2 opensim-SC-3bc0690a7a49fe38644ca3ae3cfae6bb5f34c91a.tar.xz |
temp workaround on sits culling
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index a1d2e11..112b66d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5588,27 +5588,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5588 | if (e != null && e is SceneObjectGroup) | 5588 | if (e != null && e is SceneObjectGroup) |
5589 | { | 5589 | { |
5590 | SceneObjectGroup grp = (SceneObjectGroup)e; | 5590 | SceneObjectGroup grp = (SceneObjectGroup)e; |
5591 | if(grp.IsDeleted || grp.IsAttachment) | 5591 | if(grp.IsDeleted || grp.IsAttachment ) |
5592 | continue; | 5592 | continue; |
5593 | 5593 | ||
5594 | bool inviewgroups; | 5594 | bool inviewgroups; |
5595 | lock (GroupsInView) | 5595 | lock (GroupsInView) |
5596 | inviewgroups = GroupsInView.Contains(grp); | 5596 | inviewgroups = GroupsInView.Contains(grp); |
5597 | 5597 | ||
5598 | Vector3 grppos = grp.getCenterOffset(); | 5598 | //temp handling of sits |
5599 | float dpos = (grppos - mypos).LengthSquared(); | 5599 | if(grp.GetSittingAvatarsCount() > 0) |
5600 | |||
5601 | float maxview = grp.GetBoundsRadius() + cullingrange; | ||
5602 | if (dpos > maxview * maxview) | ||
5603 | { | 5600 | { |
5604 | if(inviewgroups) | 5601 | if (!inviewgroups) |
5605 | kills.Add(grp); | 5602 | GroupsNeedFullUpdate.Add(grp); |
5603 | NewGroupsInView.Add(grp); | ||
5606 | } | 5604 | } |
5607 | else | 5605 | else |
5608 | { | 5606 | { |
5609 | if(!inviewgroups) | 5607 | Vector3 grppos = grp.getCenterOffset(); |
5610 | GroupsNeedFullUpdate.Add(grp); | 5608 | float dpos = (grppos - mypos).LengthSquared(); |
5611 | NewGroupsInView.Add(grp); | 5609 | |
5610 | float maxview = grp.GetBoundsRadius() + cullingrange; | ||
5611 | if (dpos > maxview * maxview) | ||
5612 | { | ||
5613 | if(inviewgroups) | ||
5614 | kills.Add(grp); | ||
5615 | } | ||
5616 | else | ||
5617 | { | ||
5618 | if (!inviewgroups) | ||
5619 | GroupsNeedFullUpdate.Add(grp); | ||
5620 | NewGroupsInView.Add(grp); | ||
5621 | } | ||
5612 | } | 5622 | } |
5613 | } | 5623 | } |
5614 | } | 5624 | } |