From 11e1948b57f96e7d22c56e82bfb15b93f62a5cef Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 5 Mar 2009 21:10:39 +0000 Subject: * Replace Scene.GetLandHeight() with a straight query to Scene.Heightmap (which is used in other contexts) --- .../Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs | 3 ++- OpenSim/Region/Framework/Scenes/Scene.cs | 5 ----- OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 2 +- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs index 67cc1a1..edd1804 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs @@ -88,7 +88,8 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid } // TODO: Get proper AVG Height float localAVHeight = 1.56f; - float posZLimit = (float)avatar.Scene.GetLandHeight((int)position.X, (int)position.Y); + + float posZLimit = (float)avatar.Scene.Heightmap[(int)position.X, (int)position.Y]; float newPosZ = posZLimit + localAVHeight; if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ))) { diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 7776215..aa0218b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3019,11 +3019,6 @@ namespace OpenSim.Region.Framework.Scenes m_eventManager.TriggerOnPluginConsole(args); } - public double GetLandHeight(int x, int y) - { - return Heightmap[x, y]; - } - public UUID GetLandOwner(float x, float y) { ILandObject land = LandChannel.GetLandObject(x, y); diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index c3b60f8..28ea8b0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -710,7 +710,7 @@ namespace OpenSim.Region.Framework.Scenes // TODO: Get proper AVG Height float localAVHeight = 1.56f; - float posZLimit = (float)avatar.Scene.GetLandHeight((int)position.X, (int)position.Y); + float posZLimit = (float)avatar.Scene.Heightmap[(int)position.X, (int)position.Y]; float newPosZ = posZLimit + localAVHeight; if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ))) { diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6eb6ea4..67f6c29 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -848,7 +848,7 @@ namespace OpenSim.Region.Framework.Scenes localAVHeight = m_avHeight; } - float posZLimit = (float)m_scene.GetLandHeight((int)pos.X, (int)pos.Y); + float posZLimit = (float)m_scene.Heightmap[(int)pos.X, (int)pos.Y]; float newPosZ = posZLimit + localAVHeight / 2; if (posZLimit >= (pos.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ))) { -- cgit v1.1