diff options
author | Melanie | 2010-06-12 01:25:25 +0100 |
---|---|---|
committer | Melanie | 2010-06-12 01:25:25 +0100 |
commit | c8ed9724437d9bf1972d4ef3e2b10dd9fa3e7e70 (patch) | |
tree | 0c0e165c75dc520a9788813a1768db3e9f145054 | |
parent | Some people don't use Simian. Make the connector respect that it's disabled (diff) | |
download | opensim-SC-c8ed9724437d9bf1972d4ef3e2b10dd9fa3e7e70.zip opensim-SC-c8ed9724437d9bf1972d4ef3e2b10dd9fa3e7e70.tar.gz opensim-SC-c8ed9724437d9bf1972d4ef3e2b10dd9fa3e7e70.tar.bz2 opensim-SC-c8ed9724437d9bf1972d4ef3e2b10dd9fa3e7e70.tar.xz |
Move "StopFlying()" into LLSpace. Try to reinstate the carefully crafted packet
we used to send before slimupdates and explicitly send it
Diffstat (limited to '')
10 files changed, 71 insertions, 19 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index d742039..fa1f0d8 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -1711,5 +1711,9 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1711 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1711 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1712 | { | 1712 | { |
1713 | } | 1713 | } |
1714 | |||
1715 | public void StopFlying(ISceneEntity presence) | ||
1716 | { | ||
1717 | } | ||
1714 | } | 1718 | } |
1715 | } | 1719 | } |
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index d725943..cf7aaf2 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs | |||
@@ -1199,6 +1199,10 @@ namespace OpenSim.Client.Sirikata.ClientStack | |||
1199 | { | 1199 | { |
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | public void StopFlying(ISceneEntity presence) | ||
1203 | { | ||
1204 | } | ||
1205 | |||
1202 | #endregion | 1206 | #endregion |
1203 | } | 1207 | } |
1204 | } | 1208 | } |
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 2eec844..ab23484 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | |||
@@ -1214,5 +1214,9 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
1214 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1214 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1215 | { | 1215 | { |
1216 | } | 1216 | } |
1217 | |||
1218 | public void StopFlying(ISceneEntity presence) | ||
1219 | { | ||
1220 | } | ||
1217 | } | 1221 | } |
1218 | } | 1222 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index c1333fc..556a532 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1308,5 +1308,7 @@ namespace OpenSim.Framework | |||
1308 | 1308 | ||
1309 | void SendChangeUserRights(UUID agentID, UUID friendID, int rights); | 1309 | void SendChangeUserRights(UUID agentID, UUID friendID, int rights); |
1310 | void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId); | 1310 | void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId); |
1311 | |||
1312 | void StopFlying(ISceneEntity presence); | ||
1311 | } | 1313 | } |
1312 | } | 1314 | } |
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 | } |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 2681d4f..af9df45 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -1155,5 +1155,9 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
1155 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1155 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1156 | { | 1156 | { |
1157 | } | 1157 | } |
1158 | |||
1159 | public void StopFlying(ISceneEntity presence) | ||
1160 | { | ||
1161 | } | ||
1158 | } | 1162 | } |
1159 | } | 1163 | } |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 15b9446..c1e835e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1015,25 +1015,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1015 | 1015 | ||
1016 | public void StopFlying() | 1016 | public void StopFlying() |
1017 | { | 1017 | { |
1018 | // It turns out to get the agent to stop flying, you have to feed it stop flying velocities | 1018 | ControllingClient.StopFlying(this); |
1019 | // There's no explicit message to send the client to tell it to stop flying.. it relies on the | ||
1020 | // velocity, collision plane and avatar height | ||
1021 | |||
1022 | // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air | ||
1023 | // when the avatar stands up | ||
1024 | |||
1025 | if (m_avHeight != 127.0f) | ||
1026 | { | ||
1027 | AbsolutePosition = AbsolutePosition + new Vector3(0f, 0f, (m_avHeight / 6f)); | ||
1028 | } | ||
1029 | else | ||
1030 | { | ||
1031 | AbsolutePosition = AbsolutePosition + new Vector3(0f, 0f, (1.56f / 6f)); | ||
1032 | } | ||
1033 | |||
1034 | ControllingClient.SendPrimUpdate(this, PrimUpdateFlags.Position); | ||
1035 | //ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | ||
1036 | // AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient))); | ||
1037 | } | 1019 | } |
1038 | 1020 | ||
1039 | public void AddNeighbourRegion(ulong regionHandle, string cap) | 1021 | public void AddNeighbourRegion(ulong regionHandle, string cap) |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 7453eae..754b925 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1680,5 +1680,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1680 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1680 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1681 | { | 1681 | { |
1682 | } | 1682 | } |
1683 | |||
1684 | public void StopFlying(ISceneEntity presence) | ||
1685 | { | ||
1686 | } | ||
1683 | } | 1687 | } |
1684 | } | 1688 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 146b3d6..12d6643 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -1162,5 +1162,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
1162 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1162 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1163 | { | 1163 | { |
1164 | } | 1164 | } |
1165 | |||
1166 | public void StopFlying(ISceneEntity presence) | ||
1167 | { | ||
1168 | } | ||
1165 | } | 1169 | } |
1166 | } | 1170 | } |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 94d9d72..496cfb8 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -1216,5 +1216,9 @@ namespace OpenSim.Tests.Common.Mock | |||
1216 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | 1216 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) |
1217 | { | 1217 | { |
1218 | } | 1218 | } |
1219 | |||
1220 | public void StopFlying(ISceneEntity presence) | ||
1221 | { | ||
1222 | } | ||
1219 | } | 1223 | } |
1220 | } | 1224 | } |