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.
0.7.4.1
Justin Clark-Casey (justincc) 2012-03-23 03:33:07 +00:00
parent 4ed833bc9d
commit 54887bf386
1 changed files with 17 additions and 0 deletions

View File

@ -104,6 +104,11 @@ namespace OpenSim.Region.Framework.Scenes
public bool m_allowScriptCrossings; public bool m_allowScriptCrossings;
public bool m_useFlySlow; public bool m_useFlySlow;
/// <summary>
/// Temporarily setting to trigger appearance resends at 60 second intervals.
/// </summary>
public bool SendPeriodicAppearanceUpdates { get; set; }
protected float m_defaultDrawDistance = 255.0f; protected float m_defaultDrawDistance = 255.0f;
public float DefaultDrawDistance public float DefaultDrawDistance
{ {
@ -761,6 +766,8 @@ namespace OpenSim.Region.Framework.Scenes
m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences); m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences);
m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain);
m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning);
SendPeriodicAppearanceUpdates = startupConfig.GetBoolean("SendPeriodicAppearanceUpdates", SendPeriodicAppearanceUpdates);
} }
#endregion Region Config #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(); Watchdog.UpdateThread();
previousMaintenanceTick = m_lastMaintenanceTick; previousMaintenanceTick = m_lastMaintenanceTick;