Hack in console command "debug lludp toggle agentupdate" to allow AgentUpdate in packets to be discarded at a very early stage.
Enabling this will stop anybody from moving on a sim, though all other updates should be unaffected. Appears to make some cpu difference on very basic testing with a static standing avatar (though not all that much). Need to see the results with much higher av numbers.cpu-performance
parent
5cdc21aac7
commit
35aa6c86fe
|
@ -572,6 +572,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
"debug lludp status",
|
"debug lludp status",
|
||||||
"Return status of LLUDP packet processing.",
|
"Return status of LLUDP packet processing.",
|
||||||
HandleStatusCommand);
|
HandleStatusCommand);
|
||||||
|
|
||||||
|
MainConsole.Instance.Commands.AddCommand(
|
||||||
|
"Debug",
|
||||||
|
false,
|
||||||
|
"debug lludp toggle agentupdate",
|
||||||
|
"debug lludp toggle agentupdate",
|
||||||
|
"Toggle whether agentupdate packets are processed or simply discarded.",
|
||||||
|
HandleAgentUpdateCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandlePacketCommand(string module, string[] args)
|
private void HandlePacketCommand(string module, string[] args)
|
||||||
|
@ -706,6 +714,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool m_discardAgentUpdates;
|
||||||
|
|
||||||
|
private void HandleAgentUpdateCommand(string module, string[] args)
|
||||||
|
{
|
||||||
|
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_discardAgentUpdates = !m_discardAgentUpdates;
|
||||||
|
|
||||||
|
MainConsole.Instance.OutputFormat(
|
||||||
|
"Discard AgentUpdates now {0} for {1}", m_discardAgentUpdates, m_scene.Name);
|
||||||
|
}
|
||||||
|
|
||||||
private void HandleStatusCommand(string module, string[] args)
|
private void HandleStatusCommand(string module, string[] args)
|
||||||
{
|
{
|
||||||
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene)
|
if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene)
|
||||||
|
@ -1286,6 +1307,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
LogPacketHeader(true, udpClient.CircuitCode, 0, packet.Type, (ushort)packet.Length);
|
LogPacketHeader(true, udpClient.CircuitCode, 0, packet.Type, (ushort)packet.Length);
|
||||||
#endregion BinaryStats
|
#endregion BinaryStats
|
||||||
|
|
||||||
|
if (m_discardAgentUpdates && packet.Type == PacketType.AgentUpdate)
|
||||||
|
return;
|
||||||
|
|
||||||
#region Ping Check Handling
|
#region Ping Check Handling
|
||||||
|
|
||||||
if (packet.Type == PacketType.StartPingCheck)
|
if (packet.Type == PacketType.StartPingCheck)
|
||||||
|
|
Loading…
Reference in New Issue