diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim.RegionServer/SimClient.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs index 6e81733..9649e14 100644 --- a/OpenSim.RegionServer/SimClient.cs +++ b/OpenSim.RegionServer/SimClient.cs | |||
@@ -424,6 +424,38 @@ namespace OpenSim | |||
424 | //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Received DeRezObject packet"); | 424 | //OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Received DeRezObject packet"); |
425 | m_world.DeRezObject((DeRezObjectPacket)Pack, this); | 425 | m_world.DeRezObject((DeRezObjectPacket)Pack, this); |
426 | break; | 426 | break; |
427 | case PacketType.ModifyLand: | ||
428 | ModifyLandPacket modify = (ModifyLandPacket)Pack; | ||
429 | switch (modify.ModifyBlock.Action) | ||
430 | { | ||
431 | case 1: | ||
432 | if (modify.ParcelData.Length > 0) | ||
433 | { | ||
434 | int mody = (int) modify.ParcelData[0].North; | ||
435 | int modx = (int) modify.ParcelData[0].West; | ||
436 | this.m_world.LandMap[(mody * 256) + modx -1 ] += 0.1f; | ||
437 | this.m_world.LandMap[(mody * 256) + modx] += 0.2f; | ||
438 | this.m_world.LandMap[(mody * 256) + modx + 1] += 0.1f; | ||
439 | this.m_world.LandMap[((mody+1) * 256) + modx] += 0.1f; | ||
440 | this.m_world.LandMap[((mody -1) * 256) + modx] += 0.1f; | ||
441 | m_world.RegenerateTerrain(true, modx, mody); | ||
442 | } | ||
443 | break; | ||
444 | case 2: | ||
445 | if (modify.ParcelData.Length > 0) | ||
446 | { | ||
447 | int mody = (int)modify.ParcelData[0].North; | ||
448 | int modx = (int)modify.ParcelData[0].West; | ||
449 | this.m_world.LandMap[(mody * 256) + modx - 1] -= 0.1f; | ||
450 | this.m_world.LandMap[(mody * 256) + modx] -= 0.2f; | ||
451 | this.m_world.LandMap[(mody * 256) + modx + 1] -= 0.1f; | ||
452 | this.m_world.LandMap[((mody + 1) * 256) + modx] -= 0.1f; | ||
453 | this.m_world.LandMap[((mody - 1) * 256) + modx] -= 0.1f; | ||
454 | m_world.RegenerateTerrain(true, modx, mody); | ||
455 | } | ||
456 | break; | ||
457 | } | ||
458 | break; | ||
427 | } | 459 | } |
428 | } | 460 | } |
429 | 461 | ||