aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index fc5bb28..85a3133 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -11843,5 +11843,45 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11843 dialog.Buttons = buttons; 11843 dialog.Buttons = buttons;
11844 OutPacket(dialog, ThrottleOutPacketType.Task); 11844 OutPacket(dialog, ThrottleOutPacketType.Task);
11845 } 11845 }
11846
11847 public void StopFlying(ISceneEntity p)
11848 {
11849 ScenePresence presence = p as ScenePresence;
11850 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities
11851 // There's no explicit message to send the client to tell it to stop flying.. it relies on the
11852 // velocity, collision plane and avatar height
11853
11854 // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air
11855 // when the avatar stands up
11856
11857 Vector3 pos = presence.AbsolutePosition;
11858
11859 if (presence.Appearance.AvatarHeight != 127.0f)
11860 pos += new Vector3(0f, 0f, (presence.Appearance.AvatarHeight / 6f));
11861 else
11862 pos += new Vector3(0f, 0f, (1.56f / 6f));
11863
11864 presence.AbsolutePosition = pos;
11865
11866 ImprovedTerseObjectUpdatePacket.ObjectDataBlock block =
11867 CreateImprovedTerseBlock(p, false);
11868
11869 const float TIME_DILATION = 1.0f;
11870 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
11871
11872
11873 ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
11874 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
11875 packet.RegionData.TimeDilation = timeDilation;
11876 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
11877
11878 packet.ObjectData[0] = block;
11879
11880 OutPacket(packet, ThrottleOutPacketType.Task, true);
11881
11882 //ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
11883 // AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient)));
11884
11885 }
11846 } 11886 }
11847} 11887}