aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 3c45b68..4b55860 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -1355,15 +1355,24 @@ namespace OpenSim.Region.CoreModules.World.Estate
1355 1355
1356 if (terr != null) 1356 if (terr != null)
1357 { 1357 {
1358 string file = Util.cacheDir() + "/terrain_";
1359 try
1360 {
1361 file = file + Uri.EscapeDataString(Scene.Name) + ".raw";
1362 }
1363 catch (Exception ex)
1364 {
1365 file = file + ".raw";
1366 }
1358// m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName); 1367// m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName);
1359 if (File.Exists(Util.dataDir() + "/terrain.raw")) 1368 if (File.Exists(file))
1360 { 1369 {
1361 File.Delete(Util.dataDir() + "/terrain.raw"); 1370 File.Delete(file);
1362 } 1371 }
1363 terr.SaveToFile(Util.dataDir() + "/terrain.raw"); 1372 terr.SaveToFile(file);
1364 1373
1365 byte[] bdata; 1374 byte[] bdata;
1366 using(FileStream input = new FileStream(Util.dataDir() + "/terrain.raw",FileMode.Open)) 1375 using(FileStream input = new FileStream(file, FileMode.Open))
1367 { 1376 {
1368 bdata = new byte[input.Length]; 1377 bdata = new byte[input.Length];
1369 input.Read(bdata, 0, (int)input.Length); 1378 input.Read(bdata, 0, (int)input.Length);