Merge branch 'master' into careminster
commit
ded16d3529
|
@ -1389,30 +1389,30 @@ namespace OpenSim.Framework
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion FireAndForget Threading Pattern
|
#endregion FireAndForget Threading Pattern
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive
|
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive
|
||||||
/// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
|
/// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
|
||||||
/// for the callers.
|
/// for the callers.
|
||||||
/// This trims it to a 12 day interval so don't let your frame time get too long.
|
/// This trims it to a 12 day interval so don't let your frame time get too long.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Int32 EnvironmentTickCount()
|
public static Int32 EnvironmentTickCount()
|
||||||
{
|
{
|
||||||
return Environment.TickCount & EnvironmentTickCountMask;
|
return Environment.TickCount & EnvironmentTickCountMask;
|
||||||
}
|
}
|
||||||
const Int32 EnvironmentTickCountMask = 0x3fffffff;
|
const Int32 EnvironmentTickCountMask = 0x3fffffff;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive
|
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive
|
||||||
/// and negative every 24.9 days. Subtracts the passed value (previously fetched by
|
/// and negative every 24.9 days. Subtracts the passed value (previously fetched by
|
||||||
/// 'EnvironmentTickCount()') and accounts for any wrapping.
|
/// 'EnvironmentTickCount()') and accounts for any wrapping.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
|
/// <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
|
||||||
public static Int32 EnvironmentTickCountSubtract(Int32 prevValue)
|
public static Int32 EnvironmentTickCountSubtract(Int32 prevValue)
|
||||||
{
|
{
|
||||||
Int32 diff = EnvironmentTickCount() - prevValue;
|
Int32 diff = EnvironmentTickCount() - prevValue;
|
||||||
return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
|
return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://opensimulator.org/
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
|
@ -430,7 +430,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Send the packet
|
// Send the packet
|
||||||
m_udpServer.SendPacketFinal(nextPacket);
|
m_udpServer.SendPacketFinal(nextPacket);
|
||||||
m_nextPackets[i] = null;
|
m_nextPackets[i] = null;
|
||||||
packetSent = true;
|
packetSent = true;
|
||||||
this.PacketsSent++;
|
this.PacketsSent++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -448,5 +448,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
|
|
||||||
SendAnimPack(animIDs, sequenceNums, objectIDs);
|
SendAnimPack(animIDs, sequenceNums, objectIDs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
m_animations = null;
|
||||||
|
m_scenePresence = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -790,37 +790,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendPrimUpdates()
|
public void SendPrimUpdates()
|
||||||
{
|
{
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
m_sceneViewer.SendPrimUpdates();
|
m_sceneViewer.SendPrimUpdates();
|
||||||
|
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCountSubtract(m_perfMonMS));
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive
|
|
||||||
/// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
|
|
||||||
/// for the callers.
|
|
||||||
/// This trims it to a 12 day interval so don't let your frame time get too long.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
const Int32 EnvironmentTickCountMask = 0x3fffffff;
|
|
||||||
private static Int32 EnvironmentTickCount() {
|
|
||||||
return Environment.TickCount & EnvironmentTickCountMask;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Environment.TickCount is an int but it counts all 32 bits so it goes positive
|
|
||||||
/// and negative every 24.9 days. Subtracts the passed value (previously fetched by
|
|
||||||
/// 'EnvironmentTickCount()') and accounts for any wrapping.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>subtraction of passed prevValue from current Environment.TickCount</returns>
|
|
||||||
private static Int32 EnvironmentTickCountSubtract(Int32 prevValue) {
|
|
||||||
Int32 diff = EnvironmentTickCount() - prevValue;
|
|
||||||
return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#region Status Methods
|
#region Status Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1209,7 +1185,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// return;
|
// return;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
++m_movementUpdateCount;
|
++m_movementUpdateCount;
|
||||||
if (m_movementUpdateCount < 1)
|
if (m_movementUpdateCount < 1)
|
||||||
|
@ -1539,7 +1515,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_scene.EventManager.TriggerOnClientMovement(this);
|
m_scene.EventManager.TriggerOnClientMovement(this);
|
||||||
|
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCountSubtract(m_perfMonMS));
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoAutoPilot(uint not_used, Vector3 Pos, IClientAPI remote_client)
|
public void DoAutoPilot(uint not_used, Vector3 Pos, IClientAPI remote_client)
|
||||||
|
@ -2057,7 +2033,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
Rotation = rotation;
|
Rotation = rotation;
|
||||||
Vector3 direc = vec * rotation;
|
Vector3 direc = vec * rotation;
|
||||||
|
@ -2099,7 +2075,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// TODO: Add the force instead of only setting it to support multiple forces per frame?
|
// TODO: Add the force instead of only setting it to support multiple forces per frame?
|
||||||
m_forceToApply = direc;
|
m_forceToApply = direc;
|
||||||
m_isNudging = Nudging;
|
m_isNudging = Nudging;
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCount() - m_perfMonMS);
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -2168,7 +2144,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// server.
|
// server.
|
||||||
if (remoteClient.IsActive)
|
if (remoteClient.IsActive)
|
||||||
{
|
{
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
PhysicsActor actor = m_physicsActor;
|
PhysicsActor actor = m_physicsActor;
|
||||||
Vector3 velocity = (actor != null) ? actor.Velocity : Vector3.Zero;
|
Vector3 velocity = (actor != null) ? actor.Velocity : Vector3.Zero;
|
||||||
|
@ -2181,7 +2157,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
|
remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
|
||||||
pos, velocity, Vector3.Zero, m_bodyRot, CollisionPlane, m_uuid, null, GetUpdatePriority(remoteClient)));
|
pos, velocity, Vector3.Zero, m_bodyRot, CollisionPlane, m_uuid, null, GetUpdatePriority(remoteClient)));
|
||||||
|
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCountSubtract(m_perfMonMS));
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
m_scene.StatsReporter.AddAgentUpdates(1);
|
m_scene.StatsReporter.AddAgentUpdates(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2191,11 +2167,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendTerseUpdateToAllClients()
|
public void SendTerseUpdateToAllClients()
|
||||||
{
|
{
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
m_scene.ForEachClient(SendTerseUpdateToClient);
|
m_scene.ForEachClient(SendTerseUpdateToClient);
|
||||||
|
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCountSubtract(m_perfMonMS));
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendCoarseLocations()
|
public void SendCoarseLocations()
|
||||||
|
@ -2215,7 +2191,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p)
|
public void SendCoarseLocationsDefault(UUID sceneId, ScenePresence p)
|
||||||
{
|
{
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
List<Vector3> CoarseLocations = new List<Vector3>();
|
List<Vector3> CoarseLocations = new List<Vector3>();
|
||||||
List<UUID> AvatarUUIDs = new List<UUID>();
|
List<UUID> AvatarUUIDs = new List<UUID>();
|
||||||
|
@ -2251,7 +2227,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);
|
m_controllingClient.SendCoarseLocationUpdate(AvatarUUIDs, CoarseLocations);
|
||||||
|
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCountSubtract(m_perfMonMS));
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CoarseLocationChange()
|
public void CoarseLocationChange()
|
||||||
|
@ -2288,7 +2264,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendInitialFullUpdateToAllClients()
|
public void SendInitialFullUpdateToAllClients()
|
||||||
{
|
{
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
ScenePresence[] avatars = m_scene.GetScenePresences();
|
ScenePresence[] avatars = m_scene.GetScenePresences();
|
||||||
|
|
||||||
|
@ -2314,14 +2290,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
m_scene.StatsReporter.AddAgentUpdates(avatars.Length);
|
m_scene.StatsReporter.AddAgentUpdates(avatars.Length);
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCountSubtract(m_perfMonMS));
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
|
|
||||||
//Animator.SendAnimPack();
|
//Animator.SendAnimPack();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendFullUpdateToAllClients()
|
public void SendFullUpdateToAllClients()
|
||||||
{
|
{
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
// only send update from root agents to other clients; children are only "listening posts"
|
// only send update from root agents to other clients; children are only "listening posts"
|
||||||
List<ScenePresence> avatars = m_scene.GetAvatars();
|
List<ScenePresence> avatars = m_scene.GetAvatars();
|
||||||
|
@ -2331,7 +2307,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
}
|
}
|
||||||
m_scene.StatsReporter.AddAgentUpdates(avatars.Count);
|
m_scene.StatsReporter.AddAgentUpdates(avatars.Count);
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCountSubtract(m_perfMonMS));
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
|
|
||||||
Animator.SendAnimPack();
|
Animator.SendAnimPack();
|
||||||
}
|
}
|
||||||
|
@ -2373,7 +2349,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendAppearanceToAllOtherAgents()
|
public void SendAppearanceToAllOtherAgents()
|
||||||
{
|
{
|
||||||
m_perfMonMS = EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence)
|
||||||
{
|
{
|
||||||
|
@ -2382,8 +2358,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SendAppearanceToOtherAgent(scenePresence);
|
SendAppearanceToOtherAgent(scenePresence);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
m_scene.StatsReporter.AddAgentTime(EnvironmentTickCountSubtract(m_perfMonMS));
|
m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -3200,11 +3176,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// I don't get it but mono crashes when you try to dispose of this timer,
|
// I don't get it but mono crashes when you try to dispose of this timer,
|
||||||
// unsetting the elapsed callback should be enough to allow for cleanup however.
|
// unsetting the elapsed callback should be enough to allow for cleanup however.
|
||||||
//m_reprioritizationTimer.Dispose();
|
// m_reprioritizationTimer.Dispose();
|
||||||
|
|
||||||
m_sceneViewer.Close();
|
m_sceneViewer.Close();
|
||||||
|
|
||||||
RemoveFromPhysicalScene();
|
RemoveFromPhysicalScene();
|
||||||
|
m_animator.Close();
|
||||||
|
m_animator = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ScenePresence()
|
public ScenePresence()
|
||||||
|
|
|
@ -75,7 +75,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
UnAckedBytes = 24,
|
UnAckedBytes = 24,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sending a stats update every 3 seconds
|
// Sending a stats update every 3 seconds-
|
||||||
private int statsUpdatesEveryMS = 3000;
|
private int statsUpdatesEveryMS = 3000;
|
||||||
private float statsUpdateFactor = 0;
|
private float statsUpdateFactor = 0;
|
||||||
private float m_timeDilation = 0;
|
private float m_timeDilation = 0;
|
||||||
|
@ -240,7 +240,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sb[12].StatID = (uint)Stats.OtherMS;
|
sb[12].StatID = (uint)Stats.OtherMS;
|
||||||
sb[12].StatValue = m_otherMS / statsUpdateFactor;
|
sb[12].StatValue = m_otherMS / statsUpdateFactor;
|
||||||
|
|
||||||
sb[13].StatID = (uint)Stats.InPacketsPerSecond;
|
sb[13].StatID = (uint)Stats.InPacketsPerSecond;
|
||||||
sb[13].StatValue = (m_inPacketsPerSecond / statsUpdateFactor);
|
sb[13].StatValue = (m_inPacketsPerSecond / statsUpdateFactor);
|
||||||
|
|
||||||
sb[14].StatID = (uint)Stats.OutPacketsPerSecond;
|
sb[14].StatID = (uint)Stats.OutPacketsPerSecond;
|
||||||
|
|
BIN
bin/IronMath.dll
BIN
bin/IronMath.dll
Binary file not shown.
Binary file not shown.
|
@ -342,7 +342,7 @@
|
||||||
|
|
||||||
; The MessagingServer is a companion of the UserServer. It uses
|
; The MessagingServer is a companion of the UserServer. It uses
|
||||||
; user_send_key and user_recv_key, too
|
; user_send_key and user_recv_key, too
|
||||||
;messaging_server_url = "http://127.0.0.1:8006"
|
messaging_server_url = "http://127.0.0.1:8006"
|
||||||
|
|
||||||
; What is reported as the "X-Secondlife-Shard"
|
; What is reported as the "X-Secondlife-Shard"
|
||||||
; Defaults to the user server url if not set
|
; Defaults to the user server url if not set
|
||||||
|
@ -1155,7 +1155,6 @@
|
||||||
safemode = false
|
safemode = false
|
||||||
|
|
||||||
[VivoxVoice]
|
[VivoxVoice]
|
||||||
|
|
||||||
; The VivoxVoice module will allow you to provide voice on your
|
; The VivoxVoice module will allow you to provide voice on your
|
||||||
; region(s). It uses the same voice technology as the LL grid and
|
; region(s). It uses the same voice technology as the LL grid and
|
||||||
; works with recent LL clients (we have tested 1.22.9.110075, so
|
; works with recent LL clients (we have tested 1.22.9.110075, so
|
||||||
|
@ -1296,6 +1295,15 @@
|
||||||
RootReprioritizationDistance = 10.0
|
RootReprioritizationDistance = 10.0
|
||||||
ChildReprioritizationDistance = 20.0
|
ChildReprioritizationDistance = 20.0
|
||||||
|
|
||||||
|
|
||||||
|
[WebStats]
|
||||||
|
; View region statistics via a web page
|
||||||
|
; See http://opensimulator.org/wiki/FAQ#Region_Statistics_on_a_Web_Page
|
||||||
|
; Use a web browser and type in the "Login URI" + "/SStats/"
|
||||||
|
; For example- http://127.0.0.1:9000/SStats/
|
||||||
|
; enabled=false
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; These are defaults that are overwritten below in [Architecture].
|
;; These are defaults that are overwritten below in [Architecture].
|
||||||
;; These defaults allow OpenSim to work out of the box with
|
;; These defaults allow OpenSim to work out of the box with
|
||||||
|
|
Loading…
Reference in New Issue