From 386a13d5d63b32c7c332e7526cdd143e649d7c18 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 28 Aug 2016 14:59:02 +0100 Subject: mantis: rotate avatar to lookAt o login/teleports. Some cases may still be wrong --- .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 58f3dde..71a0e52 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -478,9 +478,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); sp.ControllingClient.SendTeleportStart(teleportFlags); + lookAt.Z = 0f; + + if(Math.Abs(lookAt.X) < 0.01f && Math.Abs(lookAt.Y) < 0.01f) + { + lookAt.X = 1.0f; + lookAt.Y = 0; + } sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); sp.TeleportFlags = (Constants.TeleportFlags)teleportFlags; + sp.RotateToLookAt(lookAt); sp.Velocity = Vector3.Zero; sp.Teleport(position); -- cgit v1.1