aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/SimClient.cs
diff options
context:
space:
mode:
authorMW2007-03-30 16:50:19 +0000
committerMW2007-03-30 16:50:19 +0000
commitbcae0bce8573ba7a567c4d63ffd8c9cbfe269684 (patch)
treef5914caa64651e1591443c631b74e2610953159e /OpenSim.RegionServer/SimClient.cs
parent(no commit message) (diff)
downloadopensim-SC_OLD-bcae0bce8573ba7a567c4d63ffd8c9cbfe269684.zip
opensim-SC_OLD-bcae0bce8573ba7a567c4d63ffd8c9cbfe269684.tar.gz
opensim-SC_OLD-bcae0bce8573ba7a567c4d63ffd8c9cbfe269684.tar.bz2
opensim-SC_OLD-bcae0bce8573ba7a567c4d63ffd8c9cbfe269684.tar.xz
Some very basic terraforming, can raise and lower the terrain, but currently only a very basic brush algorithm (and can't change the brushes size)
Diffstat (limited to 'OpenSim.RegionServer/SimClient.cs')
-rw-r--r--OpenSim.RegionServer/SimClient.cs32
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