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.
---
.../Environment/Modules/InterGrid/OpenGridProtocolModule.cs | 3 ---
.../Region/Environment/Scenes/SceneCommunicationService.cs | 12 +++++++++---
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 5 +++++
3 files changed, 14 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Region/Environment')
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index 6d06bb5..2604b3f 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -322,9 +322,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
useragent.LoginTime=Util.UnixTimeSinceEpoch();
useragent.LogoutTime = 0;
useragent.Position=agentData.startpos;
- useragent.PositionX=agentData.startpos.X;
- useragent.PositionY=agentData.startpos.Y;
- useragent.PositionZ=agentData.startpos.Z;
useragent.Region=reg.originRegionID;
useragent.SecureSessionID=agentData.SecureSessionID;
useragent.SessionID = agentData.SessionID;
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