aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTedd Hansen2008-02-24 17:46:28 +0000
committerTedd Hansen2008-02-24 17:46:28 +0000
commit909796f6155e04c33c222234dfa773876ac912a9 (patch)
tree10268b5a2f88521ea11d9e548386b961f189b3a8
parentFixed startup logo size to match a Win CMD window. (diff)
downloadopensim-SC-909796f6155e04c33c222234dfa773876ac912a9.zip
opensim-SC-909796f6155e04c33c222234dfa773876ac912a9.tar.gz
opensim-SC-909796f6155e04c33c222234dfa773876ac912a9.tar.bz2
opensim-SC-909796f6155e04c33c222234dfa773876ac912a9.tar.xz
Added limits to Prim.Position.X/Y/Z (0-255) so that your prims won't wander off into eternity
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
index 091f9d9..08f6009 100644
--- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
@@ -119,6 +119,10 @@ namespace OpenSim.Region.ScriptEngine.Common
119 { 119 {
120 Load(); 120 Load();
121 Position.x += value; 121 Position.x += value;
122 if (Position.x > 255)
123 Position.x = 255;
124 if (Position.x < 0)
125 Position.x = 0;
122 Save(); 126 Save();
123 } 127 }
124 } 128 }
@@ -133,6 +137,10 @@ namespace OpenSim.Region.ScriptEngine.Common
133 { 137 {
134 Load(); 138 Load();
135 Position.y += value; 139 Position.y += value;
140 if (Position.y > 255)
141 Position.y = 255;
142 if (Position.y < 0)
143 Position.y = 0;
136 Save(); 144 Save();
137 } 145 }
138 } 146 }
@@ -147,6 +155,10 @@ namespace OpenSim.Region.ScriptEngine.Common
147 { 155 {
148 Load(); 156 Load();
149 Position.z += value; 157 Position.z += value;
158 if (Position.z > 255)
159 Position.z = 255;
160 if (Position.z < 0)
161 Position.z = 0;
150 Save(); 162 Save();
151 } 163 }
152 } 164 }