From ea56f4f27c6e707b54e0e29d2477ef3af2a8c732 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 31 Oct 2015 18:13:02 +0100 Subject: Introduce an EntityTransferContext carrying the version numbers to pass to all interested functions. Should fix the varregion conditional. Still a testing version, do NOT use in production! --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3b13e64..d08237e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -41,6 +41,7 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.PhysicsModules.SharedBase; using OpenSim.Region.Framework.Scenes.Serialization; using PermissionMask = OpenSim.Framework.PermissionMask; +using OpenSim.Services.Interfaces; namespace OpenSim.Region.Framework.Scenes { @@ -476,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes ) { IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface(); - float version = 0f; + EntityTransferContext ctx = new EntityTransferContext(); Vector3 newpos = Vector3.Zero; string failureReason = String.Empty; OpenSim.Services.Interfaces.GridRegion destination = null; @@ -496,7 +497,7 @@ namespace OpenSim.Region.Framework.Scenes // We set the avatar position as being the object // position to get the region to send to - if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, out version, out newpos, out failureReason)) == null) + if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, ctx, out newpos, out failureReason)) == null) { canCross = false; break; @@ -557,14 +558,14 @@ namespace OpenSim.Region.Framework.Scenes // threads rather than any replace threadpool that we might be using. if (Util.FireAndForgetMethod == FireAndForgetMethod.RegressionTest) { - entityTransfer.CrossAgentToNewRegionAsync(av, val, destination, av.Flying, version); + entityTransfer.CrossAgentToNewRegionAsync(av, val, destination, av.Flying, ctx); CrossAgentToNewRegionCompleted(av); } else { CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync; d.BeginInvoke( - av, val, destination, av.Flying, version, + av, val, destination, av.Flying, ctx, ar => CrossAgentToNewRegionCompleted(d.EndInvoke(ar)), null); } } -- cgit v1.1