mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Filter NaN and Infinity values at SOP AngularVelocity setter
This commit is contained in:
@@ -959,7 +959,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
set
|
||||
{
|
||||
m_angularVelocity = value;
|
||||
if (float.IsNaN(value.X) || float.IsNaN(value.Y) || float.IsNaN(value.Z)
|
||||
|| float.IsInfinity(value.X) || float.IsInfinity(value.Y) || float.IsInfinity(value.Z))
|
||||
m_angularVelocity = Vector3.Zero;
|
||||
else
|
||||
m_angularVelocity = value;
|
||||
|
||||
PhysicsActor actor = PhysActor;
|
||||
if ((actor != null) && actor.IsPhysical)
|
||||
actor.RotationalVelocity = m_angularVelocity;
|
||||
|
||||
Reference in New Issue
Block a user