From 54887bf38623007d9148e651b1d08f6d6fca35e7 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 41e9bbc9b5..5809508d3a 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); } #endregion Region Config @@ -1296,6 +1303,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;