diff options
author | Tom Grimshaw | 2010-06-19 07:00:01 -0700 |
---|---|---|
committer | Tom Grimshaw | 2010-06-19 07:00:01 -0700 |
commit | 6d8da699b275cf9a52214de3b22256533b7bb784 (patch) | |
tree | 81ec6d57c2405c5918d60c0d009b9d13a2ca3223 | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-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.cs | 10 |
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."); |