Simplify minimap coarse location code by just reference SP.AbsolutePosition

This is rather than checking whether the avatar is sitting and doing its own calculation.
0.7.4.1
Justin Clark-Casey (justincc) 2012-03-09 02:50:57 +00:00
parent 205c36d3a4
commit 06dda14505
2 changed files with 3 additions and 12 deletions

View File

@ -215,11 +215,7 @@ namespace OpenSim.Region.Framework.Scenes
if (sp.IsChildAgent)
continue;
SceneObjectPart sitPart = sp.ParentPart;
if (sitPart != null)
coarseLocations.Add(sitPart.AbsolutePosition + sp.OffsetPosition);
else
coarseLocations.Add(sp.AbsolutePosition);
coarseLocations.Add(sp.AbsolutePosition);
avatarUUIDs.Add(sp.UUID);
}

View File

@ -712,17 +712,12 @@ namespace OpenSim.Region.RegionCombinerModule
List<Vector3> CoarseLocations = new List<Vector3>();
List<UUID> AvatarUUIDs = new List<UUID>();
connectiondata.RegionScene.ForEachRootScenePresence(delegate(ScenePresence sp)
{
if (sp.UUID != presence.UUID)
{
SceneObjectPart sitPart = sp.ParentPart;
if (sitPart != null)
CoarseLocations.Add(sitPart.AbsolutePosition + sp.AbsolutePosition);
else
CoarseLocations.Add(sp.AbsolutePosition);
CoarseLocations.Add(sp.AbsolutePosition);
AvatarUUIDs.Add(sp.UUID);
}
});