aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authoronefang2019-07-24 16:27:08 +1000
committeronefang2019-07-24 16:27:08 +1000
commitb4b52f5f75d39e4b9b0dc9ad42c339bdc3dc75c2 (patch)
treeb7803bd145789c6fed7b6fda83d6968b90465907 /OpenSim/Region
parentFor the "teleport from above" case, do the right thing. (diff)
downloadopensim-SC_OLD-b4b52f5f75d39e4b9b0dc9ad42c339bdc3dc75c2.zip
opensim-SC_OLD-b4b52f5f75d39e4b9b0dc9ad42c339bdc3dc75c2.tar.gz
opensim-SC_OLD-b4b52f5f75d39e4b9b0dc9ad42c339bdc3dc75c2.tar.bz2
opensim-SC_OLD-b4b52f5f75d39e4b9b0dc9ad42c339bdc3dc75c2.tar.xz
Move the terrain.raw file out of tree to a sim specific name.
Diffstat (limited to 'OpenSim/Region')
-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);