Signed-off-by: Robert Adams <misterblue@misterblue.com>0.8.0.3
parent
3f76f72137
commit
bc969a6b46
|
@ -2472,6 +2472,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Get terrain height for sub-region in a megaregion if necessary
|
// Get terrain height for sub-region in a megaregion if necessary
|
||||||
|
|
||||||
|
//COMMENT: If its only nessesary in a megaregion, why do it on normal region's too?
|
||||||
|
|
||||||
|
if (regionCombinerModule != null)
|
||||||
|
{
|
||||||
int X = (int)((m_scene.RegionInfo.WorldLocX) + pos.X);
|
int X = (int)((m_scene.RegionInfo.WorldLocX) + pos.X);
|
||||||
int Y = (int)((m_scene.RegionInfo.WorldLocY) + pos.Y);
|
int Y = (int)((m_scene.RegionInfo.WorldLocY) + pos.Y);
|
||||||
GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y);
|
GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y);
|
||||||
|
@ -2493,14 +2498,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (pos.Z - terrainHeight < 0.2)
|
if (pos.Z - terrainHeight < 0.2)
|
||||||
pos.Z = terrainHeight;
|
pos.Z = terrainHeight;
|
||||||
|
|
||||||
|
if (noFly)
|
||||||
|
Flying = false;
|
||||||
|
else if (pos.Z > terrainHeight)
|
||||||
|
Flying = true;
|
||||||
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}",
|
// "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}",
|
||||||
// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName);
|
// Name, pos, terrainHeight, m_scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
if (noFly)
|
if (noFly)
|
||||||
Flying = false;
|
Flying = false;
|
||||||
else if (pos.Z > terrainHeight)
|
|
||||||
Flying = true;
|
|
||||||
|
|
||||||
LandAtTarget = landAtTarget;
|
LandAtTarget = landAtTarget;
|
||||||
MovingToTarget = true;
|
MovingToTarget = true;
|
||||||
|
|
Loading…
Reference in New Issue