aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/POSPlugin/POSPlugin.cs')
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPlugin.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
index 7652934..3bd25f6 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
@@ -203,21 +203,21 @@ namespace OpenSim.Region.Physics.POSPlugin
203 { 203 {
204 character.Position.Y = 0.1F; 204 character.Position.Y = 0.1F;
205 } 205 }
206 else if (character.Position.Y >= 256) 206 else if (character.Position.Y >= Constants.RegionSize)
207 { 207 {
208 character.Position.Y = 255.9F; 208 character.Position.Y = Constants.RegionSize - 0.1f;
209 } 209 }
210 210
211 if (character.Position.X < 0) 211 if (character.Position.X < 0)
212 { 212 {
213 character.Position.X = 0.1F; 213 character.Position.X = 0.1F;
214 } 214 }
215 else if (character.Position.X >= 256) 215 else if (character.Position.X >= Constants.RegionSize)
216 { 216 {
217 character.Position.X = 255.9F; 217 character.Position.X = Constants.RegionSize - 0.1f;
218 } 218 }
219 219
220 float terrainheight = _heightMap[(int) character.Position.Y*256 + (int) character.Position.X]; 220 float terrainheight = _heightMap[(int)character.Position.Y * Constants.RegionSize + (int)character.Position.X];
221 if (character.Position.Z + (character._target_velocity.Z*timeStep) < terrainheight + 2) 221 if (character.Position.Z + (character._target_velocity.Z*timeStep) < terrainheight + 2)
222 { 222 {
223 character.Position.Z = terrainheight + 1.0f; 223 character.Position.Z = terrainheight + 1.0f;
@@ -269,18 +269,18 @@ namespace OpenSim.Region.Physics.POSPlugin
269 { 269 {
270 character.Position.Y = 0.1F; 270 character.Position.Y = 0.1F;
271 } 271 }
272 else if (character.Position.Y >= 256) 272 else if (character.Position.Y >= Constants.RegionSize)
273 { 273 {
274 character.Position.Y = 255.9F; 274 character.Position.Y = Constants.RegionSize - 0.1f;
275 } 275 }
276 276
277 if (character.Position.X < 0) 277 if (character.Position.X < 0)
278 { 278 {
279 character.Position.X = 0.1F; 279 character.Position.X = 0.1F;
280 } 280 }
281 else if (character.Position.X >= 256) 281 else if (character.Position.X >= Constants.RegionSize)
282 { 282 {
283 character.Position.X = 255.9F; 283 character.Position.X = Constants.RegionSize - 0.1f;
284 } 284 }
285 285
286 character._velocity.X = (character.Position.X - oldposX)/timeStep; 286 character._velocity.X = (character.Position.X - oldposX)/timeStep;