temp workaround on sits culling
parent
28c9725730
commit
3bc0690a7a
|
@ -5588,27 +5588,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (e != null && e is SceneObjectGroup)
|
if (e != null && e is SceneObjectGroup)
|
||||||
{
|
{
|
||||||
SceneObjectGroup grp = (SceneObjectGroup)e;
|
SceneObjectGroup grp = (SceneObjectGroup)e;
|
||||||
if(grp.IsDeleted || grp.IsAttachment)
|
if(grp.IsDeleted || grp.IsAttachment )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool inviewgroups;
|
bool inviewgroups;
|
||||||
lock (GroupsInView)
|
lock (GroupsInView)
|
||||||
inviewgroups = GroupsInView.Contains(grp);
|
inviewgroups = GroupsInView.Contains(grp);
|
||||||
|
|
||||||
Vector3 grppos = grp.getCenterOffset();
|
//temp handling of sits
|
||||||
float dpos = (grppos - mypos).LengthSquared();
|
if(grp.GetSittingAvatarsCount() > 0)
|
||||||
|
|
||||||
float maxview = grp.GetBoundsRadius() + cullingrange;
|
|
||||||
if (dpos > maxview * maxview)
|
|
||||||
{
|
{
|
||||||
if(inviewgroups)
|
if (!inviewgroups)
|
||||||
kills.Add(grp);
|
GroupsNeedFullUpdate.Add(grp);
|
||||||
|
NewGroupsInView.Add(grp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!inviewgroups)
|
Vector3 grppos = grp.getCenterOffset();
|
||||||
GroupsNeedFullUpdate.Add(grp);
|
float dpos = (grppos - mypos).LengthSquared();
|
||||||
NewGroupsInView.Add(grp);
|
|
||||||
|
float maxview = grp.GetBoundsRadius() + cullingrange;
|
||||||
|
if (dpos > maxview * maxview)
|
||||||
|
{
|
||||||
|
if(inviewgroups)
|
||||||
|
kills.Add(grp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!inviewgroups)
|
||||||
|
GroupsNeedFullUpdate.Add(grp);
|
||||||
|
NewGroupsInView.Add(grp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue