aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2010-05-10 04:05:04 +0100
committerMelanie2010-05-10 04:05:04 +0100
commitfada4cb6c483c34a286792a92eeab1bd289dd76c (patch)
tree55d97abbdee19360d3fc8a0546e4315d4a0f096d /OpenSim/Region
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentReturn agents when angle is PI (diff)
downloadopensim-SC-fada4cb6c483c34a286792a92eeab1bd289dd76c.zip
opensim-SC-fada4cb6c483c34a286792a92eeab1bd289dd76c.tar.gz
opensim-SC-fada4cb6c483c34a286792a92eeab1bd289dd76c.tar.bz2
opensim-SC-fada4cb6c483c34a286792a92eeab1bd289dd76c.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs31
-rw-r--r--OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs1
8 files changed, 29 insertions, 24 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index ba2c2de..f053911 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -365,7 +365,7 @@ namespace OpenSim
365 365
366 // moved these here as the terrain texture has to be created after the modules are initialized 366 // moved these here as the terrain texture has to be created after the modules are initialized
367 // and has to happen before the region is registered with the grid. 367 // and has to happen before the region is registered with the grid.
368 scene.CreateTerrainTexture(false); 368 scene.CreateTerrainTexture();
369 369
370 // TODO : Try setting resource for region xstats here on scene 370 // TODO : Try setting resource for region xstats here on scene
371 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); 371 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index 53d2cef..f8e3d59 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -121,6 +121,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
121 UUID textureID; 121 UUID textureID;
122 if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID)) 122 if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID))
123 { 123 {
124 //m_log.DebugFormat("[GETTEXTURE]: {0}", textureID);
124 AssetBase texture; 125 AssetBase texture;
125 126
126 if (!String.IsNullOrEmpty(REDIRECT_URL)) 127 if (!String.IsNullOrEmpty(REDIRECT_URL))
@@ -167,6 +168,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
167 private void SendTexture(OSHttpRequest request, OSHttpResponse response, AssetBase texture) 168 private void SendTexture(OSHttpRequest request, OSHttpResponse response, AssetBase texture)
168 { 169 {
169 string range = request.Headers.GetOne("Range"); 170 string range = request.Headers.GetOne("Range");
171 //m_log.DebugFormat("[GETTEXTURE]: Range {0}", range);
170 if (!String.IsNullOrEmpty(range)) 172 if (!String.IsNullOrEmpty(range))
171 { 173 {
172 // Range request 174 // Range request
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
index d44ddf4..46741a5 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs
@@ -197,7 +197,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
197 if (grinfo != null) 197 if (grinfo != null)
198 { 198 {
199 //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionsByName {0} found {1} regions", name, grinfo.Count); 199 //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionsByName {0} found {1} regions", name, grinfo.Count);
200 rinfo.AddRange(grinfo); 200 foreach (GridRegion r in grinfo)
201 if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null)
202 rinfo.Add(r);
201 } 203 }
202 204
203 return rinfo; 205 return rinfo;
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 2b0e83f..ac6a633 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1000,7 +1000,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1000 return responsemap; 1000 return responsemap;
1001 } 1001 }
1002 1002
1003 public void LazySaveGeneratedMaptile(byte[] data, bool temporary) 1003 public void RegenerateMaptile(byte[] data)
1004 { 1004 {
1005 // Overwrites the local Asset cache with new maptile data 1005 // Overwrites the local Asset cache with new maptile data
1006 // Assets are single write, this causes the asset server to ignore this update, 1006 // Assets are single write, this causes the asset server to ignore this update,
@@ -1010,7 +1010,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1010 // map tile while protecting the (grid) asset database from bloat caused by a new asset each 1010 // map tile while protecting the (grid) asset database from bloat caused by a new asset each
1011 // time a mapimage is generated! 1011 // time a mapimage is generated!
1012 1012
1013 UUID lastMapRegionUUID = m_scene.RegionInfo.lastMapUUID; 1013 UUID lastMapRegionUUID = m_scene.RegionInfo.RegionSettings.TerrainImageID;
1014 1014
1015 int lastMapRefresh = 0; 1015 int lastMapRefresh = 0;
1016 int twoDays = 172800; 1016 int twoDays = 172800;
@@ -1030,21 +1030,9 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1030 { 1030 {
1031 } 1031 }
1032 1032
1033 UUID TerrainImageUUID = UUID.Random(); 1033 m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE");
1034 1034
1035 if (lastMapRegionUUID == UUID.Zero || (lastMapRefresh + RefreshSeconds) < Util.UnixTimeSinceEpoch()) 1035 m_scene.RegionInfo.RegionSettings.TerrainImageID = UUID.Random();
1036 {
1037 m_scene.RegionInfo.SaveLastMapUUID(TerrainImageUUID);
1038
1039 m_log.Debug("[MAPTILE]: STORING MAPTILE IMAGE");
1040 }
1041 else
1042 {
1043 TerrainImageUUID = lastMapRegionUUID;
1044 m_log.Debug("[MAPTILE]: REUSING OLD MAPTILE IMAGE ID");
1045 }
1046
1047 m_scene.RegionInfo.RegionSettings.TerrainImageID = TerrainImageUUID;
1048 1036
1049 AssetBase asset = new AssetBase( 1037 AssetBase asset = new AssetBase(
1050 m_scene.RegionInfo.RegionSettings.TerrainImageID, 1038 m_scene.RegionInfo.RegionSettings.TerrainImageID,
@@ -1053,8 +1041,17 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1053 m_scene.RegionInfo.RegionID.ToString()); 1041 m_scene.RegionInfo.RegionID.ToString());
1054 asset.Data = data; 1042 asset.Data = data;
1055 asset.Description = m_scene.RegionInfo.RegionName; 1043 asset.Description = m_scene.RegionInfo.RegionName;
1056 asset.Temporary = temporary; 1044 asset.Temporary = false;
1045 asset.Flags = AssetFlags.Maptile;
1046
1047 // Store the new one
1048 m_log.DebugFormat("[WORLDMAP]: Storing map tile {0}", asset.ID);
1057 m_scene.AssetService.Store(asset); 1049 m_scene.AssetService.Store(asset);
1050 m_scene.RegionInfo.RegionSettings.Save();
1051
1052 // Delete the old one
1053 m_log.DebugFormat("[WORLDMAP]: Deleting old map tile {0}", lastMapRegionUUID);
1054 m_scene.AssetService.Delete(lastMapRegionUUID.ToString());
1058 } 1055 }
1059 1056
1060 private void MakeRootAgent(ScenePresence avatar) 1057 private void MakeRootAgent(ScenePresence avatar)
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs
index de1bcd4..ac6afed 100644
--- a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs
@@ -29,6 +29,6 @@ namespace OpenSim.Region.Framework.Interfaces
29{ 29{
30 public interface IWorldMapModule 30 public interface IWorldMapModule
31 { 31 {
32 void LazySaveGeneratedMaptile(byte[] data, bool temporary); 32 void RegenerateMaptile(byte[] data);
33 } 33 }
34} 34}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 122ed02..e920ff5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1851,7 +1851,7 @@ namespace OpenSim.Region.Framework.Scenes
1851 /// <summary> 1851 /// <summary>
1852 /// Create a terrain texture for this scene 1852 /// Create a terrain texture for this scene
1853 /// </summary> 1853 /// </summary>
1854 public void CreateTerrainTexture(bool temporary) 1854 public void CreateTerrainTexture()
1855 { 1855 {
1856 //create a texture asset of the terrain 1856 //create a texture asset of the terrain
1857 IMapImageGenerator terrain = RequestModuleInterface<IMapImageGenerator>(); 1857 IMapImageGenerator terrain = RequestModuleInterface<IMapImageGenerator>();
@@ -1869,7 +1869,9 @@ namespace OpenSim.Region.Framework.Scenes
1869 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>(); 1869 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>();
1870 1870
1871 if (mapModule != null) 1871 if (mapModule != null)
1872 mapModule.LazySaveGeneratedMaptile(data, temporary); 1872 mapModule.RegenerateMaptile(data);
1873 else
1874 m_log.DebugFormat("[SCENE]: MapModule is null, can't save maptile");
1873 } 1875 }
1874 } 1876 }
1875 1877
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ca0feed..68f6e7b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5824,7 +5824,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5824 public LSL_String llGetLandOwnerAt(LSL_Vector pos) 5824 public LSL_String llGetLandOwnerAt(LSL_Vector pos)
5825 { 5825 {
5826 m_host.AddScriptLPS(1); 5826 m_host.AddScriptLPS(1);
5827 return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.OwnerID.ToString(); 5827 ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
5828 if (land == null)
5829 return UUID.Zero.ToString();
5830 return land.LandData.OwnerID.ToString();
5828 } 5831 }
5829 5832
5830 /// <summary> 5833 /// <summary>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index d354fde..a5b1124 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -485,7 +485,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
485 } 485 }
486 else 486 else
487 { 487 {
488 // If full circle is asked for, just add it
489 sensedEntities.Add(new SensedEntity(dis, presence.UUID)); 488 sensedEntities.Add(new SensedEntity(dis, presence.UUID));
490 } 489 }
491 } 490 }