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

afrisby
Adam Frisby 2007-10-23 14:22:20 +00:00
parent 0c9933fd0f
commit 42318dc15a
1 changed files with 13 additions and 1 deletions

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)