Mantis#1584. Thank you kindly, Lulurun for a patch that:

The (de)serialization of extraparams is wrong.
prims with scuplt texture won't be seen as it expected.
This patch fixes the problem .
0.6.0-stable
Charles Krinke 2008-06-25 13:55:06 +00:00
parent 80f5eb21ea
commit c4641d7005
1 changed files with 8 additions and 5 deletions

View File

@ -316,26 +316,26 @@ namespace OpenSim.Framework
ushort SculptEP = 0x30; ushort SculptEP = 0x30;
int i = 0; int i = 0;
uint TotalBytesLength = 5; uint TotalBytesLength = 1; // ExtraParamsNum
uint ExtraParamsNum = 0; uint ExtraParamsNum = 0;
if (FlexiEntry) if (FlexiEntry)
{ {
ExtraParamsNum++; ExtraParamsNum++;
TotalBytesLength += 16;// data TotalBytesLength += 16;// data
TotalBytesLength += 4; // type TotalBytesLength += 2 + 4; // type
} }
if (LightEntry) if (LightEntry)
{ {
ExtraParamsNum++; ExtraParamsNum++;
TotalBytesLength += 16;// data TotalBytesLength += 16;// data
TotalBytesLength += 4; // type TotalBytesLength += 2 + 4; // type
} }
if (SculptEntry) if (SculptEntry)
{ {
ExtraParamsNum++; ExtraParamsNum++;
TotalBytesLength += 17;// data TotalBytesLength += 17;// data
TotalBytesLength += 4; // type TotalBytesLength += 2 + 4; // type
} }
byte[] returnbytes = new byte[TotalBytesLength]; byte[] returnbytes = new byte[TotalBytesLength];
@ -469,16 +469,19 @@ namespace OpenSim.Framework
{ {
case FlexiEP: case FlexiEP:
ReadFlexiData(data, i); ReadFlexiData(data, i);
i += 16;
lGotFlexi = true; lGotFlexi = true;
break; break;
case LightEP: case LightEP:
ReadLightData(data, i); ReadLightData(data, i);
i += 16;
lGotLight = true; lGotLight = true;
break; break;
case SculptEP: case SculptEP:
ReadSculptData(data, i); ReadSculptData(data, i);
i += 17;
lGotSculpt = true; lGotSculpt = true;
break; break;
} }
@ -536,7 +539,7 @@ namespace OpenSim.Framework
public void ReadFlexiData(byte[] data, int pos) public void ReadFlexiData(byte[] data, int pos)
{ {
if (data.Length-pos >= 5) if (data.Length-pos >= 16)
{ {
FlexiEntry = true; FlexiEntry = true;
FlexiSoftness = ((data[pos] & 0x80) >> 6) | ((data[pos + 1] & 0x80) >> 7); FlexiSoftness = ((data[pos] & 0x80) >> 6) | ((data[pos + 1] & 0x80) >> 7);