From 52a4c4d82f9c5b808e6c61fd51c1c70e42865565 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 12 Sep 2008 20:12:03 +0000 Subject: * Check in first part of http://opensimulator.org/mantis/view.php?id=2073 * This patch aims to introduce look at direction persistence between logins. It won't be active until the second part of the patch is committed in about two weeks time. At this point, region servers that haven't upgraded past this revision may run into problems * This checkin upgrades the user database. As always, we recommend you have backups in case something goes wrong. * Many thanks to tyre for this patch. --- .../Region/Environment/Scenes/SceneCommunicationService.cs | 12 +++++++++--- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 5 +++++ 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 9ff35c0..887a8da 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs @@ -579,7 +579,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// public virtual void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, Vector3 position, - Vector3 lookAt, uint flags) + Vector3 lookAt, uint teleportFlags) { bool destRegionUp = false; @@ -604,7 +604,7 @@ namespace OpenSim.Region.Environment.Scenes position.Z = newPosZ; } avatar.ControllingClient.SendTeleportLocationStart(); - avatar.ControllingClient.SendLocalTeleport(position, lookAt, flags); + avatar.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); avatar.Teleport(position); } else @@ -662,7 +662,7 @@ namespace OpenSim.Region.Environment.Scenes m_log.DebugFormat( "[CAPS]: Sending new CAPS seed url {0} to client {1}", capsPath, avatar.UUID); - avatar.ControllingClient.SendRegionTeleport(reg.RegionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4), + avatar.ControllingClient.SendRegionTeleport(reg.RegionHandle, 13, reg.ExternalEndPoint, 4, teleportFlags, capsPath); avatar.MakeChildAgent(); Thread.Sleep(5000); @@ -716,6 +716,12 @@ namespace OpenSim.Region.Environment.Scenes return m_commsProvider.GridService.GetGridSettings(); } + public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat) + { + m_commsProvider.LogOffUser(userid, regionid, regionhandle, position, lookat); + } + + // deprecated as of 2008-08-27 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz) { m_commsProvider.LogOffUser(userid, regionid, regionhandle, posx, posy, posz); diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 1a4b0c9..abda63e 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -241,6 +241,11 @@ namespace OpenSim.Region.Environment.Scenes get { return m_CameraCenter; } } + public Vector3 Lookat + { + get { return Util.GetNormalizedVector(new Vector3(m_CameraAtAxis.X, m_CameraAtAxis.Y, 0)); } + } + private readonly string m_firstname; public string Firstname -- cgit v1.1