Fix problem of hurricane speed winds. Thanks Vegaslon.

0.8.0.3
Robert Adams 2014-02-22 15:04:28 -08:00
parent cddf1ec0dc
commit 0b213af675
2 changed files with 6 additions and 11 deletions

View File

@ -1309,18 +1309,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
Vector2[] windSpeeds = (Vector2[])o;
TerrainPatch[] patches = new TerrainPatch[2];
patches[0] = new TerrainPatch();
patches[0].Data = new float[16 * 16];
patches[1] = new TerrainPatch();
patches[1].Data = new float[16 * 16];
patches[0] = new TerrainPatch { Data = new float[16 * 16] };
patches[1] = new TerrainPatch { Data = new float[16 * 16] };
for (int y = 0; y < 16; y++)
for (int x = 0; x < 16 * 16; x++)
{
for (int x = 0; x < 16; x++)
{
patches[0].Data[y * 16 + x] = windSpeeds[y * 16 + x].X;
patches[1].Data[y * 16 + x] = windSpeeds[y * 16 + x].Y;
}
patches[0].Data[x] = windSpeeds[x].X;
patches[1].Data[x] = windSpeeds[x].Y;
}
byte layerType = (byte)TerrainPatch.LayerType.Wind;

View File

@ -192,7 +192,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
int wbits;
int[] patch = CompressPatch(patchData, header, 10, out wbits);
wbits = EncodePatchHeader(output, header, patch, (uint)pRegionSizeX, (uint)pRegionSizeY, wbits);
wbits = EncodePatchHeader(output, header, patch, Constants.RegionSize, Constants.RegionSize, wbits);
EncodePatch(output, patch, 0, wbits);
}