aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2019-01-01 12:06:29 +0000
committerUbitUmarov2019-01-01 12:06:29 +0000
commit02492f7b15f29419c1ea4725a6ae6959bc199912 (patch)
tree2967fed8eba4d3b801a763ddeb50804226c446cb /OpenSim/Region
parenttemporary HACK to not kill some viewers (diff)
downloadopensim-SC-02492f7b15f29419c1ea4725a6ae6959bc199912.zip
opensim-SC-02492f7b15f29419c1ea4725a6ae6959bc199912.tar.gz
opensim-SC-02492f7b15f29419c1ea4725a6ae6959bc199912.tar.bz2
opensim-SC-02492f7b15f29419c1ea4725a6ae6959bc199912.tar.xz
replace my hack by others hack
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs7
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs6
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs30
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs53
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs9
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
7 files changed, 50 insertions, 59 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index f54c5f5..92f5a2c 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -374,7 +374,12 @@ namespace OpenSim.Region.ClientStack.Linden
374 List<string> validCaps = new List<string>(); 374 List<string> validCaps = new List<string>();
375 375
376 foreach (OSD c in capsRequested) 376 foreach (OSD c in capsRequested)
377 validCaps.Add(c.AsString()); 377 {
378 string cstr = c.AsString();
379 if(cstr == "ObjectAnimation")
380 m_HostCapsObj.Flags |= Caps.CapsFlags.ObjectAnim;
381 validCaps.Add(cstr);
382 }
378 383
379 string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps)); 384 string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps));
380 385
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 7866997..34e3a43 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -351,7 +351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
351#pragma warning restore 0414 351#pragma warning restore 0414
352 private const uint MaxTransferBytesPerPacket = 600; 352 private const uint MaxTransferBytesPerPacket = 600;
353 353
354 public bool DoObjectAnimations { get; set; } 354 public bool SupportObjectAnimations { get; set; }
355 355
356 /// <value> 356 /// <value>
357 /// Maintain a record of all the objects killed. This allows us to stop an update being sent from the 357 /// 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
3917 public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId) 3917 public void SendObjectAnimations(UUID[] animations, int[] seqs, UUID senderId)
3918 { 3918 {
3919 // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name); 3919 // m_log.DebugFormat("[LLCLIENTVIEW]: Sending Object animations for {0} to {1}", sourceAgentId, Name);
3920 if(!DoObjectAnimations) 3920 if(!SupportObjectAnimations)
3921 return; 3921 return;
3922 3922
3923 ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation); 3923 ObjectAnimationPacket ani = (ObjectAnimationPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAnimation);
@@ -4330,7 +4330,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4330 4330
4331 if (update.Entity is SceneObjectPart) 4331 if (update.Entity is SceneObjectPart)
4332 { 4332 {
4333 if (DoObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations)) 4333 if (SupportObjectAnimations && updateFlags.HasFlag(PrimUpdateFlags.Animations))
4334 { 4334 {
4335 SceneObjectPart sop = (SceneObjectPart)update.Entity; 4335 SceneObjectPart sop = (SceneObjectPart)update.Entity;
4336 if ( sop.Animations != null) 4336 if ( sop.Animations != null)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index afa1e4c..667acf9 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -1919,38 +1919,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1919 uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo) 1919 uint circuitCode, UUID agentID, UUID sessionID, IPEndPoint remoteEndPoint, AuthenticateResponse sessionInfo)
1920 { 1920 {
1921 IClientAPI client = null; 1921 IClientAPI client = null;
1922 bool createNew = false;
1923 1922
1924 // We currently synchronize this code across the whole scene to avoid issues such as 1923 // We currently synchronize this code across the whole scene to avoid issues such as
1925 // http://opensimulator.org/mantis/view.php?id=5365 However, once locking per agent circuit can be done 1924 // http://opensimulator.org/mantis/view.php?id=5365 However, once locking per agent circuit can be done
1926 // consistently, this lock could probably be removed. 1925 // consistently, this lock could probably be removed.
1927 lock (this) 1926 lock (this)
1928 { 1927 {
1929 if (!Scene.TryGetClient(agentID, out client)) 1928 if (Scene.TryGetClient(agentID, out client))
1930 { 1929 {
1931 createNew = true; 1930 if (client.SceneAgent != null)
1932 } 1931 return client;
1933 else 1932 Scene.CloseAgent(agentID, true);
1934 {
1935 if (client.SceneAgent == null)
1936 {
1937 Scene.CloseAgent(agentID, true);
1938 createNew = true;
1939 }
1940 } 1933 }
1941 1934
1942 if (createNew) 1935 LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
1943 {
1944 LLUDPClient udpClient = new LLUDPClient(this, ThrottleRates, Throttle, circuitCode, agentID, remoteEndPoint, m_defaultRTO, m_maxRTO);
1945 1936
1946 client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); 1937 client = new LLClientView(Scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode);
1947 client.OnLogout += LogoutHandler; 1938 client.OnLogout += LogoutHandler;
1948 client.DebugPacketLevel = DefaultClientPacketDebugLevel; 1939 client.DebugPacketLevel = DefaultClientPacketDebugLevel;
1949 1940
1950 ((LLClientView)client).DisableFacelights = m_disableFacelights; 1941 ((LLClientView)client).DisableFacelights = m_disableFacelights;
1951 1942
1952 client.Start(); 1943 client.Start();
1953 }
1954 } 1944 }
1955 1945
1956 return client; 1946 return client;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a8d2f84..ed98046 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3111,12 +3111,6 @@ namespace OpenSim.Region.Framework.Scenes
3111 3111
3112 m_LastLogin = Util.EnvironmentTickCount(); 3112 m_LastLogin = Util.EnvironmentTickCount();
3113 3113
3114//HACK only send object animations to fs beta for now
3115 string viewername = Util.GetViewerName(aCircuit);
3116 if(sp != null && viewername.StartsWith("Firestorm-Betax64 6"))
3117 {
3118 sp.ControllingClient.DoObjectAnimations = true;
3119 }
3120 return sp; 3114 return sp;
3121 } 3115 }
3122 3116
@@ -3207,36 +3201,29 @@ namespace OpenSim.Region.Framework.Scenes
3207 public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep) 3201 public override bool CheckClient(UUID agentID, System.Net.IPEndPoint ep)
3208 { 3202 {
3209 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(agentID); 3203 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(agentID);
3210 if (aCircuit != null) 3204 if (aCircuit == null)
3211 { 3205 return false;
3212 bool vialogin = false;
3213 if (!VerifyClient(aCircuit, ep, out vialogin))
3214 {
3215 // if it doesn't pass, we remove the agentcircuitdata altogether
3216 // and the scene presence and the client, if they exist
3217 try
3218 {
3219 ScenePresence sp = WaitGetScenePresence(agentID);
3220
3221 if (sp != null)
3222 {
3223 PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
3224
3225 CloseAgent(sp.UUID, false);
3226 }
3227 3206
3228 // BANG! SLASH! 3207 bool vialogin = false;
3229 m_authenticateHandler.RemoveCircuit(agentID); 3208 if (VerifyClient(aCircuit, ep, out vialogin))
3209 return true;
3230 3210
3231 return false; 3211 // if it doesn't pass, we remove the agentcircuitdata altogether
3232 } 3212 // and the scene presence and the client, if they exist
3233 catch (Exception e) 3213 try
3234 { 3214 {
3235 m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace); 3215 ScenePresence sp = WaitGetScenePresence(agentID);
3236 } 3216 if (sp != null)
3217 {
3218 PresenceService.LogoutAgent(sp.ControllingClient.SessionId);
3219 CloseAgent(sp.UUID, false);
3237 } 3220 }
3238 else 3221 // BANG! SLASH!
3239 return true; 3222 m_authenticateHandler.RemoveCircuit(agentID);
3223 }
3224 catch (Exception e)
3225 {
3226 m_log.DebugFormat("[SCENE]: Exception while closing aborted client: {0}", e.StackTrace);
3240 } 3227 }
3241 3228
3242 return false; 3229 return false;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 2b6c5e6..527f12e 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -45,6 +45,7 @@ using OpenSim.Region.PhysicsModules.SharedBase;
45using GridRegion = OpenSim.Services.Interfaces.GridRegion; 45using GridRegion = OpenSim.Services.Interfaces.GridRegion;
46using OpenSim.Services.Interfaces; 46using OpenSim.Services.Interfaces;
47using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags; 47using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
48using Caps = OpenSim.Framework.Capabilities.Caps;
48 49
49namespace OpenSim.Region.Framework.Scenes 50namespace OpenSim.Region.Framework.Scenes
50{ 51{
@@ -1110,6 +1111,14 @@ namespace OpenSim.Region.Framework.Scenes
1110 1111
1111 HealRate = 0.5f; 1112 HealRate = 0.5f;
1112 1113
1114 ControllingClient.SupportObjectAnimations = false;
1115 if (m_scene.CapsModule != null)
1116 {
1117 Caps cap = m_scene.CapsModule.GetCapsForUser(ControllingClient.CircuitCode);
1118 if (cap != null && (cap.Flags & Caps.CapsFlags.ObjectAnim) != 0)
1119 ControllingClient.SupportObjectAnimations = true;
1120 }
1121
1113 IConfig sconfig = m_scene.Config.Configs["EntityTransfer"]; 1122 IConfig sconfig = m_scene.Config.Configs["EntityTransfer"];
1114 if (sconfig != null) 1123 if (sconfig != null)
1115 { 1124 {
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 5962495..febf995 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -60,7 +60,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
60 60
61 public int PingTimeMS { get { return 0; } } 61 public int PingTimeMS { get { return 0; } }
62 62
63 public bool DoObjectAnimations { get; set; } 63 public bool SupportObjectAnimations { get; set; }
64 64
65 private string m_username; 65 private string m_username;
66 private string m_nick; 66 private string m_nick;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index cbb7e60..0984c60 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
73 private UUID m_profileImage = UUID.Zero; 73 private UUID m_profileImage = UUID.Zero;
74 private string m_born; 74 private string m_born;
75 public List<uint> SelectedObjects {get; private set;} 75 public List<uint> SelectedObjects {get; private set;}
76 public bool DoObjectAnimations { get; set; } 76 public bool SupportObjectAnimations { get; set; }
77 77
78 public NPCAvatar( 78 public NPCAvatar(
79 string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene) 79 string firstname, string lastname, Vector3 position, UUID ownerID, bool senseAsAgent, Scene scene)