diff options
author | onefang | 2020-09-09 04:41:01 +1000 |
---|---|---|
committer | onefang | 2020-09-09 04:41:01 +1000 |
commit | e6c565366e969a6c781af316f998f57b283a919e (patch) | |
tree | a29af2cc4687343e020aee4329819cdc14518bfe /OpenSim/Region | |
parent | Various logging fix ups. (diff) | |
download | opensim-SC-e6c565366e969a6c781af316f998f57b283a919e.zip opensim-SC-e6c565366e969a6c781af316f998f57b283a919e.tar.gz opensim-SC-e6c565366e969a6c781af316f998f57b283a919e.tar.bz2 opensim-SC-e6c565366e969a6c781af316f998f57b283a919e.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.cs | 17 |
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 00c77d7..71c2eeb 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -1373,15 +1373,24 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1373 | 1373 | ||
1374 | if (terr != null) | 1374 | if (terr != null) |
1375 | { | 1375 | { |
1376 | string file = Util.cacheDir() + "/terrain_"; | ||
1377 | try | ||
1378 | { | ||
1379 | file = file + Uri.EscapeDataString(Scene.Name) + ".raw"; | ||
1380 | } | ||
1381 | catch (Exception) | ||
1382 | { | ||
1383 | file = file + ".raw"; | ||
1384 | } | ||
1376 | // m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName); | 1385 | // m_log.Warn("[CLIENT]: Got Request to Send Terrain in region " + Scene.RegionInfo.RegionName); |
1377 | if (File.Exists(Util.dataDir() + "/terrain.raw")) | 1386 | if (File.Exists(file)) |
1378 | { | 1387 | { |
1379 | File.Delete(Util.dataDir() + "/terrain.raw"); | 1388 | File.Delete(file); |
1380 | } | 1389 | } |
1381 | terr.SaveToFile(Util.dataDir() + "/terrain.raw"); | 1390 | terr.SaveToFile(file); |
1382 | 1391 | ||
1383 | byte[] bdata; | 1392 | byte[] bdata; |
1384 | using(FileStream input = new FileStream(Util.dataDir() + "/terrain.raw",FileMode.Open)) | 1393 | using(FileStream input = new FileStream(file, FileMode.Open)) |
1385 | { | 1394 | { |
1386 | bdata = new byte[input.Length]; | 1395 | bdata = new byte[input.Length]; |
1387 | input.Read(bdata, 0, (int)input.Length); | 1396 | input.Read(bdata, 0, (int)input.Length); |