mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
Bring us up to date.
This commit is contained in:
@@ -59,7 +59,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
get { return m_MaxTransferDistance; }
|
||||
set { m_MaxTransferDistance = value; }
|
||||
}
|
||||
|
||||
|
||||
protected bool m_Enabled = false;
|
||||
protected Scene m_aScene;
|
||||
@@ -68,7 +67,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions =
|
||||
new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>();
|
||||
|
||||
|
||||
#region ISharedRegionModule
|
||||
|
||||
public Type ReplaceableInterface
|
||||
@@ -210,7 +208,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.Teleport(position);
|
||||
|
||||
foreach (SceneObjectGroup grp in sp.GetAttachments())
|
||||
sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
|
||||
{
|
||||
if (grp.IsDeleted)
|
||||
sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT);
|
||||
}
|
||||
}
|
||||
else // Another region possibly in another simulator
|
||||
{
|
||||
@@ -328,10 +329,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.StandUp();
|
||||
|
||||
if (!sp.ValidateAttachments())
|
||||
{
|
||||
sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state");
|
||||
return;
|
||||
}
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Failed validation of all attachments for teleport of {0} from {1} to {2}. Continuing.",
|
||||
sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName);
|
||||
|
||||
// if (!sp.ValidateAttachments())
|
||||
// {
|
||||
// sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state");
|
||||
// return;
|
||||
// }
|
||||
|
||||
string reason;
|
||||
string version;
|
||||
@@ -955,7 +961,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
/// This Closes child agents on neighbouring regions
|
||||
/// Calls an asynchronous method to do so.. so it doesn't lag the sim.
|
||||
/// </summary>
|
||||
protected ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying, string version)
|
||||
protected ScenePresence CrossAgentToNewRegionAsync(
|
||||
ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion,
|
||||
bool isFlying, string version)
|
||||
{
|
||||
ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
|
||||
|
||||
@@ -963,8 +971,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
Scene m_scene = agent.Scene;
|
||||
|
||||
if (neighbourRegion != null && agent.ValidateAttachments())
|
||||
if (neighbourRegion != null)
|
||||
{
|
||||
if (!agent.ValidateAttachments())
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Failed validation of all attachments for region crossing of {0} from {1} to {2}. Continuing.",
|
||||
agent.Name, agent.Scene.RegionInfo.RegionName, neighbourRegion.RegionName);
|
||||
|
||||
pos = pos + (agent.Velocity);
|
||||
|
||||
SetInTransit(agent.UUID);
|
||||
@@ -1789,16 +1802,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
List<SceneObjectGroup> m_attachments = sp.GetAttachments();
|
||||
|
||||
// Validate
|
||||
foreach (SceneObjectGroup gobj in m_attachments)
|
||||
{
|
||||
if (gobj == null || gobj.IsDeleted)
|
||||
return false;
|
||||
}
|
||||
// foreach (SceneObjectGroup gobj in m_attachments)
|
||||
// {
|
||||
// if (gobj == null || gobj.IsDeleted)
|
||||
// return false;
|
||||
// }
|
||||
|
||||
foreach (SceneObjectGroup gobj in m_attachments)
|
||||
{
|
||||
// If the prim group is null then something must have happened to it!
|
||||
if (gobj != null)
|
||||
if (gobj != null && !gobj.IsDeleted)
|
||||
{
|
||||
// Set the parent localID to 0 so it transfers over properly.
|
||||
gobj.RootPart.SetParentLocalId(0);
|
||||
|
||||
Reference in New Issue
Block a user