aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-04-25 22:37:58 +0100
committerJustin Clark-Casey (justincc)2014-04-25 22:56:25 +0100
commit904baa6da6107c3aabfae45d977491b97c22a6ef (patch)
tree4e4b146d7000b37043da76a91e0673f9b0a2e79f /OpenSim/Region/Framework/Scenes/TerrainChannel.cs
parentRestore overload mode accidentally disabled in a prior commit. Add a new (diff)
downloadopensim-SC_OLD-904baa6da6107c3aabfae45d977491b97c22a6ef.zip
opensim-SC_OLD-904baa6da6107c3aabfae45d977491b97c22a6ef.tar.gz
opensim-SC_OLD-904baa6da6107c3aabfae45d977491b97c22a6ef.tar.bz2
opensim-SC_OLD-904baa6da6107c3aabfae45d977491b97c22a6ef.tar.xz
Fix issue where terrain height values > 327 caused chaotic spiked terrain.
Per http://wiki.secondlife.com/wiki/Tips_for_Creating_Heightfields_and_Details_on_Terrain_RAW_Files#Notes_for_Creating_Height_Field_Maps_for_Second_Life terrain heights up to 508 are possible on the LL grid (and were available on previous releases of OpenSimulator). The obvious way to allow both this and equivalent -z values, is to rewiden the internal terrain height storage from short to int. The memory tradeoff is most noticeable on the maximum 8192x8192 var region (equiv to 1024 normal regions), where it adds 128mb to resident use (128k on a normal region) This is still better than the double used in previous releases. This does not affect physics or data storage since they already use float and double respectively. This may not be the final solution if we actually want to sacrifice -z, >327 or something else. Relates to http://opensimulator.org/mantis/view.php?id=7076
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/TerrainChannel.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
index cc040a6..3d563a6 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
@@ -363,8 +363,8 @@ namespace OpenSim.Region.Framework.Scenes
363 public int SizeY; 363 public int SizeY;
364 public int SizeZ; 364 public int SizeZ;
365 public float CompressionFactor; 365 public float CompressionFactor;
366 public short[] Map; 366 public int[] Map;
367 public TerrainChannelXMLPackage(int pX, int pY, int pZ, float pCompressionFactor, short[] pMap) 367 public TerrainChannelXMLPackage(int pX, int pY, int pZ, float pCompressionFactor, int[] pMap)
368 { 368 {
369 Version = 1; 369 Version = 1;
370 SizeX = pX; 370 SizeX = pX;