diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index af7121d..6e56f60 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -959,7 +959,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
959 | } | 959 | } |
960 | set | 960 | set |
961 | { | 961 | { |
962 | m_angularVelocity = value; | 962 | if (float.IsNaN(value.X) || float.IsNaN(value.Y) || float.IsNaN(value.Z) |
963 | || float.IsInfinity(value.X) || float.IsInfinity(value.Y) || float.IsInfinity(value.Z)) | ||
964 | m_angularVelocity = Vector3.Zero; | ||
965 | else | ||
966 | m_angularVelocity = value; | ||
967 | |||
963 | PhysicsActor actor = PhysActor; | 968 | PhysicsActor actor = PhysActor; |
964 | if ((actor != null) && actor.IsPhysical) | 969 | if ((actor != null) && actor.IsPhysical) |
965 | actor.RotationalVelocity = m_angularVelocity; | 970 | actor.RotationalVelocity = m_angularVelocity; |