aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2015-10-31 18:13:02 +0100
committerMelanie Thielker2015-10-31 18:13:02 +0100
commitea56f4f27c6e707b54e0e29d2477ef3af2a8c732 (patch)
treecd6334f1e6b81cd502aed93abe5f1fd0ae895e6b /OpenSim/Region/Framework
parentRemove testing cruft that is blocking the new protocols. Unit tests no (diff)
downloadopensim-SC-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.zip
opensim-SC-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.tar.gz
opensim-SC-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.tar.bz2
opensim-SC-ea56f4f27c6e707b54e0e29d2477ef3af2a8c732.tar.xz
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!
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs9
2 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index 9e91d7d..d07b15a 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -35,7 +35,7 @@ using OpenSim.Region.Framework.Scenes;
35 35
36namespace OpenSim.Region.Framework.Interfaces 36namespace OpenSim.Region.Framework.Interfaces
37{ 37{
38 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, float version); 38 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, EntityTransferContext ctx);
39 39
40 public interface IEntityTransferModule 40 public interface IEntityTransferModule
41 { 41 {
@@ -92,12 +92,12 @@ namespace OpenSim.Region.Framework.Interfaces
92 92
93 void EnableChildAgent(ScenePresence agent, GridRegion region); 93 void EnableChildAgent(ScenePresence agent, GridRegion region);
94 94
95 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out float version, 95 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, EntityTransferContext ctx,
96 out Vector3 newpos, out string reason); 96 out Vector3 newpos, out string reason);
97 97
98 void Cross(SceneObjectGroup sog, Vector3 position, bool silent); 98 void Cross(SceneObjectGroup sog, Vector3 position, bool silent);
99 99
100 ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, float version); 100 ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, EntityTransferContext ctx);
101 101
102 bool HandleIncomingSceneObject(SceneObjectGroup so, Vector3 newPosition); 102 bool HandleIncomingSceneObject(SceneObjectGroup so, Vector3 newPosition);
103 } 103 }
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;
41using OpenSim.Region.PhysicsModules.SharedBase; 41using OpenSim.Region.PhysicsModules.SharedBase;
42using OpenSim.Region.Framework.Scenes.Serialization; 42using OpenSim.Region.Framework.Scenes.Serialization;
43using PermissionMask = OpenSim.Framework.PermissionMask; 43using PermissionMask = OpenSim.Framework.PermissionMask;
44using OpenSim.Services.Interfaces;
44 45
45namespace OpenSim.Region.Framework.Scenes 46namespace OpenSim.Region.Framework.Scenes
46{ 47{
@@ -476,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes
476 ) 477 )
477 { 478 {
478 IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>(); 479 IEntityTransferModule entityTransfer = m_scene.RequestModuleInterface<IEntityTransferModule>();
479 float version = 0f; 480 EntityTransferContext ctx = new EntityTransferContext();
480 Vector3 newpos = Vector3.Zero; 481 Vector3 newpos = Vector3.Zero;
481 string failureReason = String.Empty; 482 string failureReason = String.Empty;
482 OpenSim.Services.Interfaces.GridRegion destination = null; 483 OpenSim.Services.Interfaces.GridRegion destination = null;
@@ -496,7 +497,7 @@ namespace OpenSim.Region.Framework.Scenes
496 497
497 // We set the avatar position as being the object 498 // We set the avatar position as being the object
498 // position to get the region to send to 499 // position to get the region to send to
499 if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, out version, out newpos, out failureReason)) == null) 500 if ((destination = entityTransfer.GetDestination(m_scene, av.UUID, val, ctx, out newpos, out failureReason)) == null)
500 { 501 {
501 canCross = false; 502 canCross = false;
502 break; 503 break;
@@ -557,14 +558,14 @@ namespace OpenSim.Region.Framework.Scenes
557 // threads rather than any replace threadpool that we might be using. 558 // threads rather than any replace threadpool that we might be using.
558 if (Util.FireAndForgetMethod == FireAndForgetMethod.RegressionTest) 559 if (Util.FireAndForgetMethod == FireAndForgetMethod.RegressionTest)
559 { 560 {
560 entityTransfer.CrossAgentToNewRegionAsync(av, val, destination, av.Flying, version); 561 entityTransfer.CrossAgentToNewRegionAsync(av, val, destination, av.Flying, ctx);
561 CrossAgentToNewRegionCompleted(av); 562 CrossAgentToNewRegionCompleted(av);
562 } 563 }
563 else 564 else
564 { 565 {
565 CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync; 566 CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync;
566 d.BeginInvoke( 567 d.BeginInvoke(
567 av, val, destination, av.Flying, version, 568 av, val, destination, av.Flying, ctx,
568 ar => CrossAgentToNewRegionCompleted(d.EndInvoke(ar)), null); 569 ar => CrossAgentToNewRegionCompleted(d.EndInvoke(ar)), null);
569 } 570 }
570 } 571 }