aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
diff options
context:
space:
mode:
authorBrian McBee2007-11-20 04:54:19 +0000
committerBrian McBee2007-11-20 04:54:19 +0000
commitc6619b6f7da21175136a74638f5a09e85dc4ea78 (patch)
tree6090094d976af3aa860fbbfbbf93917869c8ae4e /OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
parent*Huge* structural changes in ODE/OdePrim to get all of the calls in threadloc... (diff)
downloadopensim-SC_OLD-c6619b6f7da21175136a74638f5a09e85dc4ea78.zip
opensim-SC_OLD-c6619b6f7da21175136a74638f5a09e85dc4ea78.tar.gz
opensim-SC_OLD-c6619b6f7da21175136a74638f5a09e85dc4ea78.tar.bz2
opensim-SC_OLD-c6619b6f7da21175136a74638f5a09e85dc4ea78.tar.xz
Reverting my POS changes. I need to think this through a bit more.
Diffstat (limited to 'OpenSim/Region/Physics/POSPlugin/POSPlugin.cs')
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPlugin.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
index 15b3415..802b7b2 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
@@ -181,8 +181,9 @@ namespace OpenSim.Region.Physics.POSPlugin
181 } 181 }
182 182
183 bool forcedZ = false; 183 bool forcedZ = false;
184 184 character.Position.X = character.Position.X + (character._target_velocity.X * timeStep);
185 float terrainheight = _heightMap[(int)(character.Position.Y + (character._target_velocity.Y * timeStep)) * 256 + (int)(character.Position.X + (character._target_velocity.X * timeStep))]; 185 character.Position.Y = character.Position.Y + (character._target_velocity.Y * timeStep);
186 float terrainheight = _heightMap[(int)character.Position.Y * 256 + (int)character.Position.X];
186 if (character.Position.Z + (character._target_velocity.Z * timeStep) < terrainheight + 2) 187 if (character.Position.Z + (character._target_velocity.Z * timeStep) < terrainheight + 2)
187 { 188 {
188 character.Position.Z = terrainheight + 1.0f; 189 character.Position.Z = terrainheight + 1.0f;
@@ -202,24 +203,23 @@ namespace OpenSim.Region.Physics.POSPlugin
202 character.Position.Z = oldposZ; // first try Z axis 203 character.Position.Z = oldposZ; // first try Z axis
203 if (check_all_prims(character)) 204 if (check_all_prims(character))
204 { 205 {
205 character.Position.Z = oldposZ + 0.5f; // try harder 206 character.Position.Z = oldposZ + 0.4f; // try harder
207 if (check_all_prims(character))
208 {
209 character.Position.X = oldposX;
210 character.Position.Y = oldposY;
211 character.Position.Z = oldposZ;
212 }
213 else
214 {
215 forcedZ = true;
216 }
206 } 217 }
207 else 218 else
208 { 219 {
209 forcedZ = true; 220 forcedZ = true;
210 } 221 }
211 } 222 }
212 character.Position.X = character.Position.X + (character._target_velocity.X * timeStep);
213 if (check_all_prims(character))
214 {
215 character.Position.X = oldposX;
216 }
217 character.Position.Y = character.Position.Y + (character._target_velocity.Y * timeStep);
218 if (check_all_prims(character))
219 {
220 character.Position.Y = oldposY;
221 }
222
223 223
224 if (character.Position.Y < 0) 224 if (character.Position.Y < 0)
225 { 225 {