aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-07-14 16:47:51 +0100
committerUbitUmarov2018-07-14 16:47:51 +0100
commit282877a4542452031ccdeb3ac1aeed9431ae0311 (patch)
treec175821911b4adbf9a6e8d46ab2dfd7fffa961f3 /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
parentchange the scope of those options variables (diff)
downloadopensim-SC-282877a4542452031ccdeb3ac1aeed9431ae0311.zip
opensim-SC-282877a4542452031ccdeb3ac1aeed9431ae0311.tar.gz
opensim-SC-282877a4542452031ccdeb3ac1aeed9431ae0311.tar.bz2
opensim-SC-282877a4542452031ccdeb3ac1aeed9431ae0311.tar.xz
save a sqrt call
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 84bad25..04605a2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -477,7 +477,7 @@ namespace OpenSim.Region.Framework.Scenes
477 if (sp.ControllingClient.AgentId != remoteClient.AgentId) 477 if (sp.ControllingClient.AgentId != remoteClient.AgentId)
478 { 478 {
479 if (!discardableEffects || 479 if (!discardableEffects ||
480 (discardableEffects && ShouldSendDiscardableEffect(remoteClient, sp))) 480 (discardableEffects && ShouldSendDiscardableEffect(remoteClient, sp)))
481 { 481 {
482 //m_log.DebugFormat("[YYY]: Sending to {0}", sp.UUID); 482 //m_log.DebugFormat("[YYY]: Sending to {0}", sp.UUID);
483 sp.ControllingClient.SendViewerEffect(effectBlockArray); 483 sp.ControllingClient.SendViewerEffect(effectBlockArray);
@@ -490,7 +490,7 @@ namespace OpenSim.Region.Framework.Scenes
490 490
491 private bool ShouldSendDiscardableEffect(IClientAPI thisClient, ScenePresence other) 491 private bool ShouldSendDiscardableEffect(IClientAPI thisClient, ScenePresence other)
492 { 492 {
493 return Vector3.Distance(other.CameraPosition, thisClient.SceneAgent.AbsolutePosition) < 10; 493 return Vector3.DistanceSquared(other.CameraPosition, thisClient.SceneAgent.AbsolutePosition) < 100;
494 } 494 }
495 495
496 private class DescendentsRequestData 496 private class DescendentsRequestData
@@ -703,7 +703,7 @@ namespace OpenSim.Region.Framework.Scenes
703 { 703 {
704 InventoryFolderBase folder = new InventoryFolderBase(folderID, userID); 704 InventoryFolderBase folder = new InventoryFolderBase(folderID, userID);
705 705
706 try 706 try
707 { 707 {
708 if (InventoryService.PurgeFolder(folder)) 708 if (InventoryService.PurgeFolder(folder))
709 m_log.DebugFormat("[AGENT INVENTORY]: folder {0} purged successfully", folderID); 709 m_log.DebugFormat("[AGENT INVENTORY]: folder {0} purged successfully", folderID);