diff options
author | Melanie | 2012-01-02 21:41:36 +0000 |
---|---|---|
committer | Melanie | 2012-01-02 21:41:36 +0000 |
commit | a6e305063e9045194cd8348f73f3b75d07f3883e (patch) | |
tree | c3287856ea47817715da89c737e3ccfe4d4c9f5d /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Reduce accessibility of some J2KImage/LLImageManager properties and methods t... (diff) | |
download | opensim-SC-a6e305063e9045194cd8348f73f3b75d07f3883e.zip opensim-SC-a6e305063e9045194cd8348f73f3b75d07f3883e.tar.gz opensim-SC-a6e305063e9045194cd8348f73f3b75d07f3883e.tar.bz2 opensim-SC-a6e305063e9045194cd8348f73f3b75d07f3883e.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
OpenSim/Region/Framework/Scenes/Scene.cs
OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs
OpenSim/Services/Interfaces/IUserAccountService.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index b828f39..26f915b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -737,7 +737,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
737 | if (maptileRefresh != 0) | 737 | if (maptileRefresh != 0) |
738 | { | 738 | { |
739 | m_mapGenerationTimer.Interval = maptileRefresh * 1000; | 739 | m_mapGenerationTimer.Interval = maptileRefresh * 1000; |
740 | m_mapGenerationTimer.Elapsed += RegenerateMaptile; | 740 | m_mapGenerationTimer.Elapsed += RegenerateMaptileAndReregister; |
741 | m_mapGenerationTimer.AutoReset = true; | 741 | m_mapGenerationTimer.AutoReset = true; |
742 | m_mapGenerationTimer.Start(); | 742 | m_mapGenerationTimer.Start(); |
743 | } | 743 | } |
@@ -1697,21 +1697,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
1697 | { | 1697 | { |
1698 | m_sceneGridService.SetScene(this); | 1698 | m_sceneGridService.SetScene(this); |
1699 | 1699 | ||
1700 | //// Unfortunately this needs to be here and it can't be async. | ||
1701 | //// The map tile image is stored in RegionSettings, but it also needs to be | ||
1702 | //// stored in the GridService, because that's what the world map module uses | ||
1703 | //// to send the map image UUIDs (of other regions) to the viewer... | ||
1704 | if (m_generateMaptiles) | ||
1705 | RegenerateMaptile(); | ||
1706 | |||
1700 | GridRegion region = new GridRegion(RegionInfo); | 1707 | GridRegion region = new GridRegion(RegionInfo); |
1701 | string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); | 1708 | string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); |
1702 | if (error != String.Empty) | 1709 | if (error != String.Empty) |
1703 | { | ||
1704 | throw new Exception(error); | 1710 | throw new Exception(error); |
1705 | } | ||
1706 | |||
1707 | // Generate the maptile asynchronously, because sometimes it can be very slow and we | ||
1708 | // don't want this to delay starting the region. | ||
1709 | if (m_generateMaptiles) | ||
1710 | { | ||
1711 | Util.FireAndForget(delegate { | ||
1712 | RegenerateMaptile(null, null); | ||
1713 | }); | ||
1714 | } | ||
1715 | } | 1711 | } |
1716 | 1712 | ||
1717 | #endregion | 1713 | #endregion |
@@ -5251,7 +5247,7 @@ Environment.Exit(1); | |||
5251 | /// </summary> | 5247 | /// </summary> |
5252 | /// <param name="sender"></param> | 5248 | /// <param name="sender"></param> |
5253 | /// <param name="e"></param> | 5249 | /// <param name="e"></param> |
5254 | public void RegenerateMaptile(object sender, ElapsedEventArgs e) | 5250 | private void RegenerateMaptile() |
5255 | { | 5251 | { |
5256 | IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>(); | 5252 | IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>(); |
5257 | if (mapModule != null) | 5253 | if (mapModule != null) |
@@ -5306,6 +5302,17 @@ Environment.Exit(1); | |||
5306 | } | 5302 | } |
5307 | } | 5303 | } |
5308 | 5304 | ||
5305 | private void RegenerateMaptileAndReregister(object sender, ElapsedEventArgs e) | ||
5306 | { | ||
5307 | RegenerateMaptile(); | ||
5308 | |||
5309 | // We need to propagate the new image UUID to the grid service | ||
5310 | // so that all simulators can retrieve it | ||
5311 | string error = GridService.RegisterRegion(RegionInfo.ScopeID, new GridRegion(RegionInfo)); | ||
5312 | if (error != string.Empty) | ||
5313 | throw new Exception(error); | ||
5314 | } | ||
5315 | |||
5309 | // This method is called across the simulation connector to | 5316 | // This method is called across the simulation connector to |
5310 | // determine if a given agent is allowed in this region | 5317 | // determine if a given agent is allowed in this region |
5311 | // AS A ROOT AGENT. Returning false here will prevent them | 5318 | // AS A ROOT AGENT. Returning false here will prevent them |