replace my hack by others hack

This commit is contained in:
UbitUmarov
2019-01-01 12:06:29 +00:00
parent 813fda90da
commit 02492f7b15
10 changed files with 71 additions and 62 deletions

View File

@@ -374,7 +374,12 @@ namespace OpenSim.Region.ClientStack.Linden
List<string> validCaps = new List<string>();
foreach (OSD c in capsRequested)
validCaps.Add(c.AsString());
{
string cstr = c.AsString();
if(cstr == "ObjectAnimation")
m_HostCapsObj.Flags |= Caps.CapsFlags.ObjectAnim;
validCaps.Add(cstr);
}
string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps));

View File

@@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#pragma warning restore 0414
private const uint MaxTransferBytesPerPacket = 600;
public bool DoObjectAnimations { get; set; }
public bool SupportObjectAnimations { get; set; }
/// <value>
/// Maintain a record of all the objects killed. This allows us to stop an update being sent from the
@@ -3917,7 +3917,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId)
{
// m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name);
if(!DoObjectAnimations)
if(!SupportObjectAnimations)
return;
ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation);
@@ -4330,7 +4330,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (update.Entity is SceneObjectPart)
{
if (DoObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations))
if (SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations))
{
SceneObjectPart sop = (SceneObjectPart)update.Entity;
if ( sop.Animations != null)

View File

@@ -1919,38 +1919,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
{
IClientAPI client = null;
bool createNew = false;
// We currently synchronize this code across the whole scene to avoid issues such as
// http://opensimulator.org/mantis/view.php?id=5365 However, once locking per agent circuit can be done
// consistently, this lock could probably be removed.
lock (this)
{
if (!Scene.TryGetClient(agentID, out client))
if (Scene.TryGetClient(agentID, out client))
{
createNew = true;
}
else
{
if (client.SceneAgent == null)
{
Scene.CloseAgent(agentID, true);
createNew = true;
}
if (client.SceneAgent != null)
return client;
Scene.CloseAgent(agentID, true);
}
if (createNew)
{
LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
client.OnLogout += LogoutHandler;
client.DebugPacketLevel = DefaultClientPacketDebugLevel;
client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
client.OnLogout += LogoutHandler;
client.DebugPacketLevel = DefaultClientPacketDebugLevel;
((LLClientView)client).DisableFacelights = m_disableFacelights;
((LLClientView)client).DisableFacelights = m_disableFacelights;
client.Start();
}
client.Start();
}
return client;