From 159246f88cf5ceb7b2991d87f585d7cf2cd84c91 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 18 Oct 2014 20:27:33 +0100 Subject: fix SW direction diagonal crossing --- .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 24d1270..9c8aada 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1417,6 +1417,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer { Border b = scene.GetCrossedBorder(pos + northCross, Cardinals.N); neighboury += (uint)(int)(b.BorderLine.Z / (int)Constants.RegionSize); + newpos.Y = enterDistance; } else if (scene.TestBorderCross(pos + southCross, Cardinals.S)) { @@ -1536,7 +1537,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer string version; string reason; - GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, agent.AbsolutePosition, out x, out y, out version, out newpos, out reason); + Vector3 pos = agent.AbsolutePosition + agent.Velocity; + + GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, pos, out x, out y, out version, out newpos, out reason); if (neighbourRegion == null) { if (reason == String.Empty) @@ -1678,7 +1681,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // agent.Appearance.WearableCacheItems = null; - cAgent.Position = pos + agent.Velocity; + cAgent.Position = pos; if (isFlying) cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; -- cgit v1.1