replace my hack by others hack
parent
813fda90da
commit
02492f7b15
|
@ -119,6 +119,17 @@ namespace OpenSim.Framework.Capabilities
|
||||||
get { return m_externalCapsHandlers; }
|
get { return m_externalCapsHandlers; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
public enum CapsFlags:uint
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
SentSeeds = 1,
|
||||||
|
|
||||||
|
ObjectAnim = 0x10
|
||||||
|
}
|
||||||
|
|
||||||
|
public CapsFlags Flags { get; set;}
|
||||||
|
|
||||||
public Caps(IHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
|
public Caps(IHttpServer httpServer, string httpListen, uint httpPort, string capsPath,
|
||||||
UUID agent, string regionName)
|
UUID agent, string regionName)
|
||||||
{
|
{
|
||||||
|
@ -138,12 +149,18 @@ namespace OpenSim.Framework.Capabilities
|
||||||
m_agentID = agent;
|
m_agentID = agent;
|
||||||
m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort);
|
m_capsHandlers = new CapsHandlers(httpServer, httpListen, httpPort);
|
||||||
m_regionName = regionName;
|
m_regionName = regionName;
|
||||||
|
Flags = CapsFlags.None;
|
||||||
m_capsActive.Reset();
|
m_capsActive.Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
~Caps()
|
~Caps()
|
||||||
|
{
|
||||||
|
Flags = CapsFlags.None;
|
||||||
|
if (m_capsActive!= null)
|
||||||
{
|
{
|
||||||
m_capsActive.Dispose();
|
m_capsActive.Dispose();
|
||||||
|
m_capsActive = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -262,6 +279,7 @@ namespace OpenSim.Framework.Capabilities
|
||||||
caps[kvp.Key] = kvp.Value;
|
caps[kvp.Key] = kvp.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Flags |= CapsFlags.SentSeeds;
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -710,7 +710,7 @@ namespace OpenSim.Framework
|
||||||
Vector3 StartPos { get; set; }
|
Vector3 StartPos { get; set; }
|
||||||
|
|
||||||
UUID AgentId { get; }
|
UUID AgentId { get; }
|
||||||
bool DoObjectAnimations { get; set; }
|
bool SupportObjectAnimations { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it
|
/// The scene agent for this client. This will only be set if the client has an agent in a scene (i.e. if it
|
||||||
|
|
|
@ -374,7 +374,12 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
List<string> validCaps = new List<string>();
|
List<string> validCaps = new List<string>();
|
||||||
|
|
||||||
foreach (OSD c in capsRequested)
|
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));
|
string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps));
|
||||||
|
|
||||||
|
|
|
@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
#pragma warning restore 0414
|
#pragma warning restore 0414
|
||||||
private const uint MaxTransferBytesPerPacket = 600;
|
private const uint MaxTransferBytesPerPacket = 600;
|
||||||
|
|
||||||
public bool DoObjectAnimations { get; set; }
|
public bool SupportObjectAnimations { get; set; }
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// Maintain a record of all the objects killed. This allows us to stop an update being sent from the
|
/// 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)
|
public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name);
|
// m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name);
|
||||||
if(!DoObjectAnimations)
|
if(!SupportObjectAnimations)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation);
|
ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation);
|
||||||
|
@ -4330,7 +4330,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
if (update.Entity is SceneObjectPart)
|
if (update.Entity is SceneObjectPart)
|
||||||
{
|
{
|
||||||
if (DoObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations))
|
if (SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations))
|
||||||
{
|
{
|
||||||
SceneObjectPart sop = (SceneObjectPart)update.Entity;
|
SceneObjectPart sop = (SceneObjectPart)update.Entity;
|
||||||
if ( sop.Animations != null)
|
if ( sop.Animations != null)
|
||||||
|
|
|
@ -1919,28 +1919,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
|
uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
|
||||||
{
|
{
|
||||||
IClientAPI client = null;
|
IClientAPI client = null;
|
||||||
bool createNew = false;
|
|
||||||
|
|
||||||
// We currently synchronize this code across the whole scene to avoid issues such as
|
// 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
|
// http://opensimulator.org/mantis/view.php?id=5365 However, once locking per agent circuit can be done
|
||||||
// consistently, this lock could probably be removed.
|
// consistently, this lock could probably be removed.
|
||||||
lock (this)
|
lock (this)
|
||||||
{
|
{
|
||||||
if (!Scene.TryGetClient(agentID, out client))
|
if (Scene.TryGetClient(agentID, out client))
|
||||||
{
|
|
||||||
createNew = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (client.SceneAgent == null)
|
|
||||||
{
|
{
|
||||||
|
if (client.SceneAgent != null)
|
||||||
|
return client;
|
||||||
Scene.CloseAgent(agentID, true);
|
Scene.CloseAgent(agentID, true);
|
||||||
createNew = 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 = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
|
||||||
|
@ -1951,7 +1942,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
client.Start();
|
client.Start();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3111,12 +3111,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_LastLogin = Util.EnvironmentTickCount();
|
m_LastLogin = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
//HACK only send object animations to fs beta for now
|
|
||||||
string viewername = Util.GetViewerName(aCircuit);
|
|
||||||
if(sp != null && viewername.StartsWith("Firestorm-Betax64 6"))
|
|
||||||
{
|
|
||||||
sp.ControllingClient.DoObjectAnimations = true;
|
|
||||||
}
|
|
||||||
return sp;
|
return sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3207,37 +3201,30 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep)
|
public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep)
|
||||||
{
|
{
|
||||||
AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(agentID);
|
AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(agentID);
|
||||||
if (aCircuit != null)
|
if (aCircuit == null)
|
||||||
{
|
return false;
|
||||||
|
|
||||||
bool vialogin = false;
|
bool vialogin = false;
|
||||||
if (!VerifyClient(aCircuit, ep, out vialogin))
|
if (VerifyClient(aCircuit, ep, out vialogin))
|
||||||
{
|
return true;
|
||||||
|
|
||||||
// if it doesn't pass, we remove the agentcircuitdata altogether
|
// if it doesn't pass, we remove the agentcircuitdata altogether
|
||||||
// and the scene presence and the client, if they exist
|
// and the scene presence and the client, if they exist
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ScenePresence sp = WaitGetScenePresence(agentID);
|
ScenePresence sp = WaitGetScenePresence(agentID);
|
||||||
|
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
{
|
||||||
PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
|
PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
|
||||||
|
|
||||||
CloseAgent(sp.UUID, false);
|
CloseAgent(sp.UUID, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// BANG! SLASH!
|
// BANG! SLASH!
|
||||||
m_authenticateHandler.RemoveCircuit(agentID);
|
m_authenticateHandler.RemoveCircuit(agentID);
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace);
|
m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ using OpenSim.Region.PhysicsModules.SharedBase;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
|
using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
|
||||||
|
using Caps = OpenSim.Framework.Capabilities.Caps;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes
|
namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
|
@ -1110,6 +1111,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
HealRate = 0.5f;
|
HealRate = 0.5f;
|
||||||
|
|
||||||
|
ControllingClient.SupportObjectAnimations = false;
|
||||||
|
if (m_scene.CapsModule != null)
|
||||||
|
{
|
||||||
|
Caps cap = m_scene.CapsModule.GetCapsForUser(ControllingClient.CircuitCode);
|
||||||
|
if (cap != null && (cap.Flags & Caps.CapsFlags.ObjectAnim) != 0)
|
||||||
|
ControllingClient.SupportObjectAnimations = true;
|
||||||
|
}
|
||||||
|
|
||||||
IConfig sconfig = m_scene.Config.Configs["EntityTransfer"];
|
IConfig sconfig = m_scene.Config.Configs["EntityTransfer"];
|
||||||
if (sconfig != null)
|
if (sconfig != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -60,7 +60,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
|
|
||||||
public int PingTimeMS { get { return 0; } }
|
public int PingTimeMS { get { return 0; } }
|
||||||
|
|
||||||
public bool DoObjectAnimations { get; set; }
|
public bool SupportObjectAnimations { get; set; }
|
||||||
|
|
||||||
private string m_username;
|
private string m_username;
|
||||||
private string m_nick;
|
private string m_nick;
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
private UUID m_profileImage = UUID.Zero;
|
private UUID m_profileImage = UUID.Zero;
|
||||||
private string m_born;
|
private string m_born;
|
||||||
public List<uint> SelectedObjects {get; private set;}
|
public List<uint> SelectedObjects {get; private set;}
|
||||||
public bool DoObjectAnimations { get; set; }
|
public bool SupportObjectAnimations { get; set; }
|
||||||
|
|
||||||
public NPCAvatar(
|
public NPCAvatar(
|
||||||
string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene)
|
string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene)
|
||||||
|
|
|
@ -354,7 +354,7 @@ namespace OpenSim.Tests.Common
|
||||||
|
|
||||||
public ISceneAgent SceneAgent { get; set; }
|
public ISceneAgent SceneAgent { get; set; }
|
||||||
|
|
||||||
public bool DoObjectAnimations { get; set; }
|
public bool SupportObjectAnimations { get; set; }
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The last caps seed url that this client was given.
|
/// The last caps seed url that this client was given.
|
||||||
|
|
Loading…
Reference in New Issue