Merge branch 'master' into bullet-2.82
commit
2ed3a918bd
|
@ -72,10 +72,12 @@ what it is today.
|
||||||
* Allen Kerensky
|
* Allen Kerensky
|
||||||
* BigFootAg
|
* BigFootAg
|
||||||
* BlueWall Slade
|
* BlueWall Slade
|
||||||
|
* bobshaffer2
|
||||||
* brianw/Sir_Ahzz
|
* brianw/Sir_Ahzz
|
||||||
* CharlieO
|
* CharlieO
|
||||||
* ChrisDown
|
* ChrisDown
|
||||||
* Chris Yeoh (IBM)
|
* Chris Yeoh (IBM)
|
||||||
|
* cinderblocks
|
||||||
* controlbreak
|
* controlbreak
|
||||||
* coyled
|
* coyled
|
||||||
* ctrlaltdavid (David Rowe)
|
* ctrlaltdavid (David Rowe)
|
||||||
|
@ -88,6 +90,7 @@ what it is today.
|
||||||
* DoranZemlja
|
* DoranZemlja
|
||||||
* dr0b3rts
|
* dr0b3rts
|
||||||
* dslake
|
* dslake
|
||||||
|
* eeyore
|
||||||
* FredoChaplin
|
* FredoChaplin
|
||||||
* Garmin Kawaguichi
|
* Garmin Kawaguichi
|
||||||
* Gerhard
|
* Gerhard
|
||||||
|
|
|
@ -171,7 +171,8 @@ namespace OpenSim.Framework.Monitoring
|
||||||
foreach (char c in DisallowedShortNameCharacters)
|
foreach (char c in DisallowedShortNameCharacters)
|
||||||
{
|
{
|
||||||
if (shortName.IndexOf(c) != -1)
|
if (shortName.IndexOf(c) != -1)
|
||||||
throw new Exception(string.Format("Stat name {0} cannot contain character {1}", shortName, c));
|
shortName = shortName.Replace(c, '#');
|
||||||
|
// throw new Exception(string.Format("Stat name {0} cannot contain character {1}", shortName, c));
|
||||||
}
|
}
|
||||||
|
|
||||||
ShortName = shortName;
|
ShortName = shortName;
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace OpenSim.Framework.Monitoring
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Stat Stat { get; set; }
|
public Stat Stat { get; set; }
|
||||||
|
|
||||||
public ThreadWatchdogInfo(Thread thread, int timeout)
|
public ThreadWatchdogInfo(Thread thread, int timeout, string name)
|
||||||
{
|
{
|
||||||
Thread = thread;
|
Thread = thread;
|
||||||
Timeout = timeout;
|
Timeout = timeout;
|
||||||
|
@ -96,8 +96,8 @@ namespace OpenSim.Framework.Monitoring
|
||||||
|
|
||||||
Stat
|
Stat
|
||||||
= new Stat(
|
= new Stat(
|
||||||
thread.Name,
|
name,
|
||||||
string.Format("Last update of thread {0}", thread.Name),
|
string.Format("Last update of thread {0}", name),
|
||||||
"",
|
"",
|
||||||
"ms",
|
"ms",
|
||||||
"server",
|
"server",
|
||||||
|
@ -216,12 +216,11 @@ namespace OpenSim.Framework.Monitoring
|
||||||
bool alarmIfTimeout, Func<string> alarmMethod, int timeout, bool log = true)
|
bool alarmIfTimeout, Func<string> alarmMethod, int timeout, bool log = true)
|
||||||
{
|
{
|
||||||
Thread thread = new Thread(start);
|
Thread thread = new Thread(start);
|
||||||
thread.Name = name;
|
|
||||||
thread.Priority = priority;
|
thread.Priority = priority;
|
||||||
thread.IsBackground = isBackground;
|
thread.IsBackground = isBackground;
|
||||||
|
|
||||||
ThreadWatchdogInfo twi
|
ThreadWatchdogInfo twi
|
||||||
= new ThreadWatchdogInfo(thread, timeout)
|
= new ThreadWatchdogInfo(thread, timeout, name)
|
||||||
{ AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod };
|
{ AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod };
|
||||||
|
|
||||||
if (log)
|
if (log)
|
||||||
|
@ -232,6 +231,8 @@ namespace OpenSim.Framework.Monitoring
|
||||||
m_threads.Add(twi.Thread.ManagedThreadId, twi);
|
m_threads.Add(twi.Thread.ManagedThreadId, twi);
|
||||||
|
|
||||||
thread.Start();
|
thread.Start();
|
||||||
|
thread.Name = name;
|
||||||
|
|
||||||
|
|
||||||
return thread;
|
return thread;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,9 +70,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
_id = id;
|
_id = id;
|
||||||
|
|
||||||
_engine = new Thread(new ThreadStart(Engine));
|
_engine = new Thread(new ThreadStart(Engine));
|
||||||
_engine.Name = EngineID;
|
|
||||||
_engine.IsBackground = true;
|
_engine.IsBackground = true;
|
||||||
_engine.Start();
|
_engine.Start();
|
||||||
|
_engine.Name = string.Format ("Engine:{0}",EngineID);
|
||||||
|
|
||||||
ThreadTracker.Add(_engine);
|
ThreadTracker.Add(_engine);
|
||||||
}
|
}
|
||||||
|
@ -91,9 +91,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
_engine = new Thread(new ThreadStart(Engine));
|
_engine = new Thread(new ThreadStart(Engine));
|
||||||
_engine.Name = EngineID;
|
|
||||||
_engine.IsBackground = true;
|
_engine.IsBackground = true;
|
||||||
_engine.Start();
|
_engine.Start();
|
||||||
|
_engine.Name = string.Format ("Engine:{0}",EngineID);
|
||||||
|
|
||||||
ThreadTracker.Add(_engine);
|
ThreadTracker.Add(_engine);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,9 +150,9 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
_engine = new Thread(new ThreadStart(Engine));
|
_engine = new Thread(new ThreadStart(Engine));
|
||||||
_engine.Name = _engineId;
|
|
||||||
_engine.IsBackground = true;
|
_engine.IsBackground = true;
|
||||||
_engine.Start();
|
_engine.Start();
|
||||||
|
_engine.Name = string.Format ("Engine:{0}",_engineId);
|
||||||
|
|
||||||
ThreadTracker.Add(_engine);
|
ThreadTracker.Add(_engine);
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SimChat(message, ChatTypeEnum.Say, 0, fromPos, fromName, fromID, targetID, fromAgent, false);
|
SimChat(message, ChatTypeEnum.Say, 0, fromPos, fromName, fromID, targetID, fromAgent, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <param name="channel"></param>
|
||||||
|
/// <param name="fromPos"></param>
|
||||||
|
/// <param name="fromName"></param>
|
||||||
|
/// <param name="fromAgentID"></param>
|
||||||
|
/// <param name="targetID"></param>
|
||||||
|
public void SimChatToAgent(UUID targetID, byte[] message, int channel, Vector3 fromPos, string fromName, UUID fromID, bool fromAgent)
|
||||||
|
{
|
||||||
|
SimChat(message, ChatTypeEnum.Region, channel, fromPos, fromName, fromID, targetID, fromAgent, false);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoked when the client requests a prim.
|
/// Invoked when the client requests a prim.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1079,6 +1079,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
StatsReporter = new SimStatsReporter(this);
|
StatsReporter = new SimStatsReporter(this);
|
||||||
StatsReporter.OnSendStatsResult += SendSimStatsPackets;
|
StatsReporter.OnSendStatsResult += SendSimStatsPackets;
|
||||||
StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
|
StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo)
|
public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo)
|
||||||
|
@ -1396,7 +1397,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
m_heartbeatThread
|
m_heartbeatThread
|
||||||
= Watchdog.StartThread(
|
= Watchdog.StartThread(
|
||||||
Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false);
|
Heartbeat, string.Format("Heartbeat-({0})", RegionInfo.RegionName.Replace(" ", "_")), ThreadPriority.Normal, false, false);
|
||||||
|
|
||||||
StartScripts();
|
StartScripts();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1589,7 +1589,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
|
public void AddTextureAnimation(Primitive.TextureAnimation pTexAnim)
|
||||||
{
|
{
|
||||||
byte[] data = new byte[16];
|
byte[] data;
|
||||||
|
|
||||||
|
if (pTexAnim.Flags == Primitive.TextureAnimMode.ANIM_OFF)
|
||||||
|
{
|
||||||
|
data = Utils.EmptyBytes;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data = new byte[16];
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
|
||||||
// The flags don't like conversion from uint to byte, so we have to do
|
// The flags don't like conversion from uint to byte, so we have to do
|
||||||
|
@ -1603,6 +1611,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
|
Utils.FloatToBytes(pTexAnim.Start).CopyTo(data, pos);
|
||||||
Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
|
Utils.FloatToBytes(pTexAnim.Length).CopyTo(data, pos + 4);
|
||||||
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
|
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
|
||||||
|
}
|
||||||
|
|
||||||
m_TextureAnimation = data;
|
m_TextureAnimation = data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2618,7 +2618,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 sitPartWorldPosition = part.GetWorldPosition();
|
|
||||||
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
|
||||||
|
|
||||||
ParentID = 0;
|
ParentID = 0;
|
||||||
|
@ -2647,13 +2646,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// Vector3 standPositionAdjustment
|
// Vector3 standPositionAdjustment
|
||||||
// = part.SitTargetPosition + new Vector3(0.5f, 0f, m_sitAvatarHeight / 2f);
|
// = part.SitTargetPosition + new Vector3(0.5f, 0f, m_sitAvatarHeight / 2f);
|
||||||
Vector3 adjustmentForSitPosition = (part.SitTargetPosition + OffsetPosition) * part.GetWorldRotation();
|
Vector3 adjustmentForSitPosition = (OffsetPosition - SIT_TARGET_ADJUSTMENT) * part.GetWorldRotation();
|
||||||
|
|
||||||
// XXX: This is based on the physics capsule sizes. Need to find a better way to read this rather than
|
// XXX: This is based on the physics capsule sizes. Need to find a better way to read this rather than
|
||||||
// hardcoding here.
|
// hardcoding here.
|
||||||
Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation;
|
Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation;
|
||||||
|
|
||||||
Vector3 standPos = sitPartWorldPosition + adjustmentForSitPosition + adjustmentForSitPose;
|
Vector3 standPos = part.ParentGroup.AbsolutePosition + adjustmentForSitPosition + adjustmentForSitPose;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}",
|
// "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}",
|
||||||
|
|
|
@ -234,6 +234,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
ScenePresence sp;
|
ScenePresence sp;
|
||||||
if (scene.TryGetScenePresence(agentID, out sp))
|
if (scene.TryGetScenePresence(agentID, out sp))
|
||||||
{
|
{
|
||||||
|
if (sp.IsSatOnObject || sp.SitGround)
|
||||||
|
return false;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}",
|
// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}",
|
||||||
// sp.Name, pos, scene.RegionInfo.RegionName,
|
// sp.Name, pos, scene.RegionInfo.RegionName,
|
||||||
|
|
|
@ -968,6 +968,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
World.SimChat(Utils.StringToBytes(text),
|
||||||
|
ChatTypeEnum.Region, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
|
||||||
|
|
||||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
if (wComm != null)
|
if (wComm != null)
|
||||||
wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
|
wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
|
||||||
|
@ -988,6 +991,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
UUID TargetID;
|
UUID TargetID;
|
||||||
UUID.TryParse(target, out TargetID);
|
UUID.TryParse(target, out TargetID);
|
||||||
|
|
||||||
|
World.SimChatToAgent(TargetID, Utils.StringToBytes(msg),
|
||||||
|
channel, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
|
||||||
|
|
||||||
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
|
||||||
if (wComm != null)
|
if (wComm != null)
|
||||||
wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg);
|
wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg);
|
||||||
|
|
|
@ -677,7 +677,6 @@ namespace Amib.Threading
|
||||||
: new Thread(ProcessQueuedItems);
|
: new Thread(ProcessQueuedItems);
|
||||||
#endif
|
#endif
|
||||||
// Configure the new thread and start it
|
// Configure the new thread and start it
|
||||||
workerThread.Name = "STP " + Name + " Thread #" + _threadCounter;
|
|
||||||
workerThread.IsBackground = _stpStartInfo.AreThreadsBackground;
|
workerThread.IsBackground = _stpStartInfo.AreThreadsBackground;
|
||||||
|
|
||||||
#if !(_SILVERLIGHT) && !(_WINDOWS_CE) && !(WINDOWS_PHONE)
|
#if !(_SILVERLIGHT) && !(_WINDOWS_CE) && !(WINDOWS_PHONE)
|
||||||
|
@ -691,6 +690,7 @@ namespace Amib.Threading
|
||||||
workerThread.Priority = _stpStartInfo.ThreadPriority;
|
workerThread.Priority = _stpStartInfo.ThreadPriority;
|
||||||
#endif
|
#endif
|
||||||
workerThread.Start();
|
workerThread.Start();
|
||||||
|
workerThread.Name = string.Format("STP:{0}:{1}", Name, _threadCounter);
|
||||||
++_threadCounter;
|
++_threadCounter;
|
||||||
|
|
||||||
// Add it to the dictionary and update its creation time.
|
// Add it to the dictionary and update its creation time.
|
||||||
|
|
Loading…
Reference in New Issue