From 3674257095f0c511b1f5810fdc034c2d49bb73a8 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 7 Feb 2008 08:15:38 +0000 Subject: * This update contains a bucket-full of network optimizations. * ParcelProperties are sent only when needed instead of on any movement * Terse Updates and other temporary data packets are marked unreliable * After a certain amount of users, the sim actually sends updates on things less * Experimental * Tested to 68 avatar with pCampBot (And it's surprising what actually causes the most lag.. the text chat!) --- OpenSim/Region/Environment/Scenes/Scene.cs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 6b891fd..a62e6c6 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -626,7 +626,28 @@ namespace OpenSim.Region.Environment.Scenes // Aquire a lock so only one update call happens at once updateLock.WaitOne(); float physicsFPS = 0; - + int agentsInScene = m_innerScene.GetRootAgentCount() + m_innerScene.GetChildAgentCount(); + + if (agentsInScene > 21) + { + if (m_update_entities == 1) + { + m_update_avatars = 5; + m_update_entities = 5; + m_statsReporter.SetUpdateMS(6000); + } + } + else + { + if (m_update_entities == 5) + { + m_update_avatars = 1; + m_update_entities = 1; + m_statsReporter.SetUpdateMS(3000); + } + } + + frameMS = System.Environment.TickCount; try { -- cgit v1.1