diff options
author | Teravus Ovares | 2009-04-07 16:41:07 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-04-07 16:41:07 +0000 |
commit | b326b55bcd7b794cb90c0df9337cc817db58f9a2 (patch) | |
tree | cbe83e72a67749f2c1cf24750dbbd42cdf54bfcb /OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |
parent | * Added a routine to check if a PhysicsVector and Quaternion is finite (diff) | |
download | opensim-SC_OLD-b326b55bcd7b794cb90c0df9337cc817db58f9a2.zip opensim-SC_OLD-b326b55bcd7b794cb90c0df9337cc817db58f9a2.tar.gz opensim-SC_OLD-b326b55bcd7b794cb90c0df9337cc817db58f9a2.tar.bz2 opensim-SC_OLD-b326b55bcd7b794cb90c0df9337cc817db58f9a2.tar.xz |
* Added finite testing to the character and object constructor
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODECharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index c37b632..c160cda 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -133,11 +133,24 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
133 | // ode = dode; | 133 | // ode = dode; |
134 | _velocity = new PhysicsVector(); | 134 | _velocity = new PhysicsVector(); |
135 | _target_velocity = new PhysicsVector(); | 135 | _target_velocity = new PhysicsVector(); |
136 | _position = pos; | ||
137 | 136 | ||
138 | m_taintPosition.X = pos.X; | 137 | |
139 | m_taintPosition.Y = pos.Y; | 138 | if (PhysicsVector.isFinite(pos)) |
140 | m_taintPosition.Z = pos.Z; | 139 | { |
140 | _position = pos; | ||
141 | m_taintPosition.X = pos.X; | ||
142 | m_taintPosition.Y = pos.Y; | ||
143 | m_taintPosition.Z = pos.Z; | ||
144 | } | ||
145 | else | ||
146 | { | ||
147 | _position = new PhysicsVector(128,128,parent_scene.GetTerrainHeightAtXY(128,128) + 10); | ||
148 | m_taintPosition.X = _position.X; | ||
149 | m_taintPosition.Y = _position.Y; | ||
150 | m_taintPosition.Z = _position.Z; | ||
151 | m_log.Warn("[PHYSICS]: Got NaN Position on Character Create"); | ||
152 | } | ||
153 | |||
141 | 154 | ||
142 | _acceleration = new PhysicsVector(); | 155 | _acceleration = new PhysicsVector(); |
143 | _parent_scene = parent_scene; | 156 | _parent_scene = parent_scene; |