diff options
author | Adam Frisby | 2007-04-06 18:48:23 +0000 |
---|---|---|
committer | Adam Frisby | 2007-04-06 18:48:23 +0000 |
commit | fb0dffbf13a79aabe9537f16b7bb151af62c75bf (patch) | |
tree | 28a8d468e5499a7af1e33eec7bbdeb9e82ae8732 /OpenSim.RegionServer/world/WorldPacketHandlers.cs | |
parent | And now for some solution files... (diff) | |
download | opensim-SC_OLD-fb0dffbf13a79aabe9537f16b7bb151af62c75bf.zip opensim-SC_OLD-fb0dffbf13a79aabe9537f16b7bb151af62c75bf.tar.gz opensim-SC_OLD-fb0dffbf13a79aabe9537f16b7bb151af62c75bf.tar.bz2 opensim-SC_OLD-fb0dffbf13a79aabe9537f16b7bb151af62c75bf.tar.xz |
**BREAKING CHANGE** Changing the way terrain is stored and used internally.
Diffstat (limited to 'OpenSim.RegionServer/world/WorldPacketHandlers.cs')
-rw-r--r-- | OpenSim.RegionServer/world/WorldPacketHandlers.cs | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/OpenSim.RegionServer/world/WorldPacketHandlers.cs b/OpenSim.RegionServer/world/WorldPacketHandlers.cs index a155ffe..0643a4e 100644 --- a/OpenSim.RegionServer/world/WorldPacketHandlers.cs +++ b/OpenSim.RegionServer/world/WorldPacketHandlers.cs | |||
@@ -24,34 +24,16 @@ namespace OpenSim.world | |||
24 | // raise terrain | 24 | // raise terrain |
25 | if (modify.ParcelData.Length > 0) | 25 | if (modify.ParcelData.Length > 0) |
26 | { | 26 | { |
27 | int mody = (int)modify.ParcelData[0].North; | 27 | Terrain.raise(modify.ParcelData[0].North, modify.ParcelData[0].West, 10.0, 0.1); |
28 | int modx = (int)modify.ParcelData[0].West; | 28 | RegenerateTerrain(true, (int)modify.ParcelData[0].North, (int)modify.ParcelData[0].West); |
29 | lock (LandMap) | ||
30 | { | ||
31 | LandMap[(mody * 256) + modx - 1] += 0.05f; | ||
32 | LandMap[(mody * 256) + modx] += 0.1f; | ||
33 | LandMap[(mody * 256) + modx + 1] += 0.05f; | ||
34 | LandMap[((mody + 1) * 256) + modx] += 0.05f; | ||
35 | LandMap[((mody - 1) * 256) + modx] += 0.05f; | ||
36 | } | ||
37 | RegenerateTerrain(true, modx, mody); | ||
38 | } | 29 | } |
39 | break; | 30 | break; |
40 | case 2: | 31 | case 2: |
41 | //lower terrain | 32 | //lower terrain |
42 | if (modify.ParcelData.Length > 0) | 33 | if (modify.ParcelData.Length > 0) |
43 | { | 34 | { |
44 | int mody = (int)modify.ParcelData[0].North; | 35 | Terrain.lower(modify.ParcelData[0].North, modify.ParcelData[0].West, 10.0, 0.1); |
45 | int modx = (int)modify.ParcelData[0].West; | 36 | RegenerateTerrain(true, (int)modify.ParcelData[0].North, (int)modify.ParcelData[0].West); |
46 | lock (LandMap) | ||
47 | { | ||
48 | LandMap[(mody * 256) + modx - 1] -= 0.05f; | ||
49 | LandMap[(mody * 256) + modx] -= 0.1f; | ||
50 | LandMap[(mody * 256) + modx + 1] -= 0.05f; | ||
51 | LandMap[((mody + 1) * 256) + modx] -= 0.05f; | ||
52 | LandMap[((mody - 1) * 256) + modx] -= 0.05f; | ||
53 | } | ||
54 | RegenerateTerrain(true, modx, mody); | ||
55 | } | 37 | } |
56 | break; | 38 | break; |
57 | } | 39 | } |