aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2015-11-01 03:01:59 +0000
committerUbitUmarov2015-11-01 03:01:59 +0000
commit72684592ba196095311b308407cbe5751c6dd8dd (patch)
treec51a1fb67c6d425b1cb904e788bac8a720d951c8 /OpenSim/Region
parent fix cut points of UTF-8 strings (diff)
parentMinor: Add an initializer to show what the default value would be. (diff)
downloadopensim-SC-72684592ba196095311b308407cbe5751c6dd8dd.zip
opensim-SC-72684592ba196095311b308407cbe5751c6dd8dd.tar.gz
opensim-SC-72684592ba196095311b308407cbe5751c6dd8dd.tar.bz2
opensim-SC-72684592ba196095311b308407cbe5751c6dd8dd.tar.xz
Merge branch 'master' into avinationmerge
Conflicts: OpenSim/Framework/AvatarAppearance.cs OpenSim/Framework/Servers/ServerBase.cs OpenSim/Framework/VersionInfo.cs OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs OpenSim/Region/Framework/Scenes/SceneObjectPart.cs OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs OpenSim/Region/PhysicsModules/Ode/OdeScene.cs OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs OpenSim/Services/HypergridService/GatekeeperService.cs OpenSim/Services/Interfaces/IAvatarService.cs OpenSim/Services/LLLoginService/LLLoginService.cs
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs18
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs68
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs23
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs8
-rw-r--r--OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs8
-rw-r--r--OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs1
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs2
12 files changed, 75 insertions, 87 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
index 7d9609f..34b38b9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
@@ -802,6 +802,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
802 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0)); 802 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
803 } 803 }
804 804
805/*
805 [Test] 806 [Test]
806 public void TestSameSimulatorNeighbouringRegionsTeleportV1() 807 public void TestSameSimulatorNeighbouringRegionsTeleportV1()
807 { 808 {
@@ -841,7 +842,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
841 sceneB, config, new CapabilitiesModule(), etmB, attModB, new BasicInventoryAccessModule()); 842 sceneB, config, new CapabilitiesModule(), etmB, attModB, new BasicInventoryAccessModule());
842 843
843 // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour 844 // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
844 lscm.ServiceVersion = "SIMULATION/0.1"; 845 lscm.ServiceVersion = 0.1f;
845 846
846 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(sceneA, 0x1); 847 UserAccount ua1 = UserAccountHelpers.CreateUserWithInventory(sceneA, 0x1);
847 848
@@ -909,6 +910,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
909 // Check events 910 // Check events
910 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0)); 911 Assert.That(m_numberOfAttachEventsFired, Is.EqualTo(0));
911 } 912 }
913*/
912 914
913 [Test] 915 [Test]
914 public void TestSameSimulatorNeighbouringRegionsTeleportV2() 916 public void TestSameSimulatorNeighbouringRegionsTeleportV2()
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 0b5d95b..0472f31 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -63,18 +63,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
63 { 63 {
64 m_config = config.Configs["Chat"]; 64 m_config = config.Configs["Chat"];
65 65
66 if (null == m_config) 66 if (m_config != null)
67 { 67 {
68 m_log.Info("[CHAT]: no config found, plugin disabled"); 68 if (!m_config.GetBoolean("enabled", true))
69 m_enabled = false; 69 {
70 return; 70 m_log.Info("[CHAT]: plugin disabled by configuration");
71 } 71 m_enabled = false;
72 72 return;
73 if (!m_config.GetBoolean("enabled", true)) 73 }
74 {
75 m_log.Info("[CHAT]: plugin disabled by configuration");
76 m_enabled = false;
77 return;
78 } 74 }
79 75
80 m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); 76 m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance);
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 9be6d45..8a4ac1b 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -57,14 +57,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
57 public const int DefaultMaxTransferDistance = 4095; 57 public const int DefaultMaxTransferDistance = 4095;
58 public const bool WaitForAgentArrivedAtDestinationDefault = true; 58 public const bool WaitForAgentArrivedAtDestinationDefault = true;
59 59
60 public static readonly string OutgoingTransferVersionName = "SIMULATION";
61
62 /// <summary>
63 /// Determine the entity transfer version we will use for teleports.
64 /// </summary>
65 public static readonly float OutgoingTransferVersion = VersionInfo.SimulationServiceVersion;
66
67 private string m_myVersion = "";
68 /// <summary> 60 /// <summary>
69 /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer. 61 /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer.
70 /// </summary> 62 /// </summary>
@@ -243,8 +235,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
243 MaxTransferDistance = DefaultMaxTransferDistance; 235 MaxTransferDistance = DefaultMaxTransferDistance;
244 } 236 }
245 237
246 m_myVersion = string.Format("{0}/{1}", OutgoingTransferVersionName, OutgoingTransferVersion);
247
248 m_entityTransferStateMachine = new EntityTransferStateMachine(this); 238 m_entityTransferStateMachine = new EntityTransferStateMachine(this);
249 239
250 m_Enabled = true; 240 m_Enabled = true;
@@ -736,10 +726,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
736 sp.Name, sp.Scene.Name, finalDestination.RegionName); 726 sp.Name, sp.Scene.Name, finalDestination.RegionName);
737 727
738 string reason; 728 string reason;
739 string version; 729 EntityTransferContext ctx = new EntityTransferContext();
740 730
741 if (!Scene.SimulationService.QueryAccess( 731 if (!Scene.SimulationService.QueryAccess(
742 finalDestination, sp.ControllingClient.AgentId, homeURI, true, position,m_myVersion, sp.Scene.GetFormatsOffered(), out version, out reason)) 732 finalDestination, sp.ControllingClient.AgentId, homeURI, true, position, sp.Scene.GetFormatsOffered(), ctx, out reason))
743 { 733 {
744 sp.ControllingClient.SendTeleportFailed(reason); 734 sp.ControllingClient.SendTeleportFailed(reason);
745 735
@@ -756,8 +746,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
756 m_interRegionTeleportAttempts.Value++; 746 m_interRegionTeleportAttempts.Value++;
757 747
758 m_log.DebugFormat( 748 m_log.DebugFormat(
759 "[ENTITY TRANSFER MODULE]: {0} transfer version is {1}/{2}, {3} version is {4}", 749 "[ENTITY TRANSFER MODULE]: {0} transfer protocol version to {1} is {2} / {3}",
760 sp.Scene.Name, OutgoingTransferVersionName, OutgoingTransferVersion, finalDestination.RegionName, version); 750 sp.Scene.Name, finalDestination.RegionName, ctx.OutboundVersion, ctx.InboundVersion);
761 751
762 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from 752 // Fixing a bug where teleporting while sitting results in the avatar ending up removed from
763 // both regions 753 // both regions
@@ -837,21 +827,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
837 agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath(); 827 agentCircuit.CapsPath = CapsUtil.GetRandomCapsObjectPath();
838 } 828 }
839 829
840 // We're going to fallback to V1 if the destination gives us anything smaller than 0.2 or we're forcing 830 // We're going to fallback to V1 if the destination gives us anything smaller than 0.2
841 // use of the earlier protocol 831 if (ctx.OutboundVersion >= 0.2f)
842 float versionNumber = 0.1f; 832 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , ctx, out reason);
843 string[] versionComponents = version.Split(new char[] { '/' });
844 if (versionComponents.Length >= 2)
845 float.TryParse(versionComponents[1], out versionNumber);
846
847 if (versionNumber >= 0.2f)
848 TransferAgent_V2(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange , version, out reason);
849 else 833 else
850 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, version, out reason); 834 TransferAgent_V1(sp, agentCircuit, reg, finalDestination, endPoint, teleportFlags, OutSideViewRange, ctx, out reason);
851 } 835 }
852 836
853 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, 837 private void TransferAgent_V1(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
854 IPEndPoint endPoint, uint teleportFlags, bool OutSideViewRange, string version, out string reason) 838 IPEndPoint endPoint, uint teleportFlags, bool OutSideViewRange, EntityTransferContext ctx, out string reason)
855 { 839 {
856 ulong destinationHandle = finalDestination.RegionHandle; 840 ulong destinationHandle = finalDestination.RegionHandle;
857 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); 841 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
@@ -1045,13 +1029,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1045 } 1029 }
1046 1030
1047 1031
1032/*
1033 // TODO: This may be 0.6. Check if still needed
1048 // For backwards compatibility 1034 // For backwards compatibility
1049 if (version == "Unknown" || version == string.Empty) 1035 if (version == 0f)
1050 { 1036 {
1051 // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it 1037 // CrossAttachmentsIntoNewRegion is a synchronous call. We shouldn't need to wait after it
1052 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Old simulator, sending attachments one by one..."); 1038 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Old simulator, sending attachments one by one...");
1053 CrossAttachmentsIntoNewRegion(finalDestination, sp, true); 1039 CrossAttachmentsIntoNewRegion(finalDestination, sp, true);
1054 } 1040 }
1041*/
1055 1042
1056 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); 1043 m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp);
1057 1044
@@ -1087,7 +1074,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1087 } 1074 }
1088 1075
1089 private void TransferAgent_V2(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination, 1076 private void TransferAgent_V2(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
1090 IPEndPoint endPoint, uint teleportFlags, bool OutSideViewRange, string version, out string reason) 1077 IPEndPoint endPoint, uint teleportFlags, bool OutSideViewRange, EntityTransferContext ctx, out string reason)
1091 { 1078 {
1092 ulong destinationHandle = finalDestination.RegionHandle; 1079 ulong destinationHandle = finalDestination.RegionHandle;
1093 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); 1080 AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
@@ -1494,9 +1481,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1494 // now only works for crossings 1481 // now only works for crossings
1495 1482
1496 public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, 1483 public GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos,
1497 out string version, out Vector3 newpos, out string failureReason) 1484 EntityTransferContext ctx, out Vector3 newpos, out string failureReason)
1498 { 1485 {
1499 version = String.Empty;
1500 newpos = pos; 1486 newpos = pos;
1501 failureReason = string.Empty; 1487 failureReason = string.Empty;
1502 1488
@@ -1532,8 +1518,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1532 string homeURI = scene.GetAgentHomeURI(agentID); 1518 string homeURI = scene.GetAgentHomeURI(agentID);
1533 1519
1534 if (!scene.SimulationService.QueryAccess( 1520 if (!scene.SimulationService.QueryAccess(
1535 neighbourRegion, agentID, homeURI, false, newpos, m_myVersion, 1521 neighbourRegion, agentID, homeURI, false, newpos,
1536 new List<UUID>(), out version, out failureReason)) 1522 scene.GetFormatsOffered(), ctx, out failureReason))
1537 { 1523 {
1538 // remember the fail 1524 // remember the fail
1539 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID); 1525 m_bannedRegionCache.Add(neighbourRegion.RegionHandle, agentID);
@@ -1571,13 +1557,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1571 uint x; 1557 uint x;
1572 uint y; 1558 uint y;
1573 Vector3 newpos; 1559 Vector3 newpos;
1574 string version; 1560 EntityTransferContext ctx = new EntityTransferContext();
1575 string failureReason; 1561 string failureReason;
1576 1562
1577 Vector3 pos = agent.AbsolutePosition + agent.Velocity; 1563 Vector3 pos = agent.AbsolutePosition + agent.Velocity;
1578 1564
1579 GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, pos, 1565 GridRegion neighbourRegion = GetDestination(agent.Scene, agent.UUID, pos,
1580 out version, out newpos, out failureReason); 1566 ctx, out newpos, out failureReason);
1581 if (neighbourRegion == null) 1567 if (neighbourRegion == null)
1582 { 1568 {
1583 if (failureReason != String.Empty) 1569 if (failureReason != String.Empty)
@@ -1680,7 +1666,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1680 /// </summary> 1666 /// </summary>
1681 public ScenePresence CrossAgentToNewRegionAsync( 1667 public ScenePresence CrossAgentToNewRegionAsync(
1682 ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, 1668 ScenePresence agent, Vector3 pos, GridRegion neighbourRegion,
1683 bool isFlying, string version) 1669 bool isFlying, EntityTransferContext ctx)
1684 { 1670 {
1685 try 1671 try
1686 { 1672 {
@@ -1699,7 +1685,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1699 m_entityTransferStateMachine.ResetFromTransit(agent.UUID); 1685 m_entityTransferStateMachine.ResetFromTransit(agent.UUID);
1700 } 1686 }
1701 1687
1702 CrossAgentToNewRegionPost(agent, pos, neighbourRegion, isFlying, version); 1688 CrossAgentToNewRegionPost(agent, pos, neighbourRegion, isFlying, ctx);
1703 } 1689 }
1704 catch (Exception e) 1690 catch (Exception e)
1705 { 1691 {
@@ -1765,7 +1751,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1765 } 1751 }
1766 1752
1767 public void CrossAgentToNewRegionPost(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, 1753 public void CrossAgentToNewRegionPost(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion,
1768 bool isFlying, string version) 1754 bool isFlying, EntityTransferContext ctx)
1769 { 1755 {
1770 1756
1771 string agentcaps; 1757 string agentcaps;
@@ -1827,6 +1813,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1827 1813
1828 agent.CloseChildAgents(false, neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY); 1814 agent.CloseChildAgents(false, neighbourRegion.RegionHandle, neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
1829 1815
1816 // TODO: Check since what version this wasn't needed anymore. May be as old as 0.6
1817/*
1818 // Backwards compatibility. Best effort
1819 if (version == 0f)
1820 {
1821 m_log.DebugFormat("[ENTITY TRANSFER MODULE]: neighbor with old version, passing attachments one by one...");
1822 Thread.Sleep(3000); // wait a little now that we're not waiting for the callback
1823 CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true);
1824 }
1825*/
1830 1826
1831 // the user may change their profile information in other region, 1827 // the user may change their profile information in other region,
1832 // so the userinfo in UserProfileCache is not reliable any more, delete it 1828 // so the userinfo in UserProfileCache is not reliable any more, delete it
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
index de0ae4c..6cb15f6 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
@@ -46,11 +46,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 /// <summary> 48 /// <summary>
49 /// Version of this service.
50 /// </summary>
51 public string ServiceVersion { get; set; }
52
53 /// <summary>
54 /// Map region ID to scene. 49 /// Map region ID to scene.
55 /// </summary> 50 /// </summary>
56 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); 51 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
@@ -81,8 +76,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
81 76
82 public void InitialiseService(IConfigSource configSource) 77 public void InitialiseService(IConfigSource configSource)
83 { 78 {
84 ServiceVersion = String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersion);
85 m_log.InfoFormat("[LOCAL SIMULATION CONNECTOR]: Initialized with connector protocol version {0}", ServiceVersion);
86 } 79 }
87 80
88 public void PostInitialise() 81 public void PostInitialise()
@@ -251,11 +244,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
251 return true; 244 return true;
252 } 245 }
253 246
254 247 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason)
255 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string theirversion, List<UUID> features, out string version, out string reason)
256 { 248 {
257 reason = "Communications failure"; 249 reason = "Communications failure";
258 version = ServiceVersion;
259 if (destination == null) 250 if (destination == null)
260 return false; 251 return false;
261 252
@@ -264,19 +255,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
264// m_log.DebugFormat( 255// m_log.DebugFormat(
265// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate", 256// "[LOCAL SIMULATION CONNECTOR]: Found region {0} {1} to send AgentUpdate",
266// s.RegionInfo.RegionName, destination.RegionHandle); 257// s.RegionInfo.RegionName, destination.RegionHandle);
267 uint size = m_scenes[destination.RegionID].RegionInfo.RegionSizeX; 258 uint sizeX = m_scenes[destination.RegionID].RegionInfo.RegionSizeX;
268 259 uint sizeY = m_scenes[destination.RegionID].RegionInfo.RegionSizeY;
269 float theirVersionNumber = 0f;
270 string[] versionComponents = theirversion.Split(new char[] { '/' });
271 if (versionComponents.Length >= 2)
272 float.TryParse(versionComponents[1], out theirVersionNumber);
273 260
274 // Var regions here, and the requesting simulator is in an older version. 261 // Var regions here, and the requesting simulator is in an older version.
275 // We will forbide this, because it crashes the viewers 262 // We will forbide this, because it crashes the viewers
276 if (theirVersionNumber < 0.3f && size > 256) 263 if (ctx.OutboundVersion < 0.3f && (sizeX != 256 || sizeY != 256))
277 { 264 {
278 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading."; 265 reason = "Destination is a variable-sized region, and source is an old simulator. Consider upgrading.";
279 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from {0} simulator was denied", theirVersionNumber); 266 m_log.DebugFormat("[LOCAL SIMULATION CONNECTOR]: Request to access this variable-sized region from older simulator was denied");
280 return false; 267 return false;
281 268
282 } 269 }
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index c1daae9..cf19edd 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -205,22 +205,20 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
205 return m_remoteConnector.UpdateAgent(destination, cAgentData); 205 return m_remoteConnector.UpdateAgent(destination, cAgentData);
206 } 206 }
207 207
208 208 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, List<UUID> features, EntityTransferContext ctx, out string reason)
209 public bool QueryAccess(GridRegion destination, UUID agentID, string agentHomeURI, bool viaTeleport, Vector3 position, string sversion, List<UUID> features, out string version, out string reason)
210 { 209 {
211 reason = "Communications failure"; 210 reason = "Communications failure";
212 version = "Unknown";
213 211
214 if (destination == null) 212 if (destination == null)
215 return false; 213 return false;
216 214
217 // Try local first 215 // Try local first
218 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason)) 216 if (m_localBackend.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason))
219 return true; 217 return true;
220 218
221 // else do the remote thing 219 // else do the remote thing
222 if (!m_localBackend.IsLocalRegion(destination.RegionID)) 220 if (!m_localBackend.IsLocalRegion(destination.RegionID))
223 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, sversion, features, out version, out reason); 221 return m_remoteConnector.QueryAccess(destination, agentID, agentHomeURI, viaTeleport, position, features, ctx, out reason);
224 222
225 return false; 223 return false;
226 } 224 }
diff --git a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
index 8d192ba..b9bcb8b 100644
--- a/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Region/RegionCommandsModule.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands
100 100
101 m_console.Commands.AddCommand( 101 m_console.Commands.AddCommand(
102 "Regions", false, "region set", 102 "Regions", false, "region set",
103 "region get", 103 "region set",
104 "Set control information for the currently selected region.", 104 "Set control information for the currently selected region.",
105 "Currently, the following parameters can be set:\n" 105 "Currently, the following parameters can be set:\n"
106 + "agent-limit <int> - Current root agent limit. This is persisted over restart.\n" 106 + "agent-limit <int> - Current root agent limit. This is persisted over restart.\n"
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index 61d199f..d172780 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, string version); 38 public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, EntityTransferContext ctx);
39 public delegate ScenePresence CrossAsyncDelegate(ScenePresence agent, bool isFlying); 39 public delegate ScenePresence CrossAsyncDelegate(ScenePresence agent, bool isFlying);
40 40
41 public interface IEntityTransferModule 41 public interface IEntityTransferModule
@@ -93,13 +93,14 @@ namespace OpenSim.Region.Framework.Interfaces
93 93
94 void EnableChildAgent(ScenePresence agent, GridRegion region); 94 void EnableChildAgent(ScenePresence agent, GridRegion region);
95 95
96 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out string version, out Vector3 newpos); 96 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, EntityTransferContext ctx,
97 GridRegion GetObjectDestination(SceneObjectGroup grp, Vector3 targetPosition, out Vector3 newpos); 97 out Vector3 newpos, out string reason);
98 bool checkAgentAccessToRegion(ScenePresence agent, GridRegion destiny, Vector3 position, out string version, out string reason); 98 GridRegion GetObjectDestination(SceneObjectGroup grp, Vector3 targetPosition, out Vector3 newpos);
99// void Cross(SceneObjectGroup sog, Vector3 position, bool silent); 99 bool checkAgentAccessToRegion(ScenePresence agent, GridRegion destiny, Vector3 position, EntityTransferContext ctx, out string reason);
100
100 bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent, bool removeScripts); 101 bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent, bool removeScripts);
101 102
102 ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version); 103 ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, EntityTransferContext ctx);
103 104
104 bool HandleIncomingSceneObject(SceneObjectGroup so, Vector3 newPosition); 105 bool HandleIncomingSceneObject(SceneObjectGroup so, Vector3 newPosition);
105 } 106 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index c97c838..e780f86 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -42,6 +42,7 @@ using OpenSim.Region.Framework.Interfaces;
42using OpenSim.Region.PhysicsModules.SharedBase; 42using OpenSim.Region.PhysicsModules.SharedBase;
43using OpenSim.Region.Framework.Scenes.Serialization; 43using OpenSim.Region.Framework.Scenes.Serialization;
44using PermissionMask = OpenSim.Framework.PermissionMask; 44using PermissionMask = OpenSim.Framework.PermissionMask;
45using OpenSim.Services.Interfaces;
45 46
46namespace OpenSim.Region.Framework.Scenes 47namespace OpenSim.Region.Framework.Scenes
47{ 48{
@@ -534,7 +535,8 @@ namespace OpenSim.Region.Framework.Scenes
534 /// <returns></returns> 535 /// <returns></returns>
535 public bool IsAttachmentCheckFull() 536 public bool IsAttachmentCheckFull()
536 { 537 {
537 return (IsAttachment || (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0)); 538 return (IsAttachment ||
539 (m_rootPart.Shape.PCode == (byte)PCodeEnum.Primitive && m_rootPart.Shape.State != 0));
538 } 540 }
539 541
540 private struct avtocrossInfo 542 private struct avtocrossInfo
@@ -679,7 +681,7 @@ namespace OpenSim.Region.Framework.Scenes
679 } 681 }
680 682
681 string reason = String.Empty; 683 string reason = String.Empty;
682 string version = String.Empty; 684 EntityTransferContext ctx = new EntityTransferContext();
683 685
684 foreach (ScenePresence av in sog.m_sittingAvatars) 686 foreach (ScenePresence av in sog.m_sittingAvatars)
685 { 687 {
@@ -691,7 +693,7 @@ namespace OpenSim.Region.Framework.Scenes
691 693
692 // We set the avatar position as being the object 694 // We set the avatar position as being the object
693 // position to get the region to send to 695 // position to get the region to send to
694 if(!entityTransfer.checkAgentAccessToRegion(av, destination, newpos, out version, out reason)) 696 if(!entityTransfer.checkAgentAccessToRegion(av, destination, newpos, ctx, out reason))
695 { 697 {
696 return sog; 698 return sog;
697 } 699 }
@@ -731,7 +733,7 @@ namespace OpenSim.Region.Framework.Scenes
731 733
732// CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync; 734// CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync;
733// d.BeginInvoke(av, val, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d); 735// d.BeginInvoke(av, val, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d);
734 entityTransfer.CrossAgentToNewRegionAsync(av, newpos, destination, av.Flying, version); 736 entityTransfer.CrossAgentToNewRegionAsync(av, newpos, destination, av.Flying, ctx);
735 if (av.IsChildAgent) 737 if (av.IsChildAgent)
736 { 738 {
737 // avatar crossed do some extra cleanup 739 // avatar crossed do some extra cleanup
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 65511bc..52f9b51 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2121,8 +2121,9 @@ namespace OpenSim.Region.Framework.Scenes
2121 } 2121 }
2122 else 2122 else
2123 { 2123 {
2124 if ((!isPhantom || isPhysical || _VolumeDetectActive) && !ParentGroup.IsAttachment 2124 if ((!isPhantom || isPhysical || _VolumeDetectActive)
2125 && !(Shape.PathCurve == (byte)Extrusion.Flexible)) 2125 && !ParentGroup.IsAttachmentCheckFull()
2126 && !(Shape.PathCurve == (byte)Extrusion.Flexible))
2126 { 2127 {
2127 AddToPhysics(isPhysical, isPhantom, building, isPhysical); 2128 AddToPhysics(isPhysical, isPhantom, building, isPhysical);
2128 UpdatePhysicsSubscribedEvents(); // not sure if appliable here 2129 UpdatePhysicsSubscribedEvents(); // not sure if appliable here
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
index 226ed6e..b8f7458 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs
@@ -105,6 +105,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
105// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt)); 105// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt));
106 } 106 }
107 107
108/*
108 [Test] 109 [Test]
109 public void TestSameSimulatorIsolatedRegionsV1() 110 public void TestSameSimulatorIsolatedRegionsV1()
110 { 111 {
@@ -136,7 +137,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
136 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm); 137 SceneHelpers.SetupSceneModules(new Scene[] { sceneA, sceneB }, config, lscm);
137 138
138 // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour 139 // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
139 lscm.ServiceVersion = "SIMULATION/0.1"; 140 lscm.ServiceVersion = 0.1f;
140 141
141 Vector3 teleportPosition = new Vector3(10, 11, 12); 142 Vector3 teleportPosition = new Vector3(10, 11, 12);
142 Vector3 teleportLookAt = new Vector3(20, 21, 22); 143 Vector3 teleportLookAt = new Vector3(20, 21, 22);
@@ -178,6 +179,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
178 // position instead). 179 // position instead).
179// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt)); 180// Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt));
180 } 181 }
182*/
181 183
182 [Test] 184 [Test]
183 public void TestSameSimulatorIsolatedRegionsV2() 185 public void TestSameSimulatorIsolatedRegionsV2()
@@ -488,6 +490,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
488// TestHelpers.DisableLogging(); 490// TestHelpers.DisableLogging();
489 } 491 }
490 492
493/*
491 [Test] 494 [Test]
492 public void TestSameSimulatorNeighbouringRegionsV1() 495 public void TestSameSimulatorNeighbouringRegionsV1()
493 { 496 {
@@ -519,7 +522,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
519 SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB); 522 SceneHelpers.SetupSceneModules(sceneB, config, new CapabilitiesModule(), etmB);
520 523
521 // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour 524 // FIXME: Hack - this is here temporarily to revert back to older entity transfer behaviour
522 lscm.ServiceVersion = "SIMULATION/0.1"; 525 lscm.ServiceVersion = 0.1f;
523 526
524 Vector3 teleportPosition = new Vector3(10, 11, 12); 527 Vector3 teleportPosition = new Vector3(10, 11, 12);
525 Vector3 teleportLookAt = new Vector3(20, 21, 22); 528 Vector3 teleportLookAt = new Vector3(20, 21, 22);
@@ -573,6 +576,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
573 576
574// TestHelpers.DisableLogging(); 577// TestHelpers.DisableLogging();
575 } 578 }
579*/
576 580
577 [Test] 581 [Test]
578 public void TestSameSimulatorNeighbouringRegionsV2() 582 public void TestSameSimulatorNeighbouringRegionsV2()
diff --git a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
index c244f95..b9cd6f5 100644
--- a/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/PhysicsModules/ConvexDecompositionDotNet/Properties/AssemblyInfo.cs
@@ -33,3 +33,4 @@ using System.Runtime.InteropServices;
33// by using the '*' as shown below: 33// by using the '*' as shown below:
34// [assembly: AssemblyVersion("1.0.*")] 34// [assembly: AssemblyVersion("1.0.*")]
35[assembly: AssemblyVersion("0.8.3.*")] 35[assembly: AssemblyVersion("0.8.3.*")]
36
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
index 743a6f6..6199387 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODERayCastRequestManager.cs
@@ -172,7 +172,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
172 /// <param name="req"></param> 172 /// <param name="req"></param>
173 private void RayCast(ODERayCastRequest req) 173 private void RayCast(ODERayCastRequest req)
174 { 174 {
175 // NOTE: limit ray lenght or collisions will take all avaiable stack space 175 // NOTE: limit ray length or collisions will take all avaiable stack space
176 // this value may still be too large, depending on machine configuration 176 // this value may still be too large, depending on machine configuration
177 // of maximum stack 177 // of maximum stack
178 float len = req.length; 178 float len = req.length;