diff options
author | UbitUmarov | 2015-08-27 14:13:23 +0100 |
---|---|---|
committer | UbitUmarov | 2015-08-27 14:13:23 +0100 |
commit | c7f148ee6410700a11bbf1439e1fd5788dc70f51 (patch) | |
tree | bf36a515461f9700283ce10a91d6fa4d728a3d2f | |
parent | change osd encoding of region size (diff) | |
download | opensim-SC_OLD-c7f148ee6410700a11bbf1439e1fd5788dc70f51.zip opensim-SC_OLD-c7f148ee6410700a11bbf1439e1fd5788dc70f51.tar.gz opensim-SC_OLD-c7f148ee6410700a11bbf1439e1fd5788dc70f51.tar.bz2 opensim-SC_OLD-c7f148ee6410700a11bbf1439e1fd5788dc70f51.tar.xz |
minor clear. Use isTainted in is read clear form
-rw-r--r-- | OpenSim/Framework/TerrainData.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/OpenSim/Framework/TerrainData.cs b/OpenSim/Framework/TerrainData.cs index c66c1ad..d2e1c6a 100644 --- a/OpenSim/Framework/TerrainData.cs +++ b/OpenSim/Framework/TerrainData.cs | |||
@@ -189,6 +189,8 @@ namespace OpenSim.Framework | |||
189 | } | 189 | } |
190 | 190 | ||
191 | // Old form that clears the taint flag when we check it. | 191 | // Old form that clears the taint flag when we check it. |
192 | // ubit: this dangerus naming should be only check without clear | ||
193 | // keeping for old modules outthere | ||
192 | public override bool IsTaintedAt(int xx, int yy) | 194 | public override bool IsTaintedAt(int xx, int yy) |
193 | { | 195 | { |
194 | return IsTaintedAt(xx, yy, true /* clearOnTest */); | 196 | return IsTaintedAt(xx, yy, true /* clearOnTest */); |
@@ -208,7 +210,9 @@ namespace OpenSim.Framework | |||
208 | else | 210 | else |
209 | { | 211 | { |
210 | DBRevisionCode = (int)DBTerrainRevision.Variable2DGzip; | 212 | DBRevisionCode = (int)DBTerrainRevision.Variable2DGzip; |
213 | // DBRevisionCode = (int)DBTerrainRevision.Variable2D; | ||
211 | blob = ToCompressedTerrainSerializationV2DGzip(); | 214 | blob = ToCompressedTerrainSerializationV2DGzip(); |
215 | // blob = ToCompressedTerrainSerializationV2D(); | ||
212 | ret = true; | 216 | ret = true; |
213 | } | 217 | } |
214 | return ret; | 218 | return ret; |
@@ -444,7 +448,6 @@ namespace OpenSim.Framework | |||
444 | 448 | ||
445 | 449 | ||
446 | // stores as variable2D | 450 | // stores as variable2D |
447 | // int32 format | ||
448 | // int32 sizeX | 451 | // int32 sizeX |
449 | // int32 sizeY | 452 | // int32 sizeY |
450 | // float[,] array | 453 | // float[,] array |
@@ -454,11 +457,10 @@ namespace OpenSim.Framework | |||
454 | Array ret = null; | 457 | Array ret = null; |
455 | try | 458 | try |
456 | { | 459 | { |
457 | using (MemoryStream str = new MemoryStream((3 * sizeof(Int32)) + (SizeX * SizeY * sizeof(float)))) | 460 | using (MemoryStream str = new MemoryStream((2 * sizeof(Int32)) + (SizeX * SizeY * sizeof(float)))) |
458 | { | 461 | { |
459 | using (BinaryWriter bw = new BinaryWriter(str)) | 462 | using (BinaryWriter bw = new BinaryWriter(str)) |
460 | { | 463 | { |
461 | bw.Write((Int32)DBTerrainRevision.Variable2D); | ||
462 | bw.Write((Int32)SizeX); | 464 | bw.Write((Int32)SizeX); |
463 | bw.Write((Int32)SizeY); | 465 | bw.Write((Int32)SizeY); |
464 | for (int yy = 0; yy < SizeY; yy++) | 466 | for (int yy = 0; yy < SizeY; yy++) |
@@ -489,11 +491,10 @@ namespace OpenSim.Framework | |||
489 | Array ret = null; | 491 | Array ret = null; |
490 | try | 492 | try |
491 | { | 493 | { |
492 | using (MemoryStream inp = new MemoryStream((3 * sizeof(Int32)) + (SizeX * SizeY * sizeof(float)))) | 494 | using (MemoryStream inp = new MemoryStream((2 * sizeof(Int32)) + (SizeX * SizeY * sizeof(float)))) |
493 | { | 495 | { |
494 | using (BinaryWriter bw = new BinaryWriter(inp)) | 496 | using (BinaryWriter bw = new BinaryWriter(inp)) |
495 | { | 497 | { |
496 | bw.Write((Int32)DBTerrainRevision.Variable2DGzip); | ||
497 | bw.Write((Int32)SizeX); | 498 | bw.Write((Int32)SizeX); |
498 | bw.Write((Int32)SizeY); | 499 | bw.Write((Int32)SizeY); |
499 | for (int yy = 0; yy < SizeY; yy++) | 500 | for (int yy = 0; yy < SizeY; yy++) |
@@ -574,14 +575,13 @@ namespace OpenSim.Framework | |||
574 | // creation and any heights not initialized by theis blob are set to the default height. | 575 | // creation and any heights not initialized by theis blob are set to the default height. |
575 | public void FromCompressedTerrainSerializationV2D(byte[] pBlob) | 576 | public void FromCompressedTerrainSerializationV2D(byte[] pBlob) |
576 | { | 577 | { |
577 | Int32 hmFormatCode, hmSizeX, hmSizeY; | 578 | Int32 hmSizeX, hmSizeY; |
578 | try | 579 | try |
579 | { | 580 | { |
580 | using (MemoryStream mstr = new MemoryStream(pBlob)) | 581 | using (MemoryStream mstr = new MemoryStream(pBlob)) |
581 | { | 582 | { |
582 | using (BinaryReader br = new BinaryReader(mstr)) | 583 | using (BinaryReader br = new BinaryReader(mstr)) |
583 | { | 584 | { |
584 | hmFormatCode = br.ReadInt32(); | ||
585 | hmSizeX = br.ReadInt32(); | 585 | hmSizeX = br.ReadInt32(); |
586 | hmSizeY = br.ReadInt32(); | 586 | hmSizeY = br.ReadInt32(); |
587 | 587 | ||
@@ -620,7 +620,7 @@ namespace OpenSim.Framework | |||
620 | m_log.InfoFormat("{0} VD2Gzip {1} bytes input", | 620 | m_log.InfoFormat("{0} VD2Gzip {1} bytes input", |
621 | LogHeader, pBlob.Length); | 621 | LogHeader, pBlob.Length); |
622 | 622 | ||
623 | Int32 hmFormatCode, hmSizeX, hmSizeY; | 623 | Int32 hmSizeX, hmSizeY; |
624 | 624 | ||
625 | try | 625 | try |
626 | { | 626 | { |
@@ -639,7 +639,6 @@ namespace OpenSim.Framework | |||
639 | 639 | ||
640 | using (BinaryReader br = new BinaryReader(outputStream)) | 640 | using (BinaryReader br = new BinaryReader(outputStream)) |
641 | { | 641 | { |
642 | hmFormatCode = br.ReadInt32(); | ||
643 | hmSizeX = br.ReadInt32(); | 642 | hmSizeX = br.ReadInt32(); |
644 | hmSizeY = br.ReadInt32(); | 643 | hmSizeY = br.ReadInt32(); |
645 | 644 | ||