aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorBrian McBee2007-11-20 05:59:35 +0000
committerBrian McBee2007-11-20 05:59:35 +0000
commit5d786056fb6675d5664f0d775105b4a8275878e7 (patch)
treebf9fa86da4dcc5919e4c56c7190f0ef1b98f5bbf /OpenSim/Region
parentNew improved POS! With slippery avatars and extra calculations. (diff)
downloadopensim-SC_OLD-5d786056fb6675d5664f0d775105b4a8275878e7.zip
opensim-SC_OLD-5d786056fb6675d5664f0d775105b4a8275878e7.tar.gz
opensim-SC_OLD-5d786056fb6675d5664f0d775105b4a8275878e7.tar.bz2
opensim-SC_OLD-5d786056fb6675d5664f0d775105b4a8275878e7.tar.xz
per chi11ken: adding check for out-of-bounds avatars in POS
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPlugin.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
index 6b8db5f..b20dc87 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
@@ -254,6 +254,24 @@ namespace OpenSim.Region.Physics.POSPlugin
254 } 254 }
255 } 255 }
256 256
257 if (character.Position.Y < 0)
258 {
259 character.Position.Y = 0.1F;
260 }
261 else if (character.Position.Y >= 256)
262 {
263 character.Position.Y = 255.9F;
264 }
265
266 if (character.Position.X < 0)
267 {
268 character.Position.X = 0.1F;
269 }
270 else if (character.Position.X >= 256)
271 {
272 character.Position.X = 255.9F;
273 }
274
257 character._velocity.X = (character.Position.X - oldposX) / timeStep; 275 character._velocity.X = (character.Position.X - oldposX) / timeStep;
258 character._velocity.Y = (character.Position.Y - oldposY) / timeStep; 276 character._velocity.Y = (character.Position.Y - oldposY) / timeStep;
259 277