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.0.8.0.3
parent
574a11558d
commit
c8914d22eb
|
@ -1251,6 +1251,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
{
|
||||
try
|
||||
{
|
||||
/* test code using the terrain compressor in libOpenMetaverse
|
||||
int[] patchInd = new int[1];
|
||||
patchInd[0] = px + (py * Constants.TerrainPatchSize);
|
||||
LayerDataPacket layerpack = TerrainCompressor.CreateLandPacket(terrData.GetFloatsSerialized(), patchInd);
|
||||
*/
|
||||
LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLandPacket(terrData, px, py);
|
||||
|
||||
// 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
|
|||
if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize)
|
||||
layerType = (byte)TerrainPatch.LayerType.WindExtended;
|
||||
|
||||
// LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, (TerrainPatch.LayerType)layerType);
|
||||
LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType,
|
||||
(int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY);
|
||||
layerpack.Header.Zerocoded = true;
|
||||
|
@ -1351,6 +1357,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (m_scene.RegionInfo.RegionSizeX > Constants.RegionSize || m_scene.RegionInfo.RegionSizeY > Constants.RegionSize)
|
||||
layerType = (byte)TerrainPatch.LayerType.CloudExtended;
|
||||
|
||||
// LayerDataPacket layerpack = TerrainCompressor.CreateLayerDataPacket(patches, (TerrainPatch.LayerType)layerType);
|
||||
LayerDataPacket layerpack = OpenSimTerrainCompressor.CreateLayerDataPacket(patches, layerType,
|
||||
(int)m_scene.RegionInfo.RegionSizeX, (int)m_scene.RegionInfo.RegionSizeY);
|
||||
layerpack.Header.Zerocoded = true;
|
||||
|
|
|
@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
BuildQuantizeTable16();
|
||||
}
|
||||
|
||||
// Unused: left for historical reference.
|
||||
// Used to send cloud and wind patches
|
||||
public static LayerDataPacket CreateLayerDataPacket(TerrainPatch[] patches, byte type, int pRegionSizeX,
|
||||
int pRegionSizeY)
|
||||
{
|
||||
|
@ -275,7 +275,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
}
|
||||
|
||||
header.DCOffset = zmin;
|
||||
header.Range = (int)(zmax - zmin + 1.0f);
|
||||
header.Range = (int)((zmax - zmin) + 1.0f);
|
||||
|
||||
return header;
|
||||
}
|
||||
|
@ -491,7 +491,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
lineout[CopyMatrix16[uptr + column]] = (int)(total * QuantizeTable16[uptr + column]);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
private static void DCTColumn16(float[] linein, int[] lineout, int column)
|
||||
{
|
||||
|
@ -524,6 +523,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
lineout[CopyMatrix16[uptr + column]] = (int) (total*QuantizeTable16[uptr + column]);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
private static int DCTColumn16Wbits(float[] linein, int[] lineout, int column, int wbits, int maxwbits)
|
||||
{
|
||||
|
|
|
@ -553,7 +553,7 @@ public static class BSParam
|
|||
new ParameterDefn<float>("TerrainContactProcessingThreshold", "Distance from terrain to stop processing collisions" ,
|
||||
0.0f ),
|
||||
new ParameterDefn<float>("TerrainCollisionMargin", "Margin where collision checking starts" ,
|
||||
0.08f ),
|
||||
0.04f ),
|
||||
|
||||
new ParameterDefn<float>("AvatarFriction", "Factor to reduce movement against an avatar. Changed on avatar recreation.",
|
||||
0.2f ),
|
||||
|
|
Loading…
Reference in New Issue