diff options
author | Kitto Flora | 2010-06-17 13:04:32 -0400 |
---|---|---|
committer | Kitto Flora | 2010-06-17 13:04:32 -0400 |
commit | cea79056025950303e3b784d824d3cb6168152d0 (patch) | |
tree | 0e708850e10f2a6b65cf718264b526ff1a12b9c5 /OpenSim/Region/Framework | |
parent | Add rez on water surface. (diff) | |
parent | Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff) | |
download | opensim-SC-cea79056025950303e3b784d824d3cb6168152d0.zip opensim-SC-cea79056025950303e3b784d824d3cb6168152d0.tar.gz opensim-SC-cea79056025950303e3b784d824d3cb6168152d0.tar.bz2 opensim-SC-cea79056025950303e3b784d824d3cb6168152d0.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 33 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 1 |
3 files changed, 16 insertions, 39 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a88b87f..97de147 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -964,12 +964,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
964 | // Let the grid service module know, so this can be cached | 964 | // Let the grid service module know, so this can be cached |
965 | m_eventManager.TriggerOnRegionUp(otherRegion); | 965 | m_eventManager.TriggerOnRegionUp(otherRegion); |
966 | 966 | ||
967 | RegionInfo regInfo = new RegionInfo(xcell, ycell, otherRegion.InternalEndPoint, otherRegion.ExternalHostName); | ||
968 | regInfo.RegionID = otherRegion.RegionID; | ||
969 | regInfo.RegionName = otherRegion.RegionName; | ||
970 | regInfo.ScopeID = otherRegion.ScopeID; | ||
971 | regInfo.ExternalHostName = otherRegion.ExternalHostName; | ||
972 | GridRegion r = new GridRegion(regInfo); | ||
973 | try | 967 | try |
974 | { | 968 | { |
975 | ForEachScenePresence(delegate(ScenePresence agent) | 969 | ForEachScenePresence(delegate(ScenePresence agent) |
@@ -984,7 +978,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
984 | old.Add(otherRegion.RegionHandle); | 978 | old.Add(otherRegion.RegionHandle); |
985 | agent.DropOldNeighbours(old); | 979 | agent.DropOldNeighbours(old); |
986 | if (m_teleportModule != null) | 980 | if (m_teleportModule != null) |
987 | m_teleportModule.EnableChildAgent(agent, r); | 981 | m_teleportModule.EnableChildAgent(agent, otherRegion); |
988 | } | 982 | } |
989 | } | 983 | } |
990 | ); | 984 | ); |
@@ -1368,6 +1362,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1368 | m_regInfo.EstateSettings.EstateOwner = account.PrincipalID; | 1362 | m_regInfo.EstateSettings.EstateOwner = account.PrincipalID; |
1369 | m_regInfo.EstateSettings.Save(); | 1363 | m_regInfo.EstateSettings.Save(); |
1370 | } | 1364 | } |
1365 | else | ||
1366 | m_log.ErrorFormat("[SCENE]: Unable to store account. If this simulator is connected to a grid,\n you must create the estate owner account first."); | ||
1371 | } | 1367 | } |
1372 | else | 1368 | else |
1373 | { | 1369 | { |
@@ -1546,6 +1542,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1546 | { | 1542 | { |
1547 | m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); | 1543 | m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName); |
1548 | LoginsDisabled = false; | 1544 | LoginsDisabled = false; |
1545 | m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); | ||
1549 | } | 1546 | } |
1550 | } | 1547 | } |
1551 | } | 1548 | } |
@@ -1830,6 +1827,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1830 | { | 1827 | { |
1831 | RegisterCommsEvents(); | 1828 | RegisterCommsEvents(); |
1832 | 1829 | ||
1830 | m_sceneGridService.SetScene(this); | ||
1831 | |||
1833 | // These two 'commands' *must be* next to each other or sim rebooting fails. | 1832 | // These two 'commands' *must be* next to each other or sim rebooting fails. |
1834 | //m_sceneGridService.RegisterRegion(m_interregionCommsOut, RegionInfo); | 1833 | //m_sceneGridService.RegisterRegion(m_interregionCommsOut, RegionInfo); |
1835 | 1834 | ||
@@ -1840,24 +1839,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1840 | throw new Exception(error); | 1839 | throw new Exception(error); |
1841 | } | 1840 | } |
1842 | 1841 | ||
1843 | m_sceneGridService.SetScene(this); | ||
1844 | m_sceneGridService.InformNeighborsThatRegionisUp(RequestModuleInterface<INeighbourService>(), RegionInfo); | ||
1845 | |||
1846 | //Dictionary<string, string> dGridSettings = m_sceneGridService.GetGridSettings(); | ||
1847 | |||
1848 | //if (dGridSettings.ContainsKey("allow_forceful_banlines")) | ||
1849 | //{ | ||
1850 | // if (dGridSettings["allow_forceful_banlines"] != "TRUE") | ||
1851 | // { | ||
1852 | // m_log.Info("[GRID]: Grid is disabling forceful parcel banlists"); | ||
1853 | // EventManager.TriggerSetAllowForcefulBan(false); | ||
1854 | // } | ||
1855 | // else | ||
1856 | // { | ||
1857 | // m_log.Info("[GRID]: Grid is allowing forceful parcel banlists"); | ||
1858 | // EventManager.TriggerSetAllowForcefulBan(true); | ||
1859 | // } | ||
1860 | //} | ||
1861 | } | 1842 | } |
1862 | 1843 | ||
1863 | /// <summary> | 1844 | /// <summary> |
@@ -3944,6 +3925,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3944 | m_log.DebugFormat( | 3925 | m_log.DebugFormat( |
3945 | "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); | 3926 | "[SCENE]: Incoming child agent update for {0} in {1}", cAgentData.AgentID, RegionInfo.RegionName); |
3946 | 3927 | ||
3928 | // XPTO: if this agent is not allowed here as root, always return false | ||
3929 | |||
3947 | // We have to wait until the viewer contacts this region after receiving EAC. | 3930 | // We have to wait until the viewer contacts this region after receiving EAC. |
3948 | // That calls AddNewClient, which finally creates the ScenePresence | 3931 | // That calls AddNewClient, which finally creates the ScenePresence |
3949 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); | 3932 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 6309cd9..a9ecde8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -182,24 +182,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
182 | { | 182 | { |
183 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); | 183 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); |
184 | 184 | ||
185 | for (int x = (int)region.RegionLocX - 1; x <= region.RegionLocX + 1; x++) | 185 | List<GridRegion> neighbours = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID); |
186 | m_log.DebugFormat("[INTERGRID]: Informing {0} neighbours that this region is up", neighbours.Count); | ||
187 | foreach (GridRegion n in neighbours) | ||
186 | { | 188 | { |
187 | for (int y = (int)region.RegionLocY - 1; y <= region.RegionLocY + 1; y++) | 189 | InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync; |
188 | { | 190 | d.BeginInvoke(neighbourService, region, n.RegionHandle, |
189 | if (!((x == region.RegionLocX) && (y == region.RegionLocY))) // skip this region | 191 | InformNeighborsThatRegionisUpCompleted, |
190 | { | 192 | d); |
191 | ulong handle = Utils.UIntsToLong((uint)x * Constants.RegionSize, (uint)y * Constants.RegionSize); | ||
192 | InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync; | ||
193 | |||
194 | d.BeginInvoke(neighbourService, region, handle, | ||
195 | InformNeighborsThatRegionisUpCompleted, | ||
196 | d); | ||
197 | } | ||
198 | } | ||
199 | } | 193 | } |
200 | } | 194 | } |
201 | 195 | ||
202 | |||
203 | public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, ulong regionHandle); | 196 | public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, ulong regionHandle); |
204 | 197 | ||
205 | /// <summary> | 198 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6d2cd88..d4fc6cd 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3390,6 +3390,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
3390 | { | 3390 | { |
3391 | if (cAgent.Attachments != null) | 3391 | if (cAgent.Attachments != null) |
3392 | { | 3392 | { |
3393 | m_appearance.ClearAttachments(); | ||
3393 | foreach (AttachmentData att in cAgent.Attachments) | 3394 | foreach (AttachmentData att in cAgent.Attachments) |
3394 | { | 3395 | { |
3395 | m_appearance.SetAttachment(att.AttachPoint, att.ItemID, att.AssetID); | 3396 | m_appearance.SetAttachment(att.AttachPoint, att.ItemID, att.AssetID); |