diff options
author | Tedd Hansen | 2008-02-24 17:46:28 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-02-24 17:46:28 +0000 |
commit | 909796f6155e04c33c222234dfa773876ac912a9 (patch) | |
tree | 10268b5a2f88521ea11d9e548386b961f189b3a8 /OpenSim/Region/ScriptEngine/Common | |
parent | Fixed startup logo size to match a Win CMD window. (diff) | |
download | opensim-SC_OLD-909796f6155e04c33c222234dfa773876ac912a9.zip opensim-SC_OLD-909796f6155e04c33c222234dfa773876ac912a9.tar.gz opensim-SC_OLD-909796f6155e04c33c222234dfa773876ac912a9.tar.bz2 opensim-SC_OLD-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 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 12 |
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 | } |