Workaround for NaN in rotation update from PSA to CM.

dsg
Dan Lake 2011-01-11 12:20:06 -08:00
parent ed380196ea
commit b5463e042c
1 changed files with 4 additions and 1 deletions

View File

@ -308,7 +308,10 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
data["vel"] = OSD.FromVector3(presence.Velocity);
else
data["vel"] = OSD.FromVector3(Vector3.Zero);
data["rot"] = OSD.FromQuaternion(presence.Rotation);
if(System.Single.IsNaN(presence.Rotation.X))
data["rot"] = OSD.FromQuaternion(Quaternion.Identity);
else
data["rot"] = OSD.FromQuaternion(presence.Rotation);
data["fly"] = OSD.FromBoolean(presence.Flying);
data["flags"] = OSD.FromUInteger((uint)presence.AgentControlFlags);
data["anim"] = OSD.FromString(presence.Animator.CurrentMovementAnimation);