diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 4deb36e..097a62d 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -317,8 +317,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
317 | 317 | ||
318 | public void SendLandUpdate(ScenePresence avatar, bool force) | 318 | public void SendLandUpdate(ScenePresence avatar, bool force) |
319 | { | 319 | { |
320 | ILandObject over = GetLandObject((int)Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), | 320 | ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), |
321 | (int)Math.Min(255, Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); | 321 | (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); |
322 | 322 | ||
323 | if (over != null) | 323 | if (over != null) |
324 | { | 324 | { |
@@ -849,10 +849,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
849 | byte[] byteArray = new byte[LAND_BLOCKS_PER_PACKET]; | 849 | byte[] byteArray = new byte[LAND_BLOCKS_PER_PACKET]; |
850 | int byteArrayCount = 0; | 850 | int byteArrayCount = 0; |
851 | int sequenceID = 0; | 851 | int sequenceID = 0; |
852 | int blockmeters = 4 * (int) Constants.RegionSize/(int)Constants.TerrainPatchSize; | ||
852 | 853 | ||
853 | for (int y = 0; y < 64; y++) | 854 | |
855 | for (int y = 0; y < blockmeters; y++) | ||
854 | { | 856 | { |
855 | for (int x = 0; x < 64; x++) | 857 | for (int x = 0; x < blockmeters; x++) |
856 | { | 858 | { |
857 | byte tempByte = 0; //This represents the byte for the current 4x4 | 859 | byte tempByte = 0; //This represents the byte for the current 4x4 |
858 | 860 | ||