diff options
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; |