Merge branch 'master' of ssh://opensimulator.org/var/git/opensim into v3_support
commit
4177571a78
|
@ -2,13 +2,19 @@
|
||||||
<!-- please leave the top comment for us emacs folks -->
|
<!-- please leave the top comment for us emacs folks -->
|
||||||
<property name="nunitcmd" value="nunit-console" />
|
<property name="nunitcmd" value="nunit-console" />
|
||||||
|
|
||||||
<!-- For safety/laziness sake, we're going to take the approach of deleting known extraneous files here rather than
|
<!-- This target produces a source distribution of OpenSimulator -->
|
||||||
trying to copy across only the essential ones -->
|
<!-- TODO: A few parameters still need to be tweaked after running this - need to do this automatically with sed or similar -->
|
||||||
<property name="distbindir" value="distbin" />
|
<target name="distsrc">
|
||||||
<target name="distbin">
|
|
||||||
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
|
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
|
||||||
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
|
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
|
||||||
<copy file="bin/config-include/FlotsamCache.ini.example" tofile="bin/config-include/FlotsamCache.ini"/>
|
<copy file="bin/config-include/FlotsamCache.ini.example" tofile="bin/config-include/FlotsamCache.ini"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<property name="distbindir" value="distbin" />
|
||||||
|
<!-- This target produces a binary directory called distbin/ in OpenSim/bin which contains everything needed for binary distribution -->
|
||||||
|
<!-- For safety/laziness sake, we're going to take the approach of deleting known extraneous files here rather than
|
||||||
|
trying to copy across only the essential ones -->
|
||||||
|
<target name="distbin">
|
||||||
<delete dir="${distbindir}"/>
|
<delete dir="${distbindir}"/>
|
||||||
<copy todir="${distbindir}">
|
<copy todir="${distbindir}">
|
||||||
<fileset>
|
<fileset>
|
||||||
|
|
|
@ -247,7 +247,7 @@ namespace OpenSim.Framework.Servers
|
||||||
string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}";
|
string reportFormat = "{0,6} {1,35} {2,16} {3,13} {4,10} {5,30}";
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreads();
|
Watchdog.ThreadWatchdogInfo[] threads = Watchdog.GetThreadsInfo();
|
||||||
|
|
||||||
sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
|
sb.Append(threads.Length + " threads are being tracked:" + Environment.NewLine);
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
String.Format("PollServiceWorkerThread{0}", i),
|
String.Format("PollServiceWorkerThread{0}", i),
|
||||||
ThreadPriority.Normal,
|
ThreadPriority.Normal,
|
||||||
false,
|
false,
|
||||||
|
true,
|
||||||
int.MaxValue);
|
int.MaxValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,6 +74,7 @@ namespace OpenSim.Framework.Servers.HttpServer
|
||||||
"PollServiceWatcherThread",
|
"PollServiceWatcherThread",
|
||||||
ThreadPriority.Normal,
|
ThreadPriority.Normal,
|
||||||
false,
|
false,
|
||||||
|
true,
|
||||||
1000 * 60 * 10);
|
1000 * 60 * 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,11 @@ namespace OpenSim.Framework
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsTimedOut { get; set; }
|
public bool IsTimedOut { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Will this thread trigger the alarm function if it has timed out?
|
||||||
|
/// </summary>
|
||||||
|
public bool AlarmIfTimeout { get; set; }
|
||||||
|
|
||||||
public ThreadWatchdogInfo(Thread thread, int timeout)
|
public ThreadWatchdogInfo(Thread thread, int timeout)
|
||||||
{
|
{
|
||||||
Thread = thread;
|
Thread = thread;
|
||||||
|
@ -112,12 +117,13 @@ namespace OpenSim.Framework
|
||||||
/// <param name="start">The method that will be executed in a new thread</param>
|
/// <param name="start">The method that will be executed in a new thread</param>
|
||||||
/// <param name="name">A name to give to the new thread</param>
|
/// <param name="name">A name to give to the new thread</param>
|
||||||
/// <param name="priority">Priority to run the thread at</param>
|
/// <param name="priority">Priority to run the thread at</param>
|
||||||
/// <param name="isBackground">True to run this thread as a background
|
/// <param name="isBackground">True to run this thread as a background thread, otherwise false</param>
|
||||||
/// thread, otherwise false</param>
|
/// <param name="alarmIfTimeout">Trigger an alarm function is we have timed out</param>
|
||||||
/// <returns>The newly created Thread object</returns>
|
/// <returns>The newly created Thread object</returns>
|
||||||
public static Thread StartThread(ThreadStart start, string name, ThreadPriority priority, bool isBackground)
|
public static Thread StartThread(
|
||||||
|
ThreadStart start, string name, ThreadPriority priority, bool isBackground, bool alarmIfTimeout)
|
||||||
{
|
{
|
||||||
return StartThread(start, name, priority, isBackground, WATCHDOG_TIMEOUT_MS);
|
return StartThread(start, name, priority, isBackground, alarmIfTimeout, WATCHDOG_TIMEOUT_MS);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -128,21 +134,21 @@ namespace OpenSim.Framework
|
||||||
/// <param name="priority">Priority to run the thread at</param>
|
/// <param name="priority">Priority to run the thread at</param>
|
||||||
/// <param name="isBackground">True to run this thread as a background
|
/// <param name="isBackground">True to run this thread as a background
|
||||||
/// thread, otherwise false</param>
|
/// thread, otherwise false</param>
|
||||||
/// <param name="timeout">
|
/// <param name="alarmIfTimeout">Trigger an alarm function is we have timed out</param>
|
||||||
/// Number of milliseconds to wait until we issue a warning about timeout.
|
/// <param name="timeout">Number of milliseconds to wait until we issue a warning about timeout.</param>
|
||||||
/// </para>
|
|
||||||
/// <returns>The newly created Thread object</returns>
|
/// <returns>The newly created Thread object</returns>
|
||||||
public static Thread StartThread(
|
public static Thread StartThread(
|
||||||
ThreadStart start, string name, ThreadPriority priority, bool isBackground, int timeout)
|
ThreadStart start, string name, ThreadPriority priority, bool isBackground, bool alarmIfTimeout, int timeout)
|
||||||
{
|
{
|
||||||
Thread thread = new Thread(start);
|
Thread thread = new Thread(start);
|
||||||
thread.Name = name;
|
thread.Name = name;
|
||||||
thread.Priority = priority;
|
thread.Priority = priority;
|
||||||
thread.IsBackground = isBackground;
|
thread.IsBackground = isBackground;
|
||||||
|
|
||||||
ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout);
|
ThreadWatchdogInfo twi = new ThreadWatchdogInfo(thread, timeout) { AlarmIfTimeout = alarmIfTimeout };
|
||||||
|
|
||||||
m_log.Debug("[WATCHDOG]: Started tracking thread \"" + twi.Thread.Name + "\" (ID " + twi.Thread.ManagedThreadId + ")");
|
m_log.DebugFormat(
|
||||||
|
"[WATCHDOG]: Started tracking thread {0}, ID {1}", twi.Thread.Name, twi.Thread.ManagedThreadId);
|
||||||
|
|
||||||
lock (m_threads)
|
lock (m_threads)
|
||||||
m_threads.Add(twi.Thread.ManagedThreadId, twi);
|
m_threads.Add(twi.Thread.ManagedThreadId, twi);
|
||||||
|
@ -224,19 +230,39 @@ namespace OpenSim.Framework
|
||||||
/// Get currently watched threads for diagnostic purposes
|
/// Get currently watched threads for diagnostic purposes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static ThreadWatchdogInfo[] GetThreads()
|
public static ThreadWatchdogInfo[] GetThreadsInfo()
|
||||||
{
|
{
|
||||||
lock (m_threads)
|
lock (m_threads)
|
||||||
return m_threads.Values.ToArray();
|
return m_threads.Values.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return the current thread's watchdog info.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The watchdog info. null if the thread isn't being monitored.</returns>
|
||||||
|
public static ThreadWatchdogInfo GetCurrentThreadInfo()
|
||||||
|
{
|
||||||
|
lock (m_threads)
|
||||||
|
{
|
||||||
|
if (m_threads.ContainsKey(Thread.CurrentThread.ManagedThreadId))
|
||||||
|
return m_threads[Thread.CurrentThread.ManagedThreadId];
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Check watched threads. Fire alarm if appropriate.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
private static void WatchdogTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
|
private static void WatchdogTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
WatchdogTimeout callback = OnWatchdogTimeout;
|
WatchdogTimeout callback = OnWatchdogTimeout;
|
||||||
|
|
||||||
if (callback != null)
|
if (callback != null)
|
||||||
{
|
{
|
||||||
ThreadWatchdogInfo timedOut = null;
|
List<ThreadWatchdogInfo> callbackInfos = null;
|
||||||
|
|
||||||
lock (m_threads)
|
lock (m_threads)
|
||||||
{
|
{
|
||||||
|
@ -246,21 +272,31 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
if (threadInfo.Thread.ThreadState == ThreadState.Stopped)
|
if (threadInfo.Thread.ThreadState == ThreadState.Stopped)
|
||||||
{
|
{
|
||||||
timedOut = threadInfo;
|
|
||||||
RemoveThread(threadInfo.Thread.ManagedThreadId);
|
RemoveThread(threadInfo.Thread.ManagedThreadId);
|
||||||
break;
|
|
||||||
|
if (callbackInfos == null)
|
||||||
|
callbackInfos = new List<ThreadWatchdogInfo>();
|
||||||
|
|
||||||
|
callbackInfos.Add(threadInfo);
|
||||||
}
|
}
|
||||||
else if (!threadInfo.IsTimedOut && now - threadInfo.LastTick >= threadInfo.Timeout)
|
else if (!threadInfo.IsTimedOut && now - threadInfo.LastTick >= threadInfo.Timeout)
|
||||||
{
|
{
|
||||||
threadInfo.IsTimedOut = true;
|
threadInfo.IsTimedOut = true;
|
||||||
timedOut = threadInfo;
|
|
||||||
break;
|
if (threadInfo.AlarmIfTimeout)
|
||||||
|
{
|
||||||
|
if (callbackInfos == null)
|
||||||
|
callbackInfos = new List<ThreadWatchdogInfo>();
|
||||||
|
|
||||||
|
callbackInfos.Add(threadInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timedOut != null)
|
if (callbackInfos != null)
|
||||||
callback(timedOut.Thread, timedOut.LastTick);
|
foreach (ThreadWatchdogInfo callbackInfo in callbackInfos)
|
||||||
|
callback(callbackInfo.Thread, callbackInfo.LastTick);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_watchdogTimer.Start();
|
m_watchdogTimer.Start();
|
||||||
|
|
|
@ -244,8 +244,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
base.Start(m_recvBufferSize, m_asyncPacketHandling);
|
base.Start(m_recvBufferSize, m_asyncPacketHandling);
|
||||||
|
|
||||||
// Start the packet processing threads
|
// Start the packet processing threads
|
||||||
Watchdog.StartThread(IncomingPacketHandler, "Incoming Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false);
|
Watchdog.StartThread(
|
||||||
Watchdog.StartThread(OutgoingPacketHandler, "Outgoing Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false);
|
IncomingPacketHandler, "Incoming Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false, true);
|
||||||
|
Watchdog.StartThread(
|
||||||
|
OutgoingPacketHandler, "Outgoing Packets (" + m_scene.RegionInfo.RegionName + ")", ThreadPriority.Normal, false, true);
|
||||||
|
|
||||||
m_elapsedMSSinceLastStatReport = Environment.TickCount;
|
m_elapsedMSSinceLastStatReport = Environment.TickCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -349,8 +349,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME.");
|
|
||||||
|
|
||||||
Dictionary<string, object> options = new Dictionary<string, object>();
|
Dictionary<string, object> options = new Dictionary<string, object>();
|
||||||
OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; });
|
OptionSet optionSet = new OptionSet().Add("m|merge", delegate (string v) { options["merge"] = v != null; });
|
||||||
|
|
||||||
|
@ -412,7 +410,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME.");
|
|
||||||
if (options.ContainsKey("home"))
|
if (options.ContainsKey("home"))
|
||||||
m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -home option if you want to produce a compatible IAR");
|
m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -home option if you want to produce a compatible IAR");
|
||||||
|
|
||||||
|
|
|
@ -1210,7 +1210,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||||
if (homeScene.TryGetScenePresence(avatarId,out avatar))
|
if (homeScene.TryGetScenePresence(avatarId,out avatar))
|
||||||
{
|
{
|
||||||
KillAUser ku = new KillAUser(avatar,mod);
|
KillAUser ku = new KillAUser(avatar,mod);
|
||||||
Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true);
|
Watchdog.StartThread(ku.ShutdownNoLogout, "OGPShutdown", ThreadPriority.Normal, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,8 +94,11 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
// caches ExtendedLandData
|
// caches ExtendedLandData
|
||||||
private Cache parcelInfoCache;
|
private Cache parcelInfoCache;
|
||||||
private Dictionary<UUID, Vector3> forcedPosition =
|
|
||||||
new Dictionary<UUID, Vector3>();
|
/// <summary>
|
||||||
|
/// Record positions that avatar's are currently being forced to move to due to parcel entry restrictions.
|
||||||
|
/// </summary>
|
||||||
|
private Dictionary<UUID, Vector3> forcedPosition = new Dictionary<UUID, Vector3>();
|
||||||
|
|
||||||
#region INonSharedRegionModule Members
|
#region INonSharedRegionModule Members
|
||||||
|
|
||||||
|
@ -224,22 +227,34 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
//When the avatar walks into a ban line on the ground, it prevents getting stuck
|
//When the avatar walks into a ban line on the ground, it prevents getting stuck
|
||||||
agentData.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
|
agentData.ControlFlags = (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
|
||||||
|
|
||||||
|
|
||||||
//Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines
|
//Make sure we stop if they get about to the right place to prevent yoyo and prevents getting stuck on banlines
|
||||||
if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2)
|
if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) < .2)
|
||||||
{
|
{
|
||||||
Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition));
|
// m_log.DebugFormat(
|
||||||
|
// "[LAND MANAGEMENT MODULE]: Stopping force position of {0} because {1} is close enough to {2}",
|
||||||
|
// clientAvatar.Name, clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]);
|
||||||
|
|
||||||
forcedPosition.Remove(remoteClient.AgentId);
|
forcedPosition.Remove(remoteClient.AgentId);
|
||||||
}
|
}
|
||||||
//if we are far away, teleport
|
//if we are far away, teleport
|
||||||
else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3)
|
else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]) > 3)
|
||||||
{
|
{
|
||||||
Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition[remoteClient.AgentId], clientAvatar.AbsolutePosition));
|
Vector3 forcePosition = forcedPosition[remoteClient.AgentId];
|
||||||
clientAvatar.Teleport(forcedPosition[remoteClient.AgentId]);
|
// m_log.DebugFormat(
|
||||||
|
// "[LAND MANAGEMENT MODULE]: Teleporting out {0} because {1} is too far from avatar position {2}",
|
||||||
|
// clientAvatar.Name, clientAvatar.AbsolutePosition, forcePosition);
|
||||||
|
|
||||||
|
m_scene.RequestTeleportLocation(remoteClient, m_scene.RegionInfo.RegionHandle,
|
||||||
|
forcePosition, clientAvatar.Lookat, (uint)Constants.TeleportFlags.ForceRedirect);
|
||||||
|
|
||||||
forcedPosition.Remove(remoteClient.AgentId);
|
forcedPosition.Remove(remoteClient.AgentId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat(
|
||||||
|
// "[LAND MANAGEMENT MODULE]: Forcing {0} from {1} to {2}",
|
||||||
|
// clientAvatar.Name, clientAvatar.AbsolutePosition, forcedPosition[remoteClient.AgentId]);
|
||||||
|
|
||||||
//Forces them toward the forced position we want if they aren't there yet
|
//Forces them toward the forced position we want if they aren't there yet
|
||||||
agentData.UseClientAgentPosition = true;
|
agentData.UseClientAgentPosition = true;
|
||||||
agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId];
|
agentData.ClientAgentPosition = forcedPosition[remoteClient.AgentId];
|
||||||
|
|
|
@ -351,6 +351,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
process,
|
process,
|
||||||
string.Format("MapItemRequestThread ({0})", m_scene.RegionInfo.RegionName),
|
string.Format("MapItemRequestThread ({0})", m_scene.RegionInfo.RegionName),
|
||||||
ThreadPriority.BelowNormal,
|
ThreadPriority.BelowNormal,
|
||||||
|
true,
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1140,7 +1140,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
HeartbeatThread
|
HeartbeatThread
|
||||||
= Watchdog.StartThread(
|
= Watchdog.StartThread(
|
||||||
Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false);
|
Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1178,6 +1178,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_eventManager.TriggerOnRegionStarted(this);
|
m_eventManager.TriggerOnRegionStarted(this);
|
||||||
|
|
||||||
|
// The first frame can take a very long time due to physics actors being added on startup. Therefore,
|
||||||
|
// don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false
|
||||||
|
// alarms for scenes with many objects.
|
||||||
|
Update();
|
||||||
|
Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true;
|
||||||
|
|
||||||
while (!shuttingdown)
|
while (!shuttingdown)
|
||||||
Update();
|
Update();
|
||||||
|
|
||||||
|
@ -1206,7 +1213,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
++Frame;
|
++Frame;
|
||||||
|
|
||||||
// m_log.DebugFormat("[SCENE]: Processing frame {0}", Frame);
|
// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -1361,26 +1368,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
catch (AccessViolationException e)
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"[REGION]: Failed on region {0} with exception {1}{2}",
|
|
||||||
RegionInfo.RegionName, e.Message, e.StackTrace);
|
|
||||||
}
|
|
||||||
//catch (NullReferenceException e)
|
|
||||||
//{
|
|
||||||
// m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
|
|
||||||
//}
|
|
||||||
catch (InvalidOperationException e)
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"[REGION]: Failed on region {0} with exception {1}{2}",
|
|
||||||
RegionInfo.RegionName, e.Message, e.StackTrace);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat(
|
m_log.ErrorFormat(
|
||||||
"[REGION]: Failed on region {0} with exception {1}{2}",
|
"[SCENE]: Failed on region {0} with exception {1}{2}",
|
||||||
RegionInfo.RegionName, e.Message, e.StackTrace);
|
RegionInfo.RegionName, e.Message, e.StackTrace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1418,7 +1409,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
entry.checkAtTargets();
|
entry.checkAtTargets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send out simstats data to all clients
|
/// Send out simstats data to all clients
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -4699,7 +4689,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Vector3? nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
|
Vector3? nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
|
||||||
if (nearestPoint != null)
|
if (nearestPoint != null)
|
||||||
{
|
{
|
||||||
Debug.WriteLine("Found a sane previous position based on velocity, sending them to: " + nearestPoint.ToString());
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE]: Found a sane previous position based on velocity for {0}, sending them to {1} in {2}",
|
||||||
|
// avatar.Name, nearestPoint, nearestParcel.LandData.Name);
|
||||||
|
|
||||||
return nearestPoint.Value;
|
return nearestPoint.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4709,12 +4702,16 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
|
nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
|
||||||
if (nearestPoint != null)
|
if (nearestPoint != null)
|
||||||
{
|
{
|
||||||
Debug.WriteLine("They had a zero velocity, sending them to: " + nearestPoint.ToString());
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE]: {0} had a zero velocity, sending them to {1}", avatar.Name, nearestPoint);
|
||||||
|
|
||||||
return nearestPoint.Value;
|
return nearestPoint.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Ultimate backup if we have no idea where they are
|
//Ultimate backup if we have no idea where they are
|
||||||
Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString());
|
// m_log.DebugFormat(
|
||||||
|
// "[SCENE]: No idea where {0} is, sending them to {1}", avatar.Name, avatar.lastKnownAllowedPosition);
|
||||||
|
|
||||||
return avatar.lastKnownAllowedPosition;
|
return avatar.lastKnownAllowedPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5120,7 +5117,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget);
|
// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget);
|
||||||
|
|
||||||
Vector3 agent_control_v3 = new Vector3();
|
Vector3 agent_control_v3 = new Vector3();
|
||||||
presence.HandleMoveToTargetUpdate(ref agent_control_v3);
|
presence.HandleMoveToTargetUpdate(1, ref agent_control_v3);
|
||||||
presence.AddNewMovement(agent_control_v3);
|
presence.AddNewMovement(agent_control_v3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,8 +156,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// that the region position is cached or performance will degrade
|
// that the region position is cached or performance will degrade
|
||||||
Utils.LongToUInts(regionHandle, out x, out y);
|
Utils.LongToUInts(regionHandle, out x, out y);
|
||||||
GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
|
GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y);
|
||||||
bool v = true;
|
// bool v = true;
|
||||||
if (! simulatorList.Contains(dest.ServerURI))
|
if (!simulatorList.Contains(dest.ServerURI))
|
||||||
{
|
{
|
||||||
// we havent seen this simulator before, add it to the list
|
// we havent seen this simulator before, add it to the list
|
||||||
// and send it an update
|
// and send it an update
|
||||||
|
|
|
@ -1048,7 +1048,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Do not call this directly. Call Scene.RequestTeleportLocation() instead.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
public void Teleport(Vector3 pos)
|
public void Teleport(Vector3 pos)
|
||||||
|
@ -1522,7 +1522,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else if (bAllowUpdateMoveToPosition)
|
else if (bAllowUpdateMoveToPosition)
|
||||||
{
|
{
|
||||||
if (HandleMoveToTargetUpdate(ref agent_control_v3))
|
// The UseClientAgentPosition is set if parcel ban is forcing the avatar to move to a
|
||||||
|
// certain position. It's only check for tolerance on returning to that position is 0.2
|
||||||
|
// rather than 1, at which point it removes its force target.
|
||||||
|
if (HandleMoveToTargetUpdate(agentData.UseClientAgentPosition ? 0.2 : 1, ref agent_control_v3))
|
||||||
update_movementflag = true;
|
update_movementflag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1584,7 +1587,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param>
|
/// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param>
|
||||||
/// <returns>True if movement has been updated in some way. False otherwise.</returns>
|
/// <returns>True if movement has been updated in some way. False otherwise.</returns>
|
||||||
public bool HandleMoveToTargetUpdate(ref Vector3 agent_control_v3)
|
public bool HandleMoveToTargetUpdate(double tolerance, ref Vector3 agent_control_v3)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
|
// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
|
||||||
|
|
||||||
|
@ -1601,7 +1604,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Name, AbsolutePosition, MoveToPositionTarget, distanceToTarget);
|
// Name, AbsolutePosition, MoveToPositionTarget, distanceToTarget);
|
||||||
|
|
||||||
// Check the error term of the current position in relation to the target position
|
// Check the error term of the current position in relation to the target position
|
||||||
if (distanceToTarget <= 1)
|
if (distanceToTarget <= tolerance)
|
||||||
{
|
{
|
||||||
// We are close enough to the target
|
// We are close enough to the target
|
||||||
AbsolutePosition = MoveToPositionTarget;
|
AbsolutePosition = MoveToPositionTarget;
|
||||||
|
@ -1777,7 +1780,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation);
|
// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation);
|
||||||
|
|
||||||
Vector3 agent_control_v3 = new Vector3();
|
Vector3 agent_control_v3 = new Vector3();
|
||||||
HandleMoveToTargetUpdate(ref agent_control_v3);
|
HandleMoveToTargetUpdate(1, ref agent_control_v3);
|
||||||
AddNewMovement(agent_control_v3);
|
AddNewMovement(agent_control_v3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
m_client = client;
|
m_client = client;
|
||||||
m_scene = scene;
|
m_scene = scene;
|
||||||
|
|
||||||
Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false);
|
Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendServerCommand(string command)
|
private void SendServerCommand(string command)
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
|
|
||||||
m_listener.Start(50);
|
m_listener.Start(50);
|
||||||
|
|
||||||
Watchdog.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false);
|
Watchdog.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false, true);
|
||||||
m_baseScene = baseScene;
|
m_baseScene = baseScene;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1474,6 +1474,8 @@ Console.WriteLine("CreateGeom:");
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void changeadd()
|
private void changeadd()
|
||||||
{
|
{
|
||||||
|
// m_log.DebugFormat("[ODE PRIM]: Adding prim {0}", Name);
|
||||||
|
|
||||||
int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
|
int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
|
||||||
IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position);
|
IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position);
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (cmdHandlerThread == null)
|
if (cmdHandlerThread == null)
|
||||||
{
|
{
|
||||||
// Start the thread that will be doing the work
|
// Start the thread that will be doing the work
|
||||||
cmdHandlerThread = Watchdog.StartThread(CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true);
|
cmdHandlerThread
|
||||||
|
= Watchdog.StartThread(
|
||||||
|
CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6376,16 +6376,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
|
protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
|
||||||
// LSL quaternions can normalize to 0, normal Quaternions can't.
|
// LSL quaternions can normalize to 0, normal Quaternions can't.
|
||||||
if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
|
if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
|
||||||
rot.z = 1; // ZERO_ROTATION = 0,0,0,1
|
rot.z = 1; // ZERO_ROTATION = 0,0,0,1
|
||||||
|
|
||||||
m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
|
part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
|
||||||
m_host.SitTargetOrientation = Rot2Quaternion(rot);
|
part.SitTargetOrientation = Rot2Quaternion(rot);
|
||||||
m_host.ParentGroup.HasGroupChanged = true;
|
part.ParentGroup.HasGroupChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
SitTarget(m_host, offset, rot);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
if (link == ScriptBaseClass.LINK_ROOT)
|
||||||
|
SitTarget(m_host.ParentGroup.RootPart, offset, rot);
|
||||||
|
else if (link == ScriptBaseClass.LINK_THIS)
|
||||||
|
SitTarget(m_host, offset, rot);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
|
||||||
|
if (null != part)
|
||||||
|
{
|
||||||
|
SitTarget(part, offset, rot);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_String llAvatarOnSitTarget()
|
public LSL_String llAvatarOnSitTarget()
|
||||||
|
@ -7047,10 +7069,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
shapeBlock.PathScaleX = 100;
|
shapeBlock.PathScaleX = 100;
|
||||||
shapeBlock.PathScaleY = 150;
|
shapeBlock.PathScaleY = 150;
|
||||||
|
|
||||||
if (type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER &&
|
int flag = type & (ScriptBaseClass.PRIM_SCULPT_FLAG_INVERT | ScriptBaseClass.PRIM_SCULPT_FLAG_MIRROR);
|
||||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE &&
|
|
||||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE &&
|
if (type != (ScriptBaseClass.PRIM_SCULPT_TYPE_CYLINDER | flag) &&
|
||||||
type != (int)ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS)
|
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_PLANE | flag) &&
|
||||||
|
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE | flag) &&
|
||||||
|
type != (ScriptBaseClass.PRIM_SCULPT_TYPE_TORUS | flag))
|
||||||
{
|
{
|
||||||
// default
|
// default
|
||||||
type = (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE;
|
type = (int)ScriptBaseClass.PRIM_SCULPT_TYPE_SPHERE;
|
||||||
|
@ -8151,23 +8175,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
ScriptSleep(1000);
|
ScriptSleep(1000);
|
||||||
|
return GetPrimMediaParams(m_host, face, rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
ScriptSleep(1000);
|
||||||
|
if (link == ScriptBaseClass.LINK_ROOT)
|
||||||
|
return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules);
|
||||||
|
else if (link == ScriptBaseClass.LINK_THIS)
|
||||||
|
return GetPrimMediaParams(m_host, face, rules);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
|
||||||
|
if (null != part)
|
||||||
|
return GetPrimMediaParams(part, face, rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new LSL_List();
|
||||||
|
}
|
||||||
|
|
||||||
|
private LSL_List GetPrimMediaParams(SceneObjectPart part, int face, LSL_List rules)
|
||||||
|
{
|
||||||
// LSL Spec http://wiki.secondlife.com/wiki/LlGetPrimMediaParams says to fail silently if face is invalid
|
// LSL Spec http://wiki.secondlife.com/wiki/LlGetPrimMediaParams says to fail silently if face is invalid
|
||||||
// TODO: Need to correctly handle case where a face has no media (which gives back an empty list).
|
// TODO: Need to correctly handle case where a face has no media (which gives back an empty list).
|
||||||
// Assuming silently fail means give back an empty list. Ideally, need to check this.
|
// Assuming silently fail means give back an empty list. Ideally, need to check this.
|
||||||
if (face < 0 || face > m_host.GetNumberOfSides() - 1)
|
if (face < 0 || face > part.GetNumberOfSides() - 1)
|
||||||
return new LSL_List();
|
return new LSL_List();
|
||||||
|
|
||||||
return GetPrimMediaParams(face, rules);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LSL_List GetPrimMediaParams(int face, LSL_List rules)
|
|
||||||
{
|
|
||||||
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
|
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
|
||||||
if (null == module)
|
if (null == module)
|
||||||
throw new Exception("Media on a prim functions not available");
|
return new LSL_List();
|
||||||
|
|
||||||
MediaEntry me = module.GetMediaEntry(m_host, face);
|
MediaEntry me = module.GetMediaEntry(part, face);
|
||||||
|
|
||||||
// As per http://wiki.secondlife.com/wiki/LlGetPrimMediaParams
|
// As per http://wiki.secondlife.com/wiki/LlGetPrimMediaParams
|
||||||
if (null == me)
|
if (null == me)
|
||||||
|
@ -8249,33 +8290,52 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
|
case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
|
||||||
res.Add(new LSL_Integer((int)me.ControlPermissions));
|
res.Add(new LSL_Integer((int)me.ControlPermissions));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default: return ScriptBaseClass.LSL_STATUS_MALFORMED_PARAMS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules)
|
public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
ScriptSleep(1000);
|
ScriptSleep(1000);
|
||||||
|
return SetPrimMediaParams(m_host, face, rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
ScriptSleep(1000);
|
||||||
|
if (link == ScriptBaseClass.LINK_ROOT)
|
||||||
|
return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules);
|
||||||
|
else if (link == ScriptBaseClass.LINK_THIS)
|
||||||
|
return SetPrimMediaParams(m_host, face, rules);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
|
||||||
|
if (null != part)
|
||||||
|
return SetPrimMediaParams(part, face, rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
private LSL_Integer SetPrimMediaParams(SceneObjectPart part, LSL_Integer face, LSL_List rules)
|
||||||
|
{
|
||||||
// LSL Spec http://wiki.secondlife.com/wiki/LlSetPrimMediaParams says to fail silently if face is invalid
|
// LSL Spec http://wiki.secondlife.com/wiki/LlSetPrimMediaParams says to fail silently if face is invalid
|
||||||
// Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this.
|
// Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this.
|
||||||
// Don't perform the media check directly
|
// Don't perform the media check directly
|
||||||
if (face < 0 || face > m_host.GetNumberOfSides() - 1)
|
if (face < 0 || face > part.GetNumberOfSides() - 1)
|
||||||
return ScriptBaseClass.LSL_STATUS_OK;
|
return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
|
||||||
|
|
||||||
return SetPrimMediaParams(face, rules);
|
|
||||||
}
|
|
||||||
|
|
||||||
private LSL_Integer SetPrimMediaParams(int face, LSL_List rules)
|
|
||||||
{
|
|
||||||
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
|
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
|
||||||
if (null == module)
|
if (null == module)
|
||||||
throw new Exception("Media on a prim functions not available");
|
return ScriptBaseClass.LSL_STATUS_NOT_SUPPORTED;
|
||||||
|
|
||||||
MediaEntry me = module.GetMediaEntry(m_host, face);
|
MediaEntry me = module.GetMediaEntry(part, face);
|
||||||
if (null == me)
|
if (null == me)
|
||||||
me = new MediaEntry();
|
me = new MediaEntry();
|
||||||
|
|
||||||
|
@ -8354,10 +8414,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
|
case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
|
||||||
me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
|
me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default: return ScriptBaseClass.LSL_STATUS_MALFORMED_PARAMS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.SetMediaEntry(m_host, face, me);
|
module.SetMediaEntry(part, face, me);
|
||||||
|
|
||||||
return ScriptBaseClass.LSL_STATUS_OK;
|
return ScriptBaseClass.LSL_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
@ -8366,18 +8428,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
ScriptSleep(1000);
|
ScriptSleep(1000);
|
||||||
|
return ClearPrimMedia(m_host, face);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face)
|
||||||
|
{
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
ScriptSleep(1000);
|
||||||
|
if (link == ScriptBaseClass.LINK_ROOT)
|
||||||
|
return ClearPrimMedia(m_host.ParentGroup.RootPart, face);
|
||||||
|
else if (link == ScriptBaseClass.LINK_THIS)
|
||||||
|
return ClearPrimMedia(m_host, face);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
|
||||||
|
if (null != part)
|
||||||
|
return ClearPrimMedia(part, face);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
private LSL_Integer ClearPrimMedia(SceneObjectPart part, LSL_Integer face)
|
||||||
|
{
|
||||||
// LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid
|
// LSL Spec http://wiki.secondlife.com/wiki/LlClearPrimMedia says to fail silently if face is invalid
|
||||||
// Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this.
|
// Assuming silently fail means sending back LSL_STATUS_OK. Ideally, need to check this.
|
||||||
// FIXME: Don't perform the media check directly
|
// FIXME: Don't perform the media check directly
|
||||||
if (face < 0 || face > m_host.GetNumberOfSides() - 1)
|
if (face < 0 || face > part.GetNumberOfSides() - 1)
|
||||||
return ScriptBaseClass.LSL_STATUS_OK;
|
return ScriptBaseClass.LSL_STATUS_NOT_FOUND;
|
||||||
|
|
||||||
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
|
IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
|
||||||
if (null == module)
|
if (null == module)
|
||||||
throw new Exception("Media on a prim functions not available");
|
return ScriptBaseClass.LSL_STATUS_NOT_SUPPORTED;
|
||||||
|
|
||||||
module.ClearMediaEntry(m_host, face);
|
module.ClearMediaEntry(part, face);
|
||||||
|
|
||||||
return ScriptBaseClass.LSL_STATUS_OK;
|
return ScriptBaseClass.LSL_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2740,7 +2740,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
|
CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
|
ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
|
||||||
avatar.SpeedModifier = (float)SpeedModifier;
|
|
||||||
|
if (avatar != null)
|
||||||
|
avatar.SpeedModifier = (float)SpeedModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void osKickAvatar(string FirstName,string SurName,string alert)
|
public void osKickAvatar(string FirstName,string SurName,string alert)
|
||||||
|
|
|
@ -64,6 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_List llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options);
|
LSL_List llCastRay(LSL_Vector start, LSL_Vector end, LSL_List options);
|
||||||
LSL_Integer llCeil(double f);
|
LSL_Integer llCeil(double f);
|
||||||
void llClearCameraParams();
|
void llClearCameraParams();
|
||||||
|
LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face);
|
||||||
LSL_Integer llClearPrimMedia(LSL_Integer face);
|
LSL_Integer llClearPrimMedia(LSL_Integer face);
|
||||||
void llCloseRemoteDataChannel(string channel);
|
void llCloseRemoteDataChannel(string channel);
|
||||||
LSL_Float llCloud(LSL_Vector offset);
|
LSL_Float llCloud(LSL_Vector offset);
|
||||||
|
@ -139,7 +140,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_String llGetLinkName(int linknum);
|
LSL_String llGetLinkName(int linknum);
|
||||||
LSL_Integer llGetLinkNumber();
|
LSL_Integer llGetLinkNumber();
|
||||||
LSL_Integer llGetLinkNumberOfSides(int link);
|
LSL_Integer llGetLinkNumberOfSides(int link);
|
||||||
LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules);
|
LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules);
|
||||||
|
LSL_List llGetLinkPrimitiveParams(int linknum, LSL_List rules);
|
||||||
LSL_Integer llGetListEntryType(LSL_List src, int index);
|
LSL_Integer llGetListEntryType(LSL_List src, int index);
|
||||||
LSL_Integer llGetListLength(LSL_List src);
|
LSL_Integer llGetListLength(LSL_List src);
|
||||||
LSL_Vector llGetLocalPos();
|
LSL_Vector llGetLocalPos();
|
||||||
|
@ -218,6 +220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
LSL_String llGetDisplayName(string id);
|
LSL_String llGetDisplayName(string id);
|
||||||
LSL_String llRequestDisplayName(string id);
|
LSL_String llRequestDisplayName(string id);
|
||||||
void llLinkParticleSystem(int linknum, LSL_List rules);
|
void llLinkParticleSystem(int linknum, LSL_List rules);
|
||||||
|
void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot);
|
||||||
LSL_String llList2CSV(LSL_List src);
|
LSL_String llList2CSV(LSL_List src);
|
||||||
LSL_Float llList2Float(LSL_List src, int index);
|
LSL_Float llList2Float(LSL_List src, int index);
|
||||||
LSL_Integer llList2Integer(LSL_List src, int index);
|
LSL_Integer llList2Integer(LSL_List src, int index);
|
||||||
|
@ -334,6 +337,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void llSetInventoryPermMask(string item, int mask, int value);
|
void llSetInventoryPermMask(string item, int mask, int value);
|
||||||
void llSetLinkAlpha(int linknumber, double alpha, int face);
|
void llSetLinkAlpha(int linknumber, double alpha, int face);
|
||||||
void llSetLinkColor(int linknumber, LSL_Vector color, int face);
|
void llSetLinkColor(int linknumber, LSL_Vector color, int face);
|
||||||
|
LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules);
|
||||||
void llSetLinkPrimitiveParams(int linknumber, LSL_List rules);
|
void llSetLinkPrimitiveParams(int linknumber, LSL_List rules);
|
||||||
void llSetLinkTexture(int linknumber, string texture, int face);
|
void llSetLinkTexture(int linknumber, string texture, int face);
|
||||||
void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate);
|
void llSetLinkTextureAnim(int linknum, int mode, int face, int sizex, int sizey, double start, double length, double rate);
|
||||||
|
@ -344,7 +348,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void llSetParcelMusicURL(string url);
|
void llSetParcelMusicURL(string url);
|
||||||
void llSetPayPrice(int price, LSL_List quick_pay_buttons);
|
void llSetPayPrice(int price, LSL_List quick_pay_buttons);
|
||||||
void llSetPos(LSL_Vector pos);
|
void llSetPos(LSL_Vector pos);
|
||||||
LSL_Integer llSetPrimMediaParams(int face, LSL_List rules);
|
LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules);
|
||||||
void llSetPrimitiveParams(LSL_List rules);
|
void llSetPrimitiveParams(LSL_List rules);
|
||||||
void llSetLinkPrimitiveParamsFast(int linknum, LSL_List rules);
|
void llSetLinkPrimitiveParamsFast(int linknum, LSL_List rules);
|
||||||
void llSetPrimURL(string url);
|
void llSetPrimURL(string url);
|
||||||
|
|
|
@ -378,6 +378,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
public const int PRIM_SCULPT_TYPE_TORUS = 2;
|
public const int PRIM_SCULPT_TYPE_TORUS = 2;
|
||||||
public const int PRIM_SCULPT_TYPE_PLANE = 3;
|
public const int PRIM_SCULPT_TYPE_PLANE = 3;
|
||||||
public const int PRIM_SCULPT_TYPE_CYLINDER = 4;
|
public const int PRIM_SCULPT_TYPE_CYLINDER = 4;
|
||||||
|
public const int PRIM_SCULPT_FLAG_INVERT = 64;
|
||||||
|
public const int PRIM_SCULPT_FLAG_MIRROR = 128;
|
||||||
|
|
||||||
public const int MASK_BASE = 0;
|
public const int MASK_BASE = 0;
|
||||||
public const int MASK_OWNER = 1;
|
public const int MASK_OWNER = 1;
|
||||||
|
|
|
@ -1688,6 +1688,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
m_LSL_Functions.llSitTarget(offset, rot);
|
m_LSL_Functions.llSitTarget(offset, rot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
|
||||||
|
{
|
||||||
|
m_LSL_Functions.llLinkSitTarget(link, offset, rot);
|
||||||
|
}
|
||||||
|
|
||||||
public void llSleep(double sec)
|
public void llSleep(double sec)
|
||||||
{
|
{
|
||||||
m_LSL_Functions.llSleep(sec);
|
m_LSL_Functions.llSleep(sec);
|
||||||
|
@ -1882,17 +1887,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llGetPrimMediaParams(face, rules);
|
return m_LSL_Functions.llGetPrimMediaParams(face, rules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llGetLinkMedia(link, face, rules);
|
||||||
|
}
|
||||||
|
|
||||||
public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules)
|
public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules)
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llSetPrimMediaParams(face, rules);
|
return m_LSL_Functions.llSetPrimMediaParams(face, rules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llSetLinkMedia(link, face, rules);
|
||||||
|
}
|
||||||
|
|
||||||
public LSL_Integer llClearPrimMedia(LSL_Integer face)
|
public LSL_Integer llClearPrimMedia(LSL_Integer face)
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llClearPrimMedia(face);
|
return m_LSL_Functions.llClearPrimMedia(face);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face)
|
||||||
|
{
|
||||||
|
return m_LSL_Functions.llClearLinkMedia(link, face);
|
||||||
|
}
|
||||||
|
|
||||||
public void print(string str)
|
public void print(string str)
|
||||||
{
|
{
|
||||||
m_LSL_Functions.print(str);
|
m_LSL_Functions.print(str);
|
||||||
|
|
|
@ -83,6 +83,9 @@ namespace OpenSim.Region.UserStatistics
|
||||||
{
|
{
|
||||||
if (m_scenes.Count == 0)
|
if (m_scenes.Count == 0)
|
||||||
{
|
{
|
||||||
|
if (Util.IsWindows())
|
||||||
|
Util.LoadArchSpecificWindowsDll("sqlite3.dll");
|
||||||
|
|
||||||
//IConfig startupConfig = config.Configs["Startup"];
|
//IConfig startupConfig = config.Configs["Startup"];
|
||||||
|
|
||||||
dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3");
|
dbConn = new SqliteConnection("URI=file:LocalUserStatistics.db,version=3");
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
bin/Fadd.dll
BIN
bin/Fadd.dll
Binary file not shown.
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="osx" dll="sqlite3" target="./libsqlite3.dylib" />
|
<dllmap os="osx" dll="sqlite3" target="lib64/libsqlite3.dylib" />
|
||||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" wordsize="64" dll="sqlite3" target="./libsqlite3_64.so" />
|
<dllmap os="!windows,osx" cpu="x86-64,ia64" wordsize="64" dll="sqlite3" target="lib64/libsqlite3_64.so" />
|
||||||
<dllmap os="!windows,osx" cpu="x86" wordsize="32" dll="sqlite3" target="./libsqlite3_32.so" />
|
<dllmap os="!windows,osx" cpu="x86" wordsize="32" dll="sqlite3" target="lib32/libsqlite3_32.so" />
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="osx" dll="ode" target="libode.dylib" />
|
<dllmap os="osx" dll="ode" target="lib64/libode.dylib" />
|
||||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="ode" target="libode-x86_64" />
|
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="ode" target="lib64/libode-x86_64" />
|
||||||
<dllmap os="!windows,osx" cpu="x86" dll="ode" target="libode" />
|
<dllmap os="!windows,osx" cpu="x86" dll="ode" target="lib32/libode" />
|
||||||
<dllmap os="!windows,osx" cpu="ppc64" dll="ode" target="libode-ppc64" />
|
<dllmap os="!windows,osx" cpu="ppc64" dll="ode" target="lib64/libode-ppc64" />
|
||||||
<dllmap os="!windows,osx" cpu="s390x" dll="ode" target="libode-s390x" />
|
<dllmap os="!windows,osx" cpu="s390x" dll="ode" target="lib64/libode-s390x" />
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<dllmap os="osx" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1.dylib" />
|
<dllmap os="osx" dll="openjpeg-dotnet.dll" target="lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1.dylib" />
|
||||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet.dll" target="lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
||||||
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet-x86_64.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
<dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-dotnet-x86_64.dll" target="lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1-x86_64" />
|
||||||
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686" />
|
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet.dll" target="lib32/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686" />
|
||||||
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet-x86_64.dll" target="libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686" />
|
<dllmap os="!windows,osx" cpu="x86" dll="openjpeg-dotnet-x86_64.dll" target="lib64/libopenjpeg-dotnet-2.1.3.0-dotnet-1-i686" />
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
BIN
bin/xunit.dll
BIN
bin/xunit.dll
Binary file not shown.
Loading…
Reference in New Issue