From 06dda14505743bde237362b0e469d16548922f33 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 9 Mar 2012 02:50:57 +0000 Subject: [PATCH] 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. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 +----- .../Region/RegionCombinerModule/RegionCombinerModule.cs | 9 ++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index dd0ca43e67..bc3400a7a5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -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); } diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index a2e3ac2c44..eb633b33bb 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs @@ -712,17 +712,12 @@ namespace OpenSim.Region.RegionCombinerModule List CoarseLocations = new List(); List AvatarUUIDs = new List(); + 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); } });