diff options
author | UbitUmarov | 2012-04-27 09:23:20 +0100 |
---|---|---|
committer | UbitUmarov | 2012-04-27 09:23:20 +0100 |
commit | 1c735faceeabc0e2888bdf9b1087a3fa7a9ae094 (patch) | |
tree | 30b88505b0737e8d2aee4e2b08ccc578ce3a5b8c | |
parent | itest (diff) | |
download | opensim-SC_OLD-1c735faceeabc0e2888bdf9b1087a3fa7a9ae094.zip opensim-SC_OLD-1c735faceeabc0e2888bdf9b1087a3fa7a9ae094.tar.gz opensim-SC_OLD-1c735faceeabc0e2888bdf9b1087a3fa7a9ae094.tar.bz2 opensim-SC_OLD-1c735faceeabc0e2888bdf9b1087a3fa7a9ae094.tar.xz |
test
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index 342b7b3..36440b1 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | |||
@@ -379,24 +379,21 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
379 | get { return _position; } | 379 | get { return _position; } |
380 | set | 380 | set |
381 | { | 381 | { |
382 | if (Body == IntPtr.Zero || Shell == IntPtr.Zero) | 382 | if (value.IsFinite()) |
383 | { | 383 | { |
384 | if (value.IsFinite()) | 384 | if (value.Z > 9999999f) |
385 | { | 385 | { |
386 | if (value.Z > 9999999f) | 386 | value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5; |
387 | { | ||
388 | value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5; | ||
389 | } | ||
390 | if (value.Z < -100f) | ||
391 | { | ||
392 | value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5; | ||
393 | } | ||
394 | AddChange(changes.Position, value); | ||
395 | } | 387 | } |
396 | else | 388 | if (value.Z < -100f) |
397 | { | 389 | { |
398 | m_log.Warn("[PHYSICS]: Got a NaN Position from Scene on a Character"); | 390 | value.Z = _parent_scene.GetTerrainHeightAtXY(127, 127) + 5; |
399 | } | 391 | } |
392 | AddChange(changes.Position, value); | ||
393 | } | ||
394 | else | ||
395 | { | ||
396 | m_log.Warn("[PHYSICS]: Got a NaN Position from Scene on a Character"); | ||
400 | } | 397 | } |
401 | } | 398 | } |
402 | } | 399 | } |
@@ -1248,6 +1245,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1248 | d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z); | 1245 | d.BodySetPosition(Body, newPos.X, newPos.Y, newPos.Z); |
1249 | _position = newPos; | 1246 | _position = newPos; |
1250 | m_pidControllerActive = true; | 1247 | m_pidControllerActive = true; |
1248 | m_log.DebugFormat("[ode character new position] {0}", newPos); | ||
1251 | } | 1249 | } |
1252 | 1250 | ||
1253 | private void changeOrientation(Quaternion newOri) | 1251 | private void changeOrientation(Quaternion newOri) |