aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
diff options
context:
space:
mode:
authorBrian McBee2007-08-03 21:54:21 +0000
committerBrian McBee2007-08-03 21:54:21 +0000
commit6cb3833021a15e1f62ed198de8845b7332a2152b (patch)
tree2d8a8498f861a848f91e3082fa11aa9c22c8433b /OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
parent* a very small first step with shape wrappers (diff)
downloadopensim-SC_OLD-6cb3833021a15e1f62ed198de8845b7332a2152b.zip
opensim-SC_OLD-6cb3833021a15e1f62ed198de8845b7332a2152b.tar.gz
opensim-SC_OLD-6cb3833021a15e1f62ed198de8845b7332a2152b.tar.bz2
opensim-SC_OLD-6cb3833021a15e1f62ed198de8845b7332a2152b.tar.xz
OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs, OpenSim/Region/Environment/Scenes/ScenePresence.cs
Fix for array out-of-bounds error in basicphysics.
Diffstat (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index b722fdf..6732d98 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -103,20 +103,20 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
103 actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); 103 actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep);
104 if (actor.Position.Y < 0) 104 if (actor.Position.Y < 0)
105 { 105 {
106 actor.Position.Y = 0; 106 actor.Position.Y = 0.1F;
107 } 107 }
108 else if (actor.Position.Y > 256) 108 else if (actor.Position.Y >= 256)
109 { 109 {
110 actor.Position.Y = 256; 110 actor.Position.Y = 255.9F;
111 } 111 }
112 112
113 if (actor.Position.X < 0) 113 if (actor.Position.X < 0)
114 { 114 {
115 actor.Position.X = 0; 115 actor.Position.X = 0.1F;
116 } 116 }
117 else if (actor.Position.X > 256) 117 else if (actor.Position.X > 256)
118 { 118 {
119 actor.Position.X = 256; 119 actor.Position.X = 255.9F;
120 } 120 }
121 121
122 float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; 122 float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f;