diff options
author | Charles Krinke | 2008-06-25 13:55:06 +0000 |
---|---|---|
committer | Charles Krinke | 2008-06-25 13:55:06 +0000 |
commit | c4641d70051d10e8d7450544cd27036ecf010f8d (patch) | |
tree | 65e45914ad78d52def7ce6f60c4182304f2a537a /OpenSim/Framework/PrimitiveBaseShape.cs | |
parent | More svn properties. Minor cleanup in POS. (diff) | |
download | opensim-SC-c4641d70051d10e8d7450544cd27036ecf010f8d.zip opensim-SC-c4641d70051d10e8d7450544cd27036ecf010f8d.tar.gz opensim-SC-c4641d70051d10e8d7450544cd27036ecf010f8d.tar.bz2 opensim-SC-c4641d70051d10e8d7450544cd27036ecf010f8d.tar.xz |
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 .
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs index 1f5428b..503830b 100644 --- a/OpenSim/Framework/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/PrimitiveBaseShape.cs | |||
@@ -316,26 +316,26 @@ namespace OpenSim.Framework | |||
316 | ushort SculptEP = 0x30; | 316 | ushort SculptEP = 0x30; |
317 | 317 | ||
318 | int i = 0; | 318 | int i = 0; |
319 | uint TotalBytesLength = 5; | 319 | uint TotalBytesLength = 1; // ExtraParamsNum |
320 | 320 | ||
321 | uint ExtraParamsNum = 0; | 321 | uint ExtraParamsNum = 0; |
322 | if (FlexiEntry) | 322 | if (FlexiEntry) |
323 | { | 323 | { |
324 | ExtraParamsNum++; | 324 | ExtraParamsNum++; |
325 | TotalBytesLength += 16;// data | 325 | TotalBytesLength += 16;// data |
326 | TotalBytesLength += 4; // type | 326 | TotalBytesLength += 2 + 4; // type |
327 | } | 327 | } |
328 | if (LightEntry) | 328 | if (LightEntry) |
329 | { | 329 | { |
330 | ExtraParamsNum++; | 330 | ExtraParamsNum++; |
331 | TotalBytesLength += 16;// data | 331 | TotalBytesLength += 16;// data |
332 | TotalBytesLength += 4; // type | 332 | TotalBytesLength += 2 + 4; // type |
333 | } | 333 | } |
334 | if (SculptEntry) | 334 | if (SculptEntry) |
335 | { | 335 | { |
336 | ExtraParamsNum++; | 336 | ExtraParamsNum++; |
337 | TotalBytesLength += 17;// data | 337 | TotalBytesLength += 17;// data |
338 | TotalBytesLength += 4; // type | 338 | TotalBytesLength += 2 + 4; // type |
339 | } | 339 | } |
340 | 340 | ||
341 | byte[] returnbytes = new byte[TotalBytesLength]; | 341 | byte[] returnbytes = new byte[TotalBytesLength]; |
@@ -469,16 +469,19 @@ namespace OpenSim.Framework | |||
469 | { | 469 | { |
470 | case FlexiEP: | 470 | case FlexiEP: |
471 | ReadFlexiData(data, i); | 471 | ReadFlexiData(data, i); |
472 | i += 16; | ||
472 | lGotFlexi = true; | 473 | lGotFlexi = true; |
473 | break; | 474 | break; |
474 | 475 | ||
475 | case LightEP: | 476 | case LightEP: |
476 | ReadLightData(data, i); | 477 | ReadLightData(data, i); |
478 | i += 16; | ||
477 | lGotLight = true; | 479 | lGotLight = true; |
478 | break; | 480 | break; |
479 | 481 | ||
480 | case SculptEP: | 482 | case SculptEP: |
481 | ReadSculptData(data, i); | 483 | ReadSculptData(data, i); |
484 | i += 17; | ||
482 | lGotSculpt = true; | 485 | lGotSculpt = true; |
483 | break; | 486 | break; |
484 | } | 487 | } |
@@ -536,7 +539,7 @@ namespace OpenSim.Framework | |||
536 | 539 | ||
537 | public void ReadFlexiData(byte[] data, int pos) | 540 | public void ReadFlexiData(byte[] data, int pos) |
538 | { | 541 | { |
539 | if (data.Length-pos >= 5) | 542 | if (data.Length-pos >= 16) |
540 | { | 543 | { |
541 | FlexiEntry = true; | 544 | FlexiEntry = true; |
542 | FlexiSoftness = ((data[pos] & 0x80) >> 6) | ((data[pos + 1] & 0x80) >> 7); | 545 | FlexiSoftness = ((data[pos] & 0x80) >> 6) | ((data[pos + 1] & 0x80) >> 7); |