diff options
author | dahlia | 2015-02-16 19:06:01 -0800 |
---|---|---|
committer | dahlia | 2015-02-16 19:06:01 -0800 |
commit | 2700b096bc5d78ffd94a907475112a4babd3a489 (patch) | |
tree | 7c1660599e3dc8931e118152f41edbfada30499f /OpenSim/Region/Framework | |
parent | BulletSim: bring the BulletSim dll's and so's up to date with (diff) | |
download | opensim-SC_OLD-2700b096bc5d78ffd94a907475112a4babd3a489.zip opensim-SC_OLD-2700b096bc5d78ffd94a907475112a4babd3a489.tar.gz opensim-SC_OLD-2700b096bc5d78ffd94a907475112a4babd3a489.tar.bz2 opensim-SC_OLD-2700b096bc5d78ffd94a907475112a4babd3a489.tar.xz |
Filter NaN and Infinity values at SOP AngularVelocity setter
Diffstat (limited to 'OpenSim/Region/Framework')
-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; |