* Adds several new settings
* DEFAULT_AGENT_UPDATE_INTERVAL is now configurable * INTERPOLATION_INTERVAL is now configurable * You can now disable periodic SEND_AGENT_UPDATES independently (SEND_AGENT_UPDATES_REGULARLY) of normal updates, such as in CompleteAgentMovement * You can disable TexturePipeline if you don't need it * Fixes a possible timing bug in AgentManagerMovement.TurnToward
This commit is contained in:
committed by
Cinder Roxley
parent
8f7f8717de
commit
be4e6afc6a
@@ -459,7 +459,7 @@ namespace OpenMetaverse
|
||||
Camera = new AgentCamera();
|
||||
Client.Network.LoginProgress += Network_OnConnected;
|
||||
Client.Network.Disconnected += Network_OnDisconnected;
|
||||
updateInterval = Settings.DEFAULT_AGENT_UPDATE_INTERVAL;
|
||||
updateInterval = client.Settings.DEFAULT_AGENT_UPDATE_INTERVAL;
|
||||
}
|
||||
|
||||
private void CleanupTimer()
|
||||
@@ -481,7 +481,10 @@ namespace OpenMetaverse
|
||||
if (e.Status == LoginStatus.Success)
|
||||
{
|
||||
CleanupTimer();
|
||||
updateTimer = new Timer(new TimerCallback(UpdateTimer_Elapsed), null, updateInterval, updateInterval);
|
||||
if (Client.Settings.SEND_AGENT_UPDATES_REGULARLY)
|
||||
{
|
||||
updateTimer = new Timer(new TimerCallback(UpdateTimer_Elapsed), null, updateInterval, updateInterval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -528,12 +531,13 @@ namespace OpenMetaverse
|
||||
|
||||
if (Client.Self.SittingOn > 0)
|
||||
{
|
||||
if (!Client.Network.CurrentSim.ObjectsPrimitives.ContainsKey(Client.Self.SittingOn))
|
||||
if (!Client.Network.CurrentSim.ObjectsPrimitives.TryGetValue(Client.Self.SittingOn, out var parent))
|
||||
{
|
||||
Logger.Log("Attempted TurnToward but parent prim is not in dictionary", Helpers.LogLevel.Warning, Client);
|
||||
return false;
|
||||
}
|
||||
else parentRot = Client.Network.CurrentSim.ObjectsPrimitives[Client.Self.SittingOn].Rotation;
|
||||
|
||||
parentRot = parent.Rotation;
|
||||
}
|
||||
|
||||
Quaternion between = Vector3.RotationBetween(Vector3.UnitX, Vector3.Normalize(target - Client.Self.SimPosition));
|
||||
|
||||
@@ -126,11 +126,11 @@ namespace OpenMetaverse
|
||||
public const int PING_INTERVAL = 2200;
|
||||
|
||||
/// <summary>Number of milliseconds between sending camera updates</summary>
|
||||
public const int DEFAULT_AGENT_UPDATE_INTERVAL = 500;
|
||||
public int DEFAULT_AGENT_UPDATE_INTERVAL = 500;
|
||||
|
||||
/// <summary>Number of milliseconds between updating the current
|
||||
/// positions of moving, non-accelerating and non-colliding objects</summary>
|
||||
public const int INTERPOLATION_INTERVAL = 250;
|
||||
public int INTERPOLATION_INTERVAL = 250;
|
||||
|
||||
/// <summary>Millisecond interval between ticks, where all ACKs are
|
||||
/// sent out and the age of unACKed packets is checked</summary>
|
||||
@@ -182,9 +182,12 @@ namespace OpenMetaverse
|
||||
/// TerrainManager</summary>
|
||||
public bool STORE_LAND_PATCHES = false;
|
||||
|
||||
/// <summary>Enable/disable sending periodic camera updates</summary>
|
||||
/// <summary>Enable/disable sending agent updates</summary>
|
||||
public bool SEND_AGENT_UPDATES = true;
|
||||
|
||||
/// <summary>Enable/disable sending periodic agent updates</summary>
|
||||
public bool SEND_AGENT_UPDATES_REGULARLY = true;
|
||||
|
||||
/// <summary>Enable/disable automatically setting agent appearance at
|
||||
/// login and after sim crossing</summary>
|
||||
public bool SEND_AGENT_APPEARANCE = true;
|
||||
@@ -307,6 +310,11 @@ namespace OpenMetaverse
|
||||
#endregion
|
||||
#region Texture Pipeline
|
||||
|
||||
/// <summary>
|
||||
/// Enable texture pipeline, will use a thread.
|
||||
/// </summary>
|
||||
public bool USE_TEXTURE_PIPELINE = true;
|
||||
|
||||
/// <summary>
|
||||
/// Download textures using GetTexture capability when available
|
||||
/// </summary>
|
||||
|
||||
@@ -174,6 +174,9 @@ namespace OpenMetaverse
|
||||
if (_Running)
|
||||
return;
|
||||
|
||||
if (!_Client.Settings.USE_TEXTURE_PIPELINE)
|
||||
return;
|
||||
|
||||
if (downloadMaster == null)
|
||||
{
|
||||
// Instantiate master thread that manages the request pool
|
||||
|
||||
Reference in New Issue
Block a user