* Fix for issue#514 - Sim crash when editing near terrain edge.

This commit is contained in:
Adam Frisby
2007-10-23 14:22:20 +00:00
parent 0c9933fd0f
commit 42318dc15a

View File

@@ -245,8 +245,20 @@ namespace OpenSim.Region.Environment
if (GenericEstatePermission(user))
permission = true;
float X = position.X;
float Y = position.Y;
if (X > 255)
X = 255;
if (Y > 255)
Y = 255;
if (X < 0)
X = 0;
if (Y < 0)
Y = 0;
// Land owner can terraform too
if (GenericParcelPermission(user, m_scene.LandManager.getLandObject(position.X, position.Y)))
if (GenericParcelPermission(user, m_scene.LandManager.getLandObject(X, Y)))
permission = true;
if (!permission)