mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
This commit is contained in:
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||
if (regionHandle == m_regionInfo.RegionHandle)
|
||||
{
|
||||
// Teleport within the same region
|
||||
if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0)
|
||||
if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0)
|
||||
{
|
||||
Vector3 emergencyPos = new Vector3(128, 128, 128);
|
||||
|
||||
@@ -90,7 +90,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||
// TODO: Get proper AVG Height
|
||||
float localAVHeight = 1.56f;
|
||||
|
||||
float posZLimit = (float)avatar.Scene.Heightmap[(int)position.X, (int)position.Y];
|
||||
float posZLimit = 22;
|
||||
|
||||
if (position.X > 0 && position.X <= (int)Constants.RegionSize && position.Y > 0 && position.Y <= (int)Constants.RegionSize)
|
||||
{
|
||||
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)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user