aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTom Grimshaw2010-06-19 07:00:01 -0700
committerTom Grimshaw2010-06-19 07:00:01 -0700
commit6d8da699b275cf9a52214de3b22256533b7bb784 (patch)
tree81ec6d57c2405c5918d60c0d009b9d13a2ca3223 /OpenSim
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC-6d8da699b275cf9a52214de3b22256533b7bb784.zip
opensim-SC-6d8da699b275cf9a52214de3b22256533b7bb784.tar.gz
opensim-SC-6d8da699b275cf9a52214de3b22256533b7bb784.tar.bz2
opensim-SC-6d8da699b275cf9a52214de3b22256533b7bb784.tar.xz
Add "AvatarHeight/2" to the Home Position when set to avoid having the avatar fall through the ground when they TP home.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 97de147..dc58d84 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3235,6 +3235,16 @@ namespace OpenSim.Region.Framework.Scenes
3235 /// <param name="flags"></param> 3235 /// <param name="flags"></param>
3236 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags) 3236 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags)
3237 { 3237 {
3238 //Add half the avatar's height so that the user doesn't fall through prims
3239 ScenePresence presence;
3240 if (TryGetScenePresence(remoteClient.AgentId, out presence))
3241 {
3242 if (presence.Appearance != null)
3243 {
3244 position.Z = position.Z + (presence.Appearance.AvatarHeight / 2);
3245 }
3246 }
3247
3238 if (GridUserService != null && GridUserService.SetHome(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt)) 3248 if (GridUserService != null && GridUserService.SetHome(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt))
3239 // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot. 3249 // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.
3240 m_dialogModule.SendAlertToUser(remoteClient, "Home position set."); 3250 m_dialogModule.SendAlertToUser(remoteClient, "Home position set.");