From 3bc0690a7a49fe38644ca3ae3cfae6bb5f34c91a Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 5 Apr 2019 12:32:36 +0100 Subject: temp workaround on sits culling --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 32 ++++++++++++++-------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs') 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 if (e != null && e is SceneObjectGroup) { SceneObjectGroup grp = (SceneObjectGroup)e; - if(grp.IsDeleted || grp.IsAttachment) + if(grp.IsDeleted || grp.IsAttachment ) continue; bool inviewgroups; lock (GroupsInView) inviewgroups = GroupsInView.Contains(grp); - Vector3 grppos = grp.getCenterOffset(); - float dpos = (grppos - mypos).LengthSquared(); - - float maxview = grp.GetBoundsRadius() + cullingrange; - if (dpos > maxview * maxview) + //temp handling of sits + if(grp.GetSittingAvatarsCount() > 0) { - if(inviewgroups) - kills.Add(grp); + if (!inviewgroups) + GroupsNeedFullUpdate.Add(grp); + NewGroupsInView.Add(grp); } else { - if(!inviewgroups) - GroupsNeedFullUpdate.Add(grp); - NewGroupsInView.Add(grp); + Vector3 grppos = grp.getCenterOffset(); + float dpos = (grppos - mypos).LengthSquared(); + + float maxview = grp.GetBoundsRadius() + cullingrange; + if (dpos > maxview * maxview) + { + if(inviewgroups) + kills.Add(grp); + } + else + { + if (!inviewgroups) + GroupsNeedFullUpdate.Add(grp); + NewGroupsInView.Add(grp); + } } } } -- cgit v1.1