aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index a57e0d1..9bc9c2d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2075,7 +2075,11 @@ namespace OpenSim.Region.Framework.Scenes
2075 // Get terrain height for sub-region in a megaregion if necessary 2075 // Get terrain height for sub-region in a megaregion if necessary
2076 int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X); 2076 int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X);
2077 int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y); 2077 int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y);
2078 UUID target_regionID = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y).RegionID; 2078 GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y);
2079 // If X and Y is NaN, target_region will be null
2080 if (target_region == null)
2081 return;
2082 UUID target_regionID = target_region.RegionID;
2079 Scene targetScene = m_scene; 2083 Scene targetScene = m_scene;
2080 2084
2081 if (!SceneManager.Instance.TryGetScene(target_regionID, out targetScene)) 2085 if (!SceneManager.Instance.TryGetScene(target_regionID, out targetScene))