aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSPlugin.cs18
1 files changed, 8 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
index 572ffdd..4a44438 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs
@@ -179,7 +179,15 @@ namespace OpenSim.Region.Physics.POSPlugin
179 179
180 bool forcedZ = false; 180 bool forcedZ = false;
181 character.Position.X = character.Position.X + (character._target_velocity.X * timeStep); 181 character.Position.X = character.Position.X + (character._target_velocity.X * timeStep);
182 if (check_all_prims(character))
183 {
184 character.Position.X = oldposX;
185 }
182 character.Position.Y = character.Position.Y + (character._target_velocity.Y * timeStep); 186 character.Position.Y = character.Position.Y + (character._target_velocity.Y * timeStep);
187 if (check_all_prims(character))
188 {
189 character.Position.Y = oldposY;
190 }
183 float terrainheight = _heightMap[(int)character.Position.Y * 256 + (int)character.Position.X]; 191 float terrainheight = _heightMap[(int)character.Position.Y * 256 + (int)character.Position.X];
184 if (character.Position.Z + (character._target_velocity.Z * timeStep) < terrainheight + 2) 192 if (character.Position.Z + (character._target_velocity.Z * timeStep) < terrainheight + 2)
185 { 193 {
@@ -201,16 +209,6 @@ namespace OpenSim.Region.Physics.POSPlugin
201 if (check_all_prims(character)) 209 if (check_all_prims(character))
202 { 210 {
203 character.Position.Z = oldposZ + 0.4f; // try harder 211 character.Position.Z = oldposZ + 0.4f; // try harder
204 if (check_all_prims(character))
205 {
206 character.Position.X = oldposX;
207 character.Position.Y = oldposY;
208 character.Position.Z = oldposZ;
209 }
210 else
211 {
212 forcedZ = true;
213 }
214 } 212 }
215 else 213 else
216 { 214 {