diff options
author | Robert Adams | 2014-04-12 17:37:57 -0700 |
---|---|---|
committer | Robert Adams | 2014-04-12 17:37:57 -0700 |
commit | c8914d22ebb66fd9601161c9826d8b29ff6cb561 (patch) | |
tree | ca52fe7a5b864bf7f0c208a13c9e1fd361091d89 /OpenSim | |
parent | Refactor: Rename GetOtherSetting to GetSetting and make SetOtherSetting private (diff) | |
download | opensim-SC_OLD-c8914d22ebb66fd9601161c9826d8b29ff6cb561.zip opensim-SC_OLD-c8914d22ebb66fd9601161c9826d8b29ff6cb561.tar.gz opensim-SC_OLD-c8914d22ebb66fd9601161c9826d8b29ff6cb561.tar.bz2 opensim-SC_OLD-c8914d22ebb66fd9601161c9826d8b29ff6cb561.tar.xz |
BulletSim: reduce the terrain collison margin to be the same as other
objects in the world.
This was originally changed in an attempt to make vehicles work better
but the effect was not that large and it causes avatars to float
above the terrain.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/TerrainCompressor.cs | 6 | ||||
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | 2 |
3 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index d9fe4e2..f80f5a0 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -1251,6 +1251,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1251 | { | 1251 | { |
1252 | try | 1252 | try |
1253 | { | 1253 | { |
1254 | /* test code using the terrain compressor in libOpenMetaverse | ||
1255 | int[] patchInd = new int[1]; | ||
1256 | patchInd[0] = px + (py * Constants.TerrainPatchSize); | ||
1257 | LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(terrData.GetFloatsSerialized(), patchInd); | ||
1258 | */ | ||
1254 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLandPacket(terrData, px, py); | 1259 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLandPacket(terrData, px, py); |
1255 | 1260 | ||
1256 | // When a user edits the terrain, so much data is sent, the data queues up fast and presents a sub optimal editing experience. | 1261 | // When a user edits the terrain, so much data is sent, the data queues up fast and presents a sub optimal editing experience. |
@@ -1322,6 +1327,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1322 | if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) | 1327 | if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) |
1323 | layerType = (byte)TerrainPatch.LayerType.WindExtended; | 1328 | layerType = (byte)TerrainPatch.LayerType.WindExtended; |
1324 | 1329 | ||
1330 | // LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, (TerrainPatch.LayerType)layerType); | ||
1325 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, | 1331 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, |
1326 | (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); | 1332 | (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); |
1327 | layerpack.Header.Zerocoded = true; | 1333 | layerpack.Header.Zerocoded = true; |
@@ -1351,6 +1357,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1351 | if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) | 1357 | if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize) |
1352 | layerType = (byte)TerrainPatch.LayerType.CloudExtended; | 1358 | layerType = (byte)TerrainPatch.LayerType.CloudExtended; |
1353 | 1359 | ||
1360 | // LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, (TerrainPatch.LayerType)layerType); | ||
1354 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, | 1361 | LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType, |
1355 | (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); | 1362 | (int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY); |
1356 | layerpack.Header.Zerocoded = true; | 1363 | layerpack.Header.Zerocoded = true; |
diff --git a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs index b41691f..1107a2a 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs | |||
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
81 | BuildQuantizeTable16(); | 81 | BuildQuantizeTable16(); |
82 | } | 82 | } |
83 | 83 | ||
84 | // Unused: left for historical reference. | 84 | // Used to send cloud and wind patches |
85 | public static LayerDataPacket CreateLayerDataPacket(TerrainPatch[] patches, byte type, int pRegionSizeX, | 85 | public static LayerDataPacket CreateLayerDataPacket(TerrainPatch[] patches, byte type, int pRegionSizeX, |
86 | int pRegionSizeY) | 86 | int pRegionSizeY) |
87 | { | 87 | { |
@@ -275,7 +275,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
275 | } | 275 | } |
276 | 276 | ||
277 | header.DCOffset = zmin; | 277 | header.DCOffset = zmin; |
278 | header.Range = (int)(zmax - zmin + 1.0f); | 278 | header.Range = (int)((zmax - zmin) + 1.0f); |
279 | 279 | ||
280 | return header; | 280 | return header; |
281 | } | 281 | } |
@@ -491,7 +491,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
491 | lineout[CopyMatrix16[uptr + column]] = (int)(total * QuantizeTable16[uptr + column]); | 491 | lineout[CopyMatrix16[uptr + column]] = (int)(total * QuantizeTable16[uptr + column]); |
492 | } | 492 | } |
493 | } | 493 | } |
494 | */ | ||
495 | 494 | ||
496 | private static void DCTColumn16(float[] linein, int[] lineout, int column) | 495 | private static void DCTColumn16(float[] linein, int[] lineout, int column) |
497 | { | 496 | { |
@@ -524,6 +523,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
524 | lineout[CopyMatrix16[uptr + column]] = (int) (total*QuantizeTable16[uptr + column]); | 523 | lineout[CopyMatrix16[uptr + column]] = (int) (total*QuantizeTable16[uptr + column]); |
525 | } | 524 | } |
526 | } | 525 | } |
526 | */ | ||
527 | 527 | ||
528 | private static int DCTColumn16Wbits(float[] linein, int[] lineout, int column, int wbits, int maxwbits) | 528 | private static int DCTColumn16Wbits(float[] linein, int[] lineout, int column, int wbits, int maxwbits) |
529 | { | 529 | { |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index c977a5d..f2ad528 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | |||
@@ -553,7 +553,7 @@ public static class BSParam | |||
553 | new ParameterDefn<float>("TerrainContactProcessingThreshold", "Distance from terrain to stop processing collisions" , | 553 | new ParameterDefn<float>("TerrainContactProcessingThreshold", "Distance from terrain to stop processing collisions" , |
554 | 0.0f ), | 554 | 0.0f ), |
555 | new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" , | 555 | new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" , |
556 | 0.08f ), | 556 | 0.04f ), |
557 | 557 | ||
558 | new ParameterDefn<float>("AvatarFriction", "Factor to reduce movement against an avatar. Changed on avatar recreation.", | 558 | new ParameterDefn<float>("AvatarFriction", "Factor to reduce movement against an avatar. Changed on avatar recreation.", |
559 | 0.2f ), | 559 | 0.2f ), |