Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
commit
c9dbcfbb31
|
@ -1727,6 +1727,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
uint x = 0, y = 0;
|
||||
Utils.LongToUInts(newRegionHandle, out x, out y);
|
||||
GridRegion destination = scene.GridService.GetRegionByPosition(scene.RegionInfo.ScopeID, (int)x, (int)y);
|
||||
|
||||
if (destination == null || !CrossPrimGroupIntoNewRegion(destination, grp, silent))
|
||||
{
|
||||
m_log.InfoFormat("[ENTITY TRANSFER MODULE] cross region transfer failed for object {0}",grp.UUID);
|
||||
|
||||
// We are going to move the object back to the old position so long as the old position
|
||||
// is in the region
|
||||
oldGroupPosition.X = Util.Clamp<float>(oldGroupPosition.X,1.0f,(float)Constants.RegionSize-1);
|
||||
oldGroupPosition.Y = Util.Clamp<float>(oldGroupPosition.Y,1.0f,(float)Constants.RegionSize-1);
|
||||
oldGroupPosition.Z = Util.Clamp<float>(oldGroupPosition.Z,1.0f,4096.0f);
|
||||
|
||||
grp.RootPart.GroupPosition = oldGroupPosition;
|
||||
|
||||
// Need to turn off the physics flags, otherwise the object will continue to attempt to
|
||||
// move out of the region creating an infinite loop of failed attempts to cross
|
||||
grp.UpdatePrimFlags(grp.RootPart.LocalId,false,grp.IsTemporary,grp.IsPhantom,false);
|
||||
|
||||
grp.ScheduleGroupForFullUpdate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (destination != null && !CrossPrimGroupIntoNewRegion(destination, grp, silent))
|
||||
{
|
||||
grp.RootPart.GroupPosition = oldGroupPosition;
|
||||
|
|
|
@ -273,7 +273,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </remarks>
|
||||
public bool UsesPhysics
|
||||
{
|
||||
get { return (RootPart.Flags & PrimFlags.TemporaryOnRez) != 0; }
|
||||
get { return (RootPart.Flags & PrimFlags.Physics) != 0; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
private const uint m_regionWidth = Constants.RegionSize;
|
||||
private const uint m_regionHeight = Constants.RegionSize;
|
||||
|
||||
private float ODE_STEPSIZE = 0.020f;
|
||||
private float ODE_STEPSIZE = 0.0178f;
|
||||
private float metersInSpace = 29.9f;
|
||||
private float m_timeDilation = 1.0f;
|
||||
|
||||
|
@ -456,7 +456,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
mAvatarObjectContactFriction = physicsconfig.GetFloat("m_avatarobjectcontact_friction", 75f);
|
||||
mAvatarObjectContactBounce = physicsconfig.GetFloat("m_avatarobjectcontact_bounce", 0.1f);
|
||||
|
||||
ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", 0.020f);
|
||||
ODE_STEPSIZE = physicsconfig.GetFloat("world_stepsize", ODE_STEPSIZE);
|
||||
m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10);
|
||||
|
||||
avDensity = physicsconfig.GetFloat("av_density", 80f);
|
||||
|
|
|
@ -352,26 +352,54 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
|
||||
public List<GridRegion> GetHyperlinks(UUID scopeID)
|
||||
{
|
||||
// Hypergrid/linked regions are not supported
|
||||
return new List<GridRegion>();
|
||||
List<GridRegion> foundRegions = new List<GridRegion>();
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
{ "RequestMethod", "GetScenes" },
|
||||
{ "HyperGrid", "true" },
|
||||
{ "Enabled", "1" }
|
||||
};
|
||||
|
||||
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||
if (response["Success"].AsBoolean())
|
||||
{
|
||||
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] found regions with name {0}",name);
|
||||
|
||||
OSDArray array = response["Scenes"] as OSDArray;
|
||||
if (array != null)
|
||||
{
|
||||
for (int i = 0; i < array.Count; i++)
|
||||
{
|
||||
GridRegion region = ResponseToGridRegion(array[i] as OSDMap);
|
||||
if (region != null)
|
||||
foundRegions.Add(region);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return foundRegions;
|
||||
}
|
||||
|
||||
public int GetRegionFlags(UUID scopeID, UUID regionID)
|
||||
{
|
||||
const int REGION_ONLINE = 4;
|
||||
|
||||
NameValueCollection requestArgs = new NameValueCollection
|
||||
{
|
||||
{ "RequestMethod", "GetScene" },
|
||||
{ "SceneID", regionID.ToString() }
|
||||
};
|
||||
|
||||
// m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString());
|
||||
m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request region flags for {0}",regionID.ToString());
|
||||
|
||||
OSDMap response = WebUtil.PostToService(m_ServerURI, requestArgs);
|
||||
if (response["Success"].AsBoolean())
|
||||
{
|
||||
return response["Enabled"].AsBoolean() ? REGION_ONLINE : 0;
|
||||
OSDMap extraData = response["ExtraData"] as OSDMap;
|
||||
int enabled = response["Enabled"].AsBoolean() ? (int) OpenSim.Data.RegionFlags.RegionOnline : 0;
|
||||
int hypergrid = extraData["HyperGrid"].AsBoolean() ? (int) OpenSim.Data.RegionFlags.Hyperlink : 0;
|
||||
int flags = enabled | hypergrid;
|
||||
m_log.DebugFormat("[SGGC] enabled - {0} hg - {1} flags - {2}", enabled, hypergrid, flags);
|
||||
return flags;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -500,23 +528,26 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
|||
region.RegionLocX = (int)minPosition.X;
|
||||
region.RegionLocY = (int)minPosition.Y;
|
||||
|
||||
Uri httpAddress = response["Address"].AsUri();
|
||||
region.ExternalHostName = httpAddress.Host;
|
||||
region.HttpPort = (uint)httpAddress.Port;
|
||||
if ( ! extraData["HyperGrid"] ) {
|
||||
Uri httpAddress = response["Address"].AsUri();
|
||||
region.ExternalHostName = httpAddress.Host;
|
||||
region.HttpPort = (uint)httpAddress.Port;
|
||||
|
||||
region.ServerURI = extraData["ServerURI"].AsString();
|
||||
IPAddress internalAddress;
|
||||
IPAddress.TryParse(extraData["InternalAddress"].AsString(), out internalAddress);
|
||||
if (internalAddress == null)
|
||||
internalAddress = IPAddress.Any;
|
||||
|
||||
IPAddress internalAddress;
|
||||
IPAddress.TryParse(extraData["InternalAddress"].AsString(), out internalAddress);
|
||||
if (internalAddress == null)
|
||||
internalAddress = IPAddress.Any;
|
||||
|
||||
region.InternalEndPoint = new IPEndPoint(internalAddress, extraData["InternalPort"].AsInteger());
|
||||
region.TerrainImage = extraData["MapTexture"].AsUUID();
|
||||
region.Access = (byte)extraData["Access"].AsInteger();
|
||||
region.RegionSecret = extraData["RegionSecret"].AsString();
|
||||
region.EstateOwner = extraData["EstateOwner"].AsUUID();
|
||||
region.Token = extraData["Token"].AsString();
|
||||
region.InternalEndPoint = new IPEndPoint(internalAddress, extraData["InternalPort"].AsInteger());
|
||||
region.TerrainImage = extraData["MapTexture"].AsUUID();
|
||||
region.Access = (byte)extraData["Access"].AsInteger();
|
||||
region.RegionSecret = extraData["RegionSecret"].AsString();
|
||||
region.EstateOwner = extraData["EstateOwner"].AsUUID();
|
||||
region.Token = extraData["Token"].AsString();
|
||||
region.ServerURI = extraData["ServerURI"].AsString();
|
||||
} else {
|
||||
region.ServerURI = response["Address"];
|
||||
}
|
||||
|
||||
return region;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue