aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-10-23 14:22:20 +0000
committerAdam Frisby2007-10-23 14:22:20 +0000
commit42318dc15afd238864b0e2075456fae32ad0a681 (patch)
tree3ac2612f86b0042a78515f80542e4f529720398c
parent* Added "create-region" console command. Syntax: create-region <name> <region... (diff)
downloadopensim-SC-42318dc15afd238864b0e2075456fae32ad0a681.zip
opensim-SC-42318dc15afd238864b0e2075456fae32ad0a681.tar.gz
opensim-SC-42318dc15afd238864b0e2075456fae32ad0a681.tar.bz2
opensim-SC-42318dc15afd238864b0e2075456fae32ad0a681.tar.xz
* Fix for issue#514 - Sim crash when editing near terrain edge.
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index ab2ad8d..ac126c9 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -245,8 +245,20 @@ namespace OpenSim.Region.Environment
245 if (GenericEstatePermission(user)) 245 if (GenericEstatePermission(user))
246 permission = true; 246 permission = true;
247 247
248 float X = position.X;
249 float Y = position.Y;
250
251 if (X > 255)
252 X = 255;
253 if (Y > 255)
254 Y = 255;
255 if (X < 0)
256 X = 0;
257 if (Y < 0)
258 Y = 0;
259
248 // Land owner can terraform too 260 // Land owner can terraform too
249 if (GenericParcelPermission(user, m_scene.LandManager.getLandObject(position.X, position.Y))) 261 if (GenericParcelPermission(user, m_scene.LandManager.getLandObject(X, Y)))
250 permission = true; 262 permission = true;
251 263
252 if (!permission) 264 if (!permission)