diff options
Diffstat (limited to 'OpenSim.RegionServer/SimClient.cs')
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 9649e14..f8affb9 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -426,6 +426,8 @@ namespace OpenSim | |||
426 | break; | 426 | break; |
427 | case PacketType.ModifyLand: | 427 | case PacketType.ModifyLand: |
428 | ModifyLandPacket modify = (ModifyLandPacket)Pack; | 428 | ModifyLandPacket modify = (ModifyLandPacket)Pack; |
429 | //Console.WriteLine("terraform: number of parcel data blocks" + modify.ParcelData.Length); | ||
430 | |||
429 | switch (modify.ModifyBlock.Action) | 431 | switch (modify.ModifyBlock.Action) |
430 | { | 432 | { |
431 | case 1: | 433 | case 1: |
@@ -433,11 +435,14 @@ namespace OpenSim | |||
433 | { | 435 | { |
434 | int mody = (int) modify.ParcelData[0].North; | 436 | int mody = (int) modify.ParcelData[0].North; |
435 | int modx = (int) modify.ParcelData[0].West; | 437 | int modx = (int) modify.ParcelData[0].West; |
436 | this.m_world.LandMap[(mody * 256) + modx -1 ] += 0.1f; | 438 | // Console.WriteLine("height in packet is " + modify.ModifyBlock.Height.ToString()); |
437 | this.m_world.LandMap[(mody * 256) + modx] += 0.2f; | 439 | // Console.WriteLine("current height at that point is " + this.m_world.LandMap[(mody * 256) + modx].ToString()); |
438 | this.m_world.LandMap[(mody * 256) + modx + 1] += 0.1f; | 440 | |
439 | this.m_world.LandMap[((mody+1) * 256) + modx] += 0.1f; | 441 | this.m_world.LandMap[(mody * 256) + modx -1 ] += 0.05f; |
440 | this.m_world.LandMap[((mody -1) * 256) + modx] += 0.1f; | 442 | this.m_world.LandMap[(mody * 256) + modx] += 0.1f; |
443 | this.m_world.LandMap[(mody * 256) + modx + 1] += 0.05f; | ||
444 | this.m_world.LandMap[((mody+1) * 256) + modx] += 0.05f; | ||
445 | this.m_world.LandMap[((mody -1) * 256) + modx] += 0.05f; | ||
441 | m_world.RegenerateTerrain(true, modx, mody); | 446 | m_world.RegenerateTerrain(true, modx, mody); |
442 | } | 447 | } |
443 | break; | 448 | break; |
@@ -446,11 +451,14 @@ namespace OpenSim | |||
446 | { | 451 | { |
447 | int mody = (int)modify.ParcelData[0].North; | 452 | int mody = (int)modify.ParcelData[0].North; |
448 | int modx = (int)modify.ParcelData[0].West; | 453 | int modx = (int)modify.ParcelData[0].West; |
449 | this.m_world.LandMap[(mody * 256) + modx - 1] -= 0.1f; | 454 | // Console.WriteLine("height in packet is " + modify.ModifyBlock.Height.ToString()); |
450 | this.m_world.LandMap[(mody * 256) + modx] -= 0.2f; | 455 | // Console.WriteLine("current height at that point is " + this.m_world.LandMap[(mody * 256) + modx].ToString()); |
451 | this.m_world.LandMap[(mody * 256) + modx + 1] -= 0.1f; | 456 | |
452 | this.m_world.LandMap[((mody + 1) * 256) + modx] -= 0.1f; | 457 | this.m_world.LandMap[(mody * 256) + modx - 1] -= 0.05f; |
453 | this.m_world.LandMap[((mody - 1) * 256) + modx] -= 0.1f; | 458 | this.m_world.LandMap[(mody * 256) + modx] -= 0.1f; |
459 | this.m_world.LandMap[(mody * 256) + modx + 1] -= 0.05f; | ||
460 | this.m_world.LandMap[((mody + 1) * 256) + modx] -= 0.05f; | ||
461 | this.m_world.LandMap[((mody - 1) * 256) + modx] -= 0.05f; | ||
454 | m_world.RegenerateTerrain(true, modx, mody); | 462 | m_world.RegenerateTerrain(true, modx, mody); |
455 | } | 463 | } |
456 | break; | 464 | break; |