aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-04-20 02:50:36 +0100
committerJustin Clark-Casey (justincc)2012-04-20 02:50:36 +0100
commit2b98e2f106f8a017cbaefcb2c21cc1bc9addde81 (patch)
treee4e0659fc39d3d8ee12c7883cef7e6f758375d7a /OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
parentFix a logic error in app domain creation (diff)
downloadopensim-SC_OLD-2b98e2f106f8a017cbaefcb2c21cc1bc9addde81.zip
opensim-SC_OLD-2b98e2f106f8a017cbaefcb2c21cc1bc9addde81.tar.gz
opensim-SC_OLD-2b98e2f106f8a017cbaefcb2c21cc1bc9addde81.tar.bz2
opensim-SC_OLD-2b98e2f106f8a017cbaefcb2c21cc1bc9addde81.tar.xz
Stop teleports from dropping tall avatars through or embedding them in the floor when lured by short avatars.
This involves giving the ceiling of the Z-component in a lure rather than the floor. Ideally we would give the exact float compensating for relative avatar height but it looks like that isn't possible with the parcel id format used in lures
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
index d295384..2d4cffd 100644
--- a/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Lure/LureModule.cs
@@ -151,11 +151,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Lure
151 Scene scene = (Scene)(client.Scene); 151 Scene scene = (Scene)(client.Scene);
152 ScenePresence presence = scene.GetScenePresence(client.AgentId); 152 ScenePresence presence = scene.GetScenePresence(client.AgentId);
153 153
154 // Round up Z co-ordinate rather than round-down by casting. This stops tall avatars from being given
155 // a teleport Z co-ordinate by short avatars that drops them through or embeds them in thin floors on
156 // arrival.
157 //
158 // Ideally we would give the exact float position adjusting for the relative height of the two avatars
159 // but it looks like a float component isn't possible with a parcel ID.
154 UUID dest = Util.BuildFakeParcelID( 160 UUID dest = Util.BuildFakeParcelID(
155 scene.RegionInfo.RegionHandle, 161 scene.RegionInfo.RegionHandle,
156 (uint)presence.AbsolutePosition.X, 162 (uint)presence.AbsolutePosition.X,
157 (uint)presence.AbsolutePosition.Y, 163 (uint)presence.AbsolutePosition.Y,
158 (uint)presence.AbsolutePosition.Z); 164 (uint)Math.Ceiling(presence.AbsolutePosition.Z));
159 165
160 m_log.DebugFormat("TP invite with message {0}", message); 166 m_log.DebugFormat("TP invite with message {0}", message);
161 167