From b5463e042cb9ef8c483ec7f3cae3b5895c03d010 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Tue, 11 Jan 2011 12:20:06 -0800 Subject: [PATCH] Workaround for NaN in rotation update from PSA to CM. --- .../RegionSync/RegionSyncModule/RegionSyncServerModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncServerModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncServerModule.cs index d23098e3c9..d408e87202 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncServerModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/RegionSyncServerModule.cs @@ -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);