Bug fix in map tiles in standalone: the map has been blank since commit 01ae916bad
r/17324 (Nov.18, justincc). But the root cause comes from commit 02e54c57c4
Author: Oren Hurvitz Date: 7/22/2011
This is a nasty situation. The map tile UUID is, in principle, stored authoritatively in RegionSettings. However, it also needs to be stored in the Grid Service because that's how other sims can retrieve it to send it in Map Blocks to non-V3 viewers. So every time the tile image changes, that change needs to propagate to the Grid Service, and this is done via RegisterRegion (ugh!). Interestingly, this problem didn't affect grids because by default AllowRemoteDelete is false, so the prior images aren't being deleted from the asset servers -- but they were not being correctly updated in the map either, the map was stuck with old images.iar_mods
parent
5d8ed077bc
commit
56dbcae402
|
@ -710,7 +710,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (maptileRefresh != 0)
|
||||
{
|
||||
m_mapGenerationTimer.Interval = maptileRefresh * 1000;
|
||||
m_mapGenerationTimer.Elapsed += RegenerateMaptile;
|
||||
m_mapGenerationTimer.Elapsed += RegenerateMaptileAndReregister;
|
||||
m_mapGenerationTimer.AutoReset = true;
|
||||
m_mapGenerationTimer.Start();
|
||||
}
|
||||
|
@ -1647,23 +1647,19 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
m_sceneGridService.SetScene(this);
|
||||
|
||||
//// Unfortunately this needs to be here and it can't be async.
|
||||
//// The map tile image is stored in RegionSettings, but it also needs to be
|
||||
//// stored in the GridService, because that's what the world map module uses
|
||||
//// to send the map image UUIDs (of other regions) to the viewer...
|
||||
if (m_generateMaptiles)
|
||||
RegenerateMaptile();
|
||||
|
||||
GridRegion region = new GridRegion(RegionInfo);
|
||||
string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
|
||||
if (error != String.Empty)
|
||||
{
|
||||
throw new Exception(error);
|
||||
}
|
||||
|
||||
// Generate the maptile asynchronously, because sometimes it can be very slow and we
|
||||
// don't want this to delay starting the region.
|
||||
if (m_generateMaptiles)
|
||||
{
|
||||
Util.FireAndForget(delegate {
|
||||
RegenerateMaptile(null, null);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Load Land
|
||||
|
@ -5032,13 +5028,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
public void RegenerateMaptile(object sender, ElapsedEventArgs e)
|
||||
private void RegenerateMaptile()
|
||||
{
|
||||
IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>();
|
||||
if (mapModule != null)
|
||||
mapModule.GenerateMaptile();
|
||||
}
|
||||
|
||||
private void RegenerateMaptileAndReregister(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
RegenerateMaptile();
|
||||
|
||||
// We need to propagate the new image UUID to the grid service
|
||||
// so that all simulators can retrieve it
|
||||
string error = GridService.RegisterRegion(RegionInfo.ScopeID, new GridRegion(RegionInfo));
|
||||
if (error != string.Empty)
|
||||
throw new Exception(error);
|
||||
}
|
||||
|
||||
// This method is called across the simulation connector to
|
||||
// determine if a given agent is allowed in this region
|
||||
// AS A ROOT AGENT. Returning false here will prevent them
|
||||
|
|
Loading…
Reference in New Issue