From 1f39a763a5186c7c51e10b5b055394672cc6c54e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 21 Aug 2013 21:35:03 +0100 Subject: Don't allow users to attempt to sit on objects in a child region without going to that region first. If this is attempted, they get a "Try moving closer. Can't sit on object because it is not in the same region as you." message instead, which is the same as current ll grid. Sitting on ground is okay, since viewer navigates avatar to required region first before sitting. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f0d8181..8c51077 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -6651,6 +6651,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } #endregion + if (SceneAgent.IsChildAgent) + { + SendCantSitBecauseChildAgentResponse(); + return true; + } + AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit; if (handlerAgentRequestSit != null) @@ -6675,6 +6681,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } #endregion + if (SceneAgent.IsChildAgent) + { + SendCantSitBecauseChildAgentResponse(); + return true; + } + AgentSit handlerAgentSit = OnAgentSit; if (handlerAgentSit != null) { @@ -6684,6 +6696,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } + /// + /// Used when a child agent gets a sit response which should not be fulfilled. + /// + private void SendCantSitBecauseChildAgentResponse() + { + SendAlertMessage("Try moving closer. Can't sit on object because it is not in the same region as you."); + } + private bool HandleSoundTrigger(IClientAPI sender, Packet Pack) { SoundTriggerPacket soundTriggerPacket = (SoundTriggerPacket)Pack; -- cgit v1.1 From a0c99a7dccbc625fc2c721da480521019260fc7b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 23 Aug 2013 00:03:47 +0100 Subject: minor: remove mono compiler warning from LLClientView --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 8c51077..1b091bf 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -12602,7 +12602,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (p is ScenePresence) { - ScenePresence presence = p as ScenePresence; // It turns out to get the agent to stop flying, you have to feed it stop flying velocities // There's no explicit message to send the client to tell it to stop flying.. it relies on the // velocity, collision plane and avatar height @@ -12610,15 +12609,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air // when the avatar stands up - Vector3 pos = presence.AbsolutePosition; - ImprovedTerseObjectUpdatePacket.ObjectDataBlock block = CreateImprovedTerseBlock(p, false); const float TIME_DILATION = 1.0f; ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); - ImprovedTerseObjectUpdatePacket packet = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket( PacketType.ImprovedTerseObjectUpdate); -- cgit v1.1