near region check on tp needs to be a full current view check.
sp.KnownRegions is unreliable for this.avinationmerge
parent
0514679b15
commit
25bc349ec9
|
@ -986,15 +986,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
// Well, this is it. The agent is over there.
|
||||
// KillEntity(sp.Scene, sp.LocalId);
|
||||
|
||||
bool nearRegion = sp.KnownRegions.ContainsKey(destinationHandle);
|
||||
sp.HasMovedAway(nearRegion);
|
||||
bool l_needsclosing = NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg);
|
||||
sp.HasMovedAway(!l_needsclosing);
|
||||
|
||||
// Now let's make it officially a child agent
|
||||
sp.MakeChildAgent(destinationHandle);
|
||||
|
||||
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
||||
|
||||
if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
|
||||
if (l_needsclosing)
|
||||
{
|
||||
if (!sp.Scene.IncomingPreCloseClient(sp))
|
||||
return;
|
||||
|
@ -1144,8 +1144,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
|
||||
m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
|
||||
|
||||
bool nearRegion = sp.KnownRegions.ContainsKey(destinationHandle);
|
||||
sp.HasMovedAway(nearRegion);
|
||||
bool l_needsclosing = NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg);
|
||||
sp.HasMovedAway(!l_needsclosing);
|
||||
|
||||
// Need to signal neighbours whether child agents may need closing irrespective of whether this
|
||||
// one needed closing. We also need to close child agents as quickly as possible to avoid complicated
|
||||
|
@ -1163,7 +1163,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
|||
sp.MakeChildAgent(destinationHandle);
|
||||
|
||||
// Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
|
||||
if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
|
||||
if (l_needsclosing)
|
||||
{
|
||||
if (!sp.Scene.IncomingPreCloseClient(sp))
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue