mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used when a child agent gets a sit response which should not be fulfilled.
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user