From e6b12e1f9d0f3074158cb15f841e8b2a6a687a15 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 23 Mar 2012 03:33:07 +0000 Subject: [PATCH] Add experimental SendPeriodicAppearanceUpdates = true/false setting to [Startup] in OpenSim.ini On osgrid and other places, I have observed that manually sending appearance updates from the console often relieves grey avatar syndrome. Despite hunting high and low, I haven't been able to find where this packet is sometimes being lost - it might be a persistent viewer bug for all I know. Therefore, this experimental setting resends appearance data for everybody in the scene every 60 seconds. These packets are small and the viewer only fetches texture data if it doesn't already have it. Default is false. --- OpenSim/Region/Framework/Scenes/Scene.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 6b01b29619..d4c2c34491 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -104,6 +104,11 @@ namespace OpenSim.Region.Framework.Scenes public bool m_allowScriptCrossings; public bool m_useFlySlow; + /// + /// Temporarily setting to trigger appearance resends at 60 second intervals. + /// + public bool SendPeriodicAppearanceUpdates { get; set; } + protected float m_defaultDrawDistance = 255.0f; public float DefaultDrawDistance { @@ -761,6 +766,8 @@ namespace OpenSim.Region.Framework.Scenes m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences); m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); + + SendPeriodicAppearanceUpdates = startupConfig.GetBoolean("SendPeriodicAppearanceUpdates", SendPeriodicAppearanceUpdates); } catch { @@ -1301,6 +1308,16 @@ namespace OpenSim.Region.Framework.Scenes }); } + if (SendPeriodicAppearanceUpdates && MaintenanceRun % 60 == 0) + { + m_log.DebugFormat("[SCENE]: Sending periodic appearance updates"); + + if (AvatarFactory != null) + { + ForEachRootScenePresence(sp => AvatarFactory.SendAppearance(sp.UUID)); + } + } + Watchdog.UpdateThread(); previousMaintenanceTick = m_lastMaintenanceTick;