From c83351b9c05d7dcc985ea8b3e34e7c92a0163553 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 23 Sep 2015 22:34:05 +0100 Subject: [PATCH] fix the DC term on flat patch encoding --- OpenSim/Region/Framework/Scenes/TerrainCompressor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs index d77e1d792d..26b0719c41 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs @@ -293,7 +293,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // flat terrain spead up things // prequant and quant 2 bits both - header.QuantWBits = 0x00; + header.QuantWBits = 0x04; output.PackBits(header.QuantWBits, 8); output.PackFloat(header.DCOffset); output.PackBits(1, 16); @@ -301,9 +301,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP output.PackBits(header.PatchIDs, 32); else output.PackBits(header.PatchIDs, 10); - // dc term is - max quant value + output.PackBits(NEGATIVE_VALUE, 3); - output.PackBits(3, 2); + output.PackBits(0x20, 6); // and thats all output.PackBits(ZERO_EOB, 2); return;