Added limits to Prim.Position.X/Y/Z (0-255) so that your prims won't wander off into eternity

0.6.0-stable
Tedd Hansen 2008-02-24 17:46:28 +00:00
parent 4f4dfa8e82
commit 909796f615
1 changed files with 12 additions and 0 deletions

View File

@ -119,6 +119,10 @@ namespace OpenSim.Region.ScriptEngine.Common
{
Load();
Position.x += value;
if (Position.x > 255)
Position.x = 255;
if (Position.x < 0)
Position.x = 0;
Save();
}
}
@ -133,6 +137,10 @@ namespace OpenSim.Region.ScriptEngine.Common
{
Load();
Position.y += value;
if (Position.y > 255)
Position.y = 255;
if (Position.y < 0)
Position.y = 0;
Save();
}
}
@ -147,6 +155,10 @@ namespace OpenSim.Region.ScriptEngine.Common
{
Load();
Position.z += value;
if (Position.z > 255)
Position.z = 255;
if (Position.z < 0)
Position.z = 0;
Save();
}
}