TEST move parcelRegionCross to EntityTransferModule cross so it works on

sitting avatars. (may be bad) comented out sending root avatars
information to the child that was just a root it should have it all
already. Dont turn a sitting avatar physical,  that needs to be a stand at SOG
avinationmerge
UbitUmarov 2014-08-10 20:09:02 +01:00
parent c0378d5430
commit 7fcd1068e7
2 changed files with 14 additions and 8 deletions

View File

@ -1529,7 +1529,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos); GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos);
if (neighbourRegion == null) if (neighbourRegion == null)
{ {
agent.ControllingClient.SendAlertMessage("Cannot region cross into banned parcel"); agent.ControllingClient.SendAlertMessage("Cannot region cross into void");
return false; return false;
} }
@ -1680,6 +1680,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
neighbourRegion.RegionName, agent.Name); neighbourRegion.RegionName, agent.Name);
ReInstantiateScripts(agent); ReInstantiateScripts(agent);
if(agent.ParentID == 0 && agent.ParentUUID == UUID.Zero)
agent.AddToPhysicalScene(isFlying); agent.AddToPhysicalScene(isFlying);
return false; return false;
@ -1749,8 +1750,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
m_entityTransferStateMachine.ResetFromTransit(agent.UUID); m_entityTransferStateMachine.ResetFromTransit(agent.UUID);
// now we have a child agent in this region. Request all interesting data about other (root) agents // now we have a child agent in this region. Request all interesting data about other (root) agents
agent.SendOtherAgentsAvatarDataToMe();
agent.SendOtherAgentsAppearanceToMe(); // why do that? we either where a root having all that or we are leaving the area
// agent.SendOtherAgentsAvatarDataToMe();
// agent.SendOtherAgentsAppearanceToMe();
agent.parcelRegionCross(false);
// Backwards compatibility. Best effort // Backwards compatibility. Best effort
if (version == "Unknown" || version == string.Empty) if (version == "Unknown" || version == string.Empty)

View File

@ -3863,7 +3863,7 @@ namespace OpenSim.Region.Framework.Scenes
protected bool CrossToNewRegion() protected bool CrossToNewRegion()
{ {
bool result = false; bool result = false;
parcelRegionCross(false); // parcelRegionCross(false);
try try
{ {
result = m_scene.CrossAgentToNewRegion(this, Flying); result = m_scene.CrossAgentToNewRegion(this, Flying);
@ -3872,8 +3872,8 @@ namespace OpenSim.Region.Framework.Scenes
{ {
result = m_scene.CrossAgentToNewRegion(this, false); result = m_scene.CrossAgentToNewRegion(this, false);
} }
if(!result) // if(!result)
parcelRegionCross(true); // parcelRegionCross(true);
return result; return result;
@ -5531,7 +5531,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
private void parcelRegionCross(bool abort) public void parcelRegionCross(bool abort)
{ {
if (!ParcelHideThisAvatar) if (!ParcelHideThisAvatar)
return; return;