From 6cb3833021a15e1f62ed198de8845b7332a2152b Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Fri, 3 Aug 2007 21:54:21 +0000 Subject: OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs, OpenSim/Region/Environment/Scenes/ScenePresence.cs Fix for array out-of-bounds error in basicphysics. --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 7b97080..6c1e835 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -550,7 +550,7 @@ namespace OpenSim.Region.Environment.Scenes LLVector3 pos2 = this.Pos; LLVector3 vel = this.Velocity; - float timeStep = 0.2f; + float timeStep = 0.1f; pos2.X = pos2.X + (vel.X * timeStep); pos2.Y = pos2.Y + (vel.Y * timeStep); pos2.Z = pos2.Z + (vel.Z * timeStep); @@ -576,25 +576,25 @@ namespace OpenSim.Region.Environment.Scenes uint neighbourx = this.m_regionInfo.RegionLocX; uint neighboury = this.m_regionInfo.RegionLocY; - if (pos.X < 3) + if (pos.X < 1) { neighbourx -= 1; - newpos.X = 254; + newpos.X = 255.9F; } - if (pos.X > 252) + if (pos.X > 255) { neighbourx += 1; - newpos.X = 1; + newpos.X = 0.1F; } - if (pos.Y < 3) + if (pos.Y < 1) { neighboury -= 1; - newpos.Y = 254; + newpos.Y = 255.9F; } - if (pos.Y > 252) + if (pos.Y > 255) { neighboury += 1; - newpos.Y = 1; + newpos.Y = 0.1F; } LLVector3 vel = this.m_velocity; -- cgit v1.1