Merge branch 'master' into bullet-2.82

mb-throttle-test
Robert Adams 2014-09-21 07:11:00 -07:00
commit 2ed3a918bd
12 changed files with 64 additions and 26 deletions

View File

@ -72,10 +72,12 @@ what it is today.
* Allen Kerensky
* BigFootAg
* BlueWall Slade
* bobshaffer2
* brianw/Sir_Ahzz
* CharlieO
* ChrisDown
* Chris Yeoh (IBM)
* cinderblocks
* controlbreak
* coyled
* ctrlaltdavid (David Rowe)
@ -88,6 +90,7 @@ what it is today.
* DoranZemlja
* dr0b3rts
* dslake
* eeyore
* FredoChaplin
* Garmin Kawaguichi
* Gerhard

View File

@ -171,7 +171,8 @@ namespace OpenSim.Framework.Monitoring
foreach (char c in DisallowedShortNameCharacters)
{
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;

View File

@ -87,7 +87,7 @@ namespace OpenSim.Framework.Monitoring
/// </summary>
public Stat Stat { get; set; }
public ThreadWatchdogInfo(Thread thread, int timeout)
public ThreadWatchdogInfo(Thread thread, int timeout, string name)
{
Thread = thread;
Timeout = timeout;
@ -96,8 +96,8 @@ namespace OpenSim.Framework.Monitoring
Stat
= new Stat(
thread.Name,
string.Format("Last update of thread {0}", thread.Name),
name,
string.Format("Last update of thread {0}", name),
"",
"ms",
"server",
@ -216,12 +216,11 @@ namespace OpenSim.Framework.Monitoring
bool alarmIfTimeout, Func<string> alarmMethod, int timeout, bool log = true)
{
Thread thread = new Thread(start);
thread.Name = name;
thread.Priority = priority;
thread.IsBackground = isBackground;
ThreadWatchdogInfo twi
= new ThreadWatchdogInfo(thread, timeout)
= new ThreadWatchdogInfo(thread, timeout, name)
{ AlarmIfTimeout = alarmIfTimeout, AlarmMethod = alarmMethod };
if (log)
@ -232,6 +231,8 @@ namespace OpenSim.Framework.Monitoring
m_threads.Add(twi.Thread.ManagedThreadId, twi);
thread.Start();
thread.Name = name;
return thread;
}

View File

@ -70,9 +70,9 @@ namespace OpenSim.Framework.Servers.HttpServer
_id = id;
_engine = new Thread(new ThreadStart(Engine));
_engine.Name = EngineID;
_engine.IsBackground = true;
_engine.Start();
_engine.Name = string.Format ("Engine:{0}",EngineID);
ThreadTracker.Add(_engine);
}
@ -91,9 +91,9 @@ namespace OpenSim.Framework.Servers.HttpServer
public void Start()
{
_engine = new Thread(new ThreadStart(Engine));
_engine.Name = EngineID;
_engine.IsBackground = true;
_engine.Start();
_engine.Name = string.Format ("Engine:{0}",EngineID);
ThreadTracker.Add(_engine);
}

View File

@ -150,9 +150,9 @@ namespace OpenSim.Framework.Servers.HttpServer
public void Start()
{
_engine = new Thread(new ThreadStart(Engine));
_engine.Name = _engineId;
_engine.IsBackground = true;
_engine.Start();
_engine.Name = string.Format ("Engine:{0}",_engineId);
ThreadTracker.Add(_engine);

View File

@ -144,6 +144,21 @@ namespace OpenSim.Region.Framework.Scenes
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>
/// Invoked when the client requests a prim.
/// </summary>

View File

@ -1079,6 +1079,7 @@ namespace OpenSim.Region.Framework.Scenes
StatsReporter = new SimStatsReporter(this);
StatsReporter.OnSendStatsResult += SendSimStatsPackets;
StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
}
public Scene(RegionInfo regInfo, PhysicsScene physicsScene) : base(regInfo)
@ -1396,7 +1397,7 @@ namespace OpenSim.Region.Framework.Scenes
m_heartbeatThread
= 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();
}

View File

@ -1589,7 +1589,15 @@ namespace OpenSim.Region.Framework.Scenes
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;
// 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.Length).CopyTo(data, pos + 4);
Utils.FloatToBytes(pTexAnim.Rate).CopyTo(data, pos + 8);
}
m_TextureAnimation = data;
}

View File

@ -2618,7 +2618,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
Vector3 sitPartWorldPosition = part.GetWorldPosition();
ControllingClient.SendClearFollowCamProperties(part.ParentUUID);
ParentID = 0;
@ -2647,13 +2646,13 @@ namespace OpenSim.Region.Framework.Scenes
// Vector3 standPositionAdjustment
// = 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
// hardcoding here.
Vector3 adjustmentForSitPose = new Vector3(0.74f, 0f, 0f) * standRotation;
Vector3 standPos = sitPartWorldPosition + adjustmentForSitPosition + adjustmentForSitPose;
Vector3 standPos = part.ParentGroup.AbsolutePosition + adjustmentForSitPosition + adjustmentForSitPose;
// m_log.DebugFormat(
// "[SCENE PRESENCE]: Setting stand to pos {0}, (adjustmentForSitPosition {1}, adjustmentForSitPose {2}) rotation {3} for {4} in {5}",

View File

@ -234,6 +234,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
ScenePresence sp;
if (scene.TryGetScenePresence(agentID, out sp))
{
if (sp.IsSatOnObject || sp.SitGround)
return false;
// m_log.DebugFormat(
// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}",
// sp.Name, pos, scene.RegionInfo.RegionName,

View File

@ -968,6 +968,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
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>();
if (wComm != null)
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.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>();
if (wComm != null)
wComm.DeliverMessageTo(TargetID, channel, m_host.AbsolutePosition, m_host.Name, m_host.UUID, msg);

View File

@ -677,7 +677,6 @@ namespace Amib.Threading
: new Thread(ProcessQueuedItems);
#endif
// Configure the new thread and start it
workerThread.Name = "STP " + Name + " Thread #" + _threadCounter;
workerThread.IsBackground = _stpStartInfo.AreThreadsBackground;
#if !(_SILVERLIGHT) && !(_WINDOWS_CE) && !(WINDOWS_PHONE)
@ -691,6 +690,7 @@ namespace Amib.Threading
workerThread.Priority = _stpStartInfo.ThreadPriority;
#endif
workerThread.Start();
workerThread.Name = string.Format("STP:{0}:{1}", Name, _threadCounter);
++_threadCounter;
// Add it to the dictionary and update its creation time.