mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
near region check on tp needs to be a full current view check.
sp.KnownRegions is unreliable for this.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user