Merge branch '0.6.7-post-fixes' into vehicles

This commit is contained in:
Kitto Flora
2009-09-30 19:07:18 +02:00
93 changed files with 4396 additions and 729 deletions

View File

@@ -47,8 +47,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// This maps between inventory server urls and inventory server clients
private Dictionary<string, InventoryClient> m_inventoryServers = new Dictionary<string, InventoryClient>();
// private Dictionary<string, InventoryClient> m_inventoryServers = new Dictionary<string, InventoryClient>();
private Scene m_scene;
#endregion
@@ -72,13 +71,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
return null;
}
private string UserInventoryURL(UUID userID)
{
CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
if (uinfo != null)
return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI;
return null;
}
// private string UserInventoryURL(UUID userID)
// {
// CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
// if (uinfo != null)
// return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI;
// return null;
// }
private bool IsLocalUser(UUID userID)
{

View File

@@ -77,7 +77,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);
@@ -89,7 +89,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)))
{

View File

@@ -63,6 +63,13 @@ namespace OpenSim.Region.Framework.Scenes
protected List<UUID> m_agentsInTransit;
public bool RegionLoginsEnabled
{
get { return m_regionLoginsEnabled; }
set { m_regionLoginsEnabled = value; }
}
private bool m_regionLoginsEnabled = false;
/// <summary>
/// An agent is crossing into this region
/// </summary>
@@ -1163,7 +1170,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
private bool IsOutsideRegion(Scene s, Vector3 pos)
protected bool IsOutsideRegion(Scene s, Vector3 pos)
{
if (s.TestBorderCross(pos,Cardinals.N))

View File

@@ -245,6 +245,11 @@ namespace OpenSim.Region.Framework.Scenes
}
}
private bool IsAttachmentCheckFull()
{
return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
}
/// <summary>
/// The absolute position of this scene object in the scene
/// </summary>
@@ -257,7 +262,7 @@ namespace OpenSim.Region.Framework.Scenes
if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
|| m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
&& !IsAttachment)
&& !IsAttachmentCheckFull())
{
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
}