mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
* Replace Scene.GetLandHeight() with a straight query to Scene.Heightmap (which is used in other contexts)
This commit is contained in:
@@ -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)))
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)))
|
||||
{
|
||||
|
||||
@@ -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)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user