diff options
author | Melanie | 2010-05-10 04:05:04 +0100 |
---|---|---|
committer | Melanie | 2010-05-10 04:05:04 +0100 |
commit | fada4cb6c483c34a286792a92eeab1bd289dd76c (patch) | |
tree | 55d97abbdee19360d3fc8a0546e4315d4a0f096d /OpenSim | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | Return agents when angle is PI (diff) | |
download | opensim-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 'OpenSim')
19 files changed, 78 insertions, 40 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 35eed56..13f5fa2 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -111,7 +111,7 @@ namespace OpenSim.Data.MySQL | |||
111 | dbcon.Open(); | 111 | dbcon.Open(); |
112 | 112 | ||
113 | using (MySqlCommand cmd = new MySqlCommand( | 113 | using (MySqlCommand cmd = new MySqlCommand( |
114 | "SELECT name, description, assetType, local, temporary, data FROM assets WHERE id=?id", | 114 | "SELECT name, description, assetType, local, temporary, asset_flags, data FROM assets WHERE id=?id", |
115 | dbcon)) | 115 | dbcon)) |
116 | { | 116 | { |
117 | cmd.Parameters.AddWithValue("?id", assetID.ToString()); | 117 | cmd.Parameters.AddWithValue("?id", assetID.ToString()); |
@@ -133,6 +133,7 @@ namespace OpenSim.Data.MySQL | |||
133 | asset.Local = false; | 133 | asset.Local = false; |
134 | 134 | ||
135 | asset.Temporary = Convert.ToBoolean(dbReader["temporary"]); | 135 | asset.Temporary = Convert.ToBoolean(dbReader["temporary"]); |
136 | asset.Flags = (AssetFlags)Convert.ToInt32(dbReader["asset_flags"]); | ||
136 | } | 137 | } |
137 | } | 138 | } |
138 | } | 139 | } |
@@ -345,7 +346,7 @@ namespace OpenSim.Data.MySQL | |||
345 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 346 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
346 | { | 347 | { |
347 | dbcon.Open(); | 348 | dbcon.Open(); |
348 | MySqlCommand cmd = new MySqlCommand("delete from assets where id=?id"); | 349 | MySqlCommand cmd = new MySqlCommand("delete from assets where id=?id", dbcon); |
349 | cmd.Parameters.AddWithValue("?id", id); | 350 | cmd.Parameters.AddWithValue("?id", id); |
350 | cmd.ExecuteNonQuery(); | 351 | cmd.ExecuteNonQuery(); |
351 | 352 | ||
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index a395ddc..07371e7 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs | |||
@@ -975,7 +975,7 @@ namespace OpenSim.Data.MySQL | |||
975 | "use_estate_sun, fixed_sun, sun_position, " + | 975 | "use_estate_sun, fixed_sun, sun_position, " + |
976 | "covenant, Sandbox, sunvectorx, sunvectory, " + | 976 | "covenant, Sandbox, sunvectorx, sunvectory, " + |
977 | "sunvectorz, loaded_creation_datetime, " + | 977 | "sunvectorz, loaded_creation_datetime, " + |
978 | "loaded_creation_id) values (?RegionUUID, ?BlockTerraform, " + | 978 | "loaded_creation_id, map_tile_ID) values (?RegionUUID, ?BlockTerraform, " + |
979 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + | 979 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + |
980 | "?AllowLandResell, ?AllowLandJoinDivide, " + | 980 | "?AllowLandResell, ?AllowLandJoinDivide, " + |
981 | "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + | 981 | "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + |
@@ -989,7 +989,8 @@ namespace OpenSim.Data.MySQL | |||
989 | "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + | 989 | "?TerrainLowerLimit, ?UseEstateSun, ?FixedSun, " + |
990 | "?SunPosition, ?Covenant, ?Sandbox, " + | 990 | "?SunPosition, ?Covenant, ?Sandbox, " + |
991 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + | 991 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + |
992 | "?LoadedCreationDateTime, ?LoadedCreationID)"; | 992 | "?LoadedCreationDateTime, ?LoadedCreationID, " + |
993 | "?TerrainImageID)"; | ||
993 | 994 | ||
994 | FillRegionSettingsCommand(cmd, rs); | 995 | FillRegionSettingsCommand(cmd, rs); |
995 | 996 | ||
@@ -1276,6 +1277,8 @@ namespace OpenSim.Data.MySQL | |||
1276 | else | 1277 | else |
1277 | newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; | 1278 | newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; |
1278 | 1279 | ||
1280 | newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]); | ||
1281 | |||
1279 | return newSettings; | 1282 | return newSettings; |
1280 | } | 1283 | } |
1281 | 1284 | ||
@@ -1596,6 +1599,7 @@ namespace OpenSim.Data.MySQL | |||
1596 | cmd.Parameters.AddWithValue("Covenant", settings.Covenant.ToString()); | 1599 | cmd.Parameters.AddWithValue("Covenant", settings.Covenant.ToString()); |
1597 | cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime); | 1600 | cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime); |
1598 | cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); | 1601 | cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); |
1602 | cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID); | ||
1599 | 1603 | ||
1600 | } | 1604 | } |
1601 | 1605 | ||
diff --git a/OpenSim/Data/MySQL/Resources/033_RegionStore.sql b/OpenSim/Data/MySQL/Resources/033_RegionStore.sql new file mode 100644 index 0000000..2832b41 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/033_RegionStore.sql | |||
@@ -0,0 +1,3 @@ | |||
1 | BEGIN; | ||
2 | ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
3 | COMMIT; | ||
diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index 30ad747..d596698 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Data.Null | |||
40 | { | 40 | { |
41 | private static NullRegionData Instance = null; | 41 | private static NullRegionData Instance = null; |
42 | 42 | ||
43 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | Dictionary<UUID, RegionData> m_regionData = new Dictionary<UUID, RegionData>(); | 45 | Dictionary<UUID, RegionData> m_regionData = new Dictionary<UUID, RegionData>(); |
46 | 46 | ||
@@ -62,12 +62,14 @@ namespace OpenSim.Data.Null | |||
62 | { | 62 | { |
63 | if (regionName.Contains("%")) | 63 | if (regionName.Contains("%")) |
64 | { | 64 | { |
65 | if (r.RegionName.Contains(regionName.Replace("%", ""))) | 65 | string cleanname = regionName.Replace("%", ""); |
66 | m_log.DebugFormat("[NULL REGION DATA]: comparing {0} to {1}", cleanname.ToLower(), r.RegionName.ToLower()); | ||
67 | if (r.RegionName.ToLower().Contains(cleanname.ToLower())) | ||
66 | ret.Add(r); | 68 | ret.Add(r); |
67 | } | 69 | } |
68 | else | 70 | else |
69 | { | 71 | { |
70 | if (r.RegionName == regionName) | 72 | if (r.RegionName.ToLower() == regionName.ToLower()) |
71 | ret.Add(r); | 73 | ret.Add(r); |
72 | } | 74 | } |
73 | } | 75 | } |
diff --git a/OpenSim/Data/SQLite/Resources/005_AssetStore.sql b/OpenSim/Data/SQLite/Resources/005_AssetStore.sql new file mode 100644 index 0000000..f06121a --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/005_AssetStore.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/019_RegionStore.sql b/OpenSim/Data/SQLite/Resources/019_RegionStore.sql new file mode 100644 index 0000000..d62f848 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/019_RegionStore.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regionsettings ADD COLUMN map_tile_ID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
4 | |||
5 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 2783ba1..7081f99 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -44,10 +44,10 @@ namespace OpenSim.Data.SQLite | |||
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; | 46 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; |
47 | private const string SelectAssetMetadataSQL = "select Name, Description, Type, Temporary, UUID from assets limit :start, :count"; | 47 | private const string SelectAssetMetadataSQL = "select Name, Description, Type, Temporary, asset_flags, UUID from assets limit :start, :count"; |
48 | private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; | 48 | private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; |
49 | private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, Local, Temporary, Data) values(:UUID, :Name, :Description, :Type, :Local, :Temporary, :Data)"; | 49 | private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, Local, Temporary, asset_flags, Data) values(:UUID, :Name, :Description, :Type, :Local, :Temporary, :Flags, :Data)"; |
50 | private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, Local=:Local, Temporary=:Temporary, Data=:Data where UUID=:UUID"; | 50 | private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, Local=:Local, Temporary=:Temporary, asset_flags=:Flags, Data=:Data where UUID=:UUID"; |
51 | private const string assetSelect = "select * from assets"; | 51 | private const string assetSelect = "select * from assets"; |
52 | 52 | ||
53 | private SqliteConnection m_conn; | 53 | private SqliteConnection m_conn; |
@@ -136,6 +136,7 @@ namespace OpenSim.Data.SQLite | |||
136 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); | 136 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); |
137 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 137 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); |
138 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 138 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); |
139 | cmd.Parameters.Add(new SqliteParameter(":Flags", asset.Flags)); | ||
139 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 140 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
140 | 141 | ||
141 | cmd.ExecuteNonQuery(); | 142 | cmd.ExecuteNonQuery(); |
@@ -154,6 +155,7 @@ namespace OpenSim.Data.SQLite | |||
154 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); | 155 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); |
155 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 156 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); |
156 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 157 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); |
158 | cmd.Parameters.Add(new SqliteParameter(":Flags", asset.Flags)); | ||
157 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 159 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
158 | 160 | ||
159 | cmd.ExecuteNonQuery(); | 161 | cmd.ExecuteNonQuery(); |
@@ -227,7 +229,8 @@ namespace OpenSim.Data.SQLite | |||
227 | asset.Description = (String) row["Description"]; | 229 | asset.Description = (String) row["Description"]; |
228 | asset.Local = Convert.ToBoolean(row["Local"]); | 230 | asset.Local = Convert.ToBoolean(row["Local"]); |
229 | asset.Temporary = Convert.ToBoolean(row["Temporary"]); | 231 | asset.Temporary = Convert.ToBoolean(row["Temporary"]); |
230 | asset.Data = (byte[]) row["Data"]; | 232 | asset.Flags = (AssetFlags)Convert.ToInt32(row["asset_flags"]); |
233 | asset.Data = (byte[])row["Data"]; | ||
231 | return asset; | 234 | return asset; |
232 | } | 235 | } |
233 | 236 | ||
@@ -240,6 +243,7 @@ namespace OpenSim.Data.SQLite | |||
240 | metadata.Description = (string) row["Description"]; | 243 | metadata.Description = (string) row["Description"]; |
241 | metadata.Type = Convert.ToSByte(row["Type"]); | 244 | metadata.Type = Convert.ToSByte(row["Type"]); |
242 | metadata.Temporary = Convert.ToBoolean(row["Temporary"]); // Not sure if this is correct. | 245 | metadata.Temporary = Convert.ToBoolean(row["Temporary"]); // Not sure if this is correct. |
246 | metadata.Flags = (AssetFlags)Convert.ToInt32(row["asset_flags"]); | ||
243 | 247 | ||
244 | // Current SHA1s are not stored/computed. | 248 | // Current SHA1s are not stored/computed. |
245 | metadata.SHA1 = new byte[] {}; | 249 | metadata.SHA1 = new byte[] {}; |
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 997664a..85703dc 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -1156,6 +1156,7 @@ namespace OpenSim.Data.SQLite | |||
1156 | createCol(regionsettings, "fixed_sun", typeof (Int32)); | 1156 | createCol(regionsettings, "fixed_sun", typeof (Int32)); |
1157 | createCol(regionsettings, "sun_position", typeof (Double)); | 1157 | createCol(regionsettings, "sun_position", typeof (Double)); |
1158 | createCol(regionsettings, "covenant", typeof(String)); | 1158 | createCol(regionsettings, "covenant", typeof(String)); |
1159 | createCol(regionsettings, "map_tile_ID", typeof(String)); | ||
1159 | regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] }; | 1160 | regionsettings.PrimaryKey = new DataColumn[] { regionsettings.Columns["regionUUID"] }; |
1160 | return regionsettings; | 1161 | return regionsettings; |
1161 | } | 1162 | } |
@@ -1474,6 +1475,7 @@ namespace OpenSim.Data.SQLite | |||
1474 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); | 1475 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); |
1475 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); | 1476 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); |
1476 | newSettings.Covenant = new UUID((String) row["covenant"]); | 1477 | newSettings.Covenant = new UUID((String) row["covenant"]); |
1478 | newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]); | ||
1477 | 1479 | ||
1478 | return newSettings; | 1480 | return newSettings; |
1479 | } | 1481 | } |
@@ -1792,6 +1794,7 @@ namespace OpenSim.Data.SQLite | |||
1792 | row["fixed_sun"] = settings.FixedSun; | 1794 | row["fixed_sun"] = settings.FixedSun; |
1793 | row["sun_position"] = settings.SunPosition; | 1795 | row["sun_position"] = settings.SunPosition; |
1794 | row["covenant"] = settings.Covenant.ToString(); | 1796 | row["covenant"] = settings.Covenant.ToString(); |
1797 | row["map_tile_ID"] = settings.TerrainImageID.ToString(); | ||
1795 | } | 1798 | } |
1796 | 1799 | ||
1797 | /// <summary> | 1800 | /// <summary> |
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 7ecf198..53d28be 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs | |||
@@ -36,10 +36,10 @@ namespace OpenSim.Framework | |||
36 | [Flags] | 36 | [Flags] |
37 | public enum AssetFlags : int | 37 | public enum AssetFlags : int |
38 | { | 38 | { |
39 | Normal = 0, | 39 | Normal = 0, // Immutable asset |
40 | Maptile = 1, | 40 | Maptile = 1, // What it says |
41 | Rewritable = 2, | 41 | Rewritable = 2, // Content can be rewritten |
42 | Collectable = 4 | 42 | Collectable = 4 // Can be GC'ed after some time |
43 | } | 43 | } |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
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 | } |
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index 4fc38f3..470a4dd 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -156,6 +156,7 @@ namespace OpenSim.Services.AssetService | |||
156 | 156 | ||
157 | public bool Delete(string id) | 157 | public bool Delete(string id) |
158 | { | 158 | { |
159 | m_log.DebugFormat("[ASSET SERVICE]: Deleting asset {0}", id); | ||
159 | UUID assetID; | 160 | UUID assetID; |
160 | if (!UUID.TryParse(id, out assetID)) | 161 | if (!UUID.TryParse(id, out assetID)) |
161 | return false; | 162 | return false; |
@@ -165,7 +166,11 @@ namespace OpenSim.Services.AssetService | |||
165 | return false; | 166 | return false; |
166 | 167 | ||
167 | if ((int)(asset.Flags & AssetFlags.Maptile) != 0) | 168 | if ((int)(asset.Flags & AssetFlags.Maptile) != 0) |
169 | { | ||
168 | return m_Database.Delete(id); | 170 | return m_Database.Delete(id); |
171 | } | ||
172 | else | ||
173 | m_log.DebugFormat("[ASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id); | ||
169 | 174 | ||
170 | return false; | 175 | return false; |
171 | } | 176 | } |
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 4089fce..7c98642 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -324,6 +324,7 @@ namespace OpenSim.Services.GridService | |||
324 | 324 | ||
325 | if (rdatas != null) | 325 | if (rdatas != null) |
326 | { | 326 | { |
327 | m_log.DebugFormat("[GRID SERVICE]: Found {0} regions", rdatas.Count); | ||
327 | foreach (RegionData rdata in rdatas) | 328 | foreach (RegionData rdata in rdatas) |
328 | { | 329 | { |
329 | if (count++ < maxNumber) | 330 | if (count++ < maxNumber) |
@@ -331,7 +332,7 @@ namespace OpenSim.Services.GridService | |||
331 | } | 332 | } |
332 | } | 333 | } |
333 | 334 | ||
334 | if (m_AllowHypergridMapSearch && (rdatas == null || (rdatas != null && rdatas.Count == 0) && name.Contains("."))) | 335 | if (m_AllowHypergridMapSearch && (rdatas == null || (rdatas != null && rdatas.Count == 0)) && name.Contains(".")) |
335 | { | 336 | { |
336 | GridRegion r = m_HypergridLinker.LinkRegion(scopeID, name); | 337 | GridRegion r = m_HypergridLinker.LinkRegion(scopeID, name); |
337 | if (r != null) | 338 | if (r != null) |