diff options
Diffstat (limited to '')
5 files changed, 39 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index 61e4934..57794f9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | |||
@@ -137,7 +137,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
137 | if (cmdHandlerThread == null) | 137 | if (cmdHandlerThread == null) |
138 | { | 138 | { |
139 | // Start the thread that will be doing the work | 139 | // Start the thread that will be doing the work |
140 | cmdHandlerThread = Watchdog.StartThread(CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true); | 140 | cmdHandlerThread |
141 | = Watchdog.StartThread( | ||
142 | CmdHandlerThreadLoop, "AsyncLSLCmdHandlerThread", ThreadPriority.Normal, true, true); | ||
141 | } | 143 | } |
142 | } | 144 | } |
143 | 145 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d0430f4..ba02a78 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6834,16 +6834,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6834 | } | 6834 | } |
6835 | } | 6835 | } |
6836 | 6836 | ||
6837 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) | 6837 | protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot) |
6838 | { | 6838 | { |
6839 | m_host.AddScriptLPS(1); | ||
6840 | // LSL quaternions can normalize to 0, normal Quaternions can't. | 6839 | // LSL quaternions can normalize to 0, normal Quaternions can't. |
6841 | if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) | 6840 | if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) |
6842 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 | 6841 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 |
6843 | 6842 | ||
6844 | m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); | 6843 | part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); |
6845 | m_host.SitTargetOrientation = Rot2Quaternion(rot); | 6844 | part.SitTargetOrientation = Rot2Quaternion(rot); |
6846 | m_host.ParentGroup.HasGroupChanged = true; | 6845 | part.ParentGroup.HasGroupChanged = true; |
6846 | } | ||
6847 | |||
6848 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) | ||
6849 | { | ||
6850 | m_host.AddScriptLPS(1); | ||
6851 | SitTarget(m_host, offset, rot); | ||
6852 | } | ||
6853 | |||
6854 | public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) | ||
6855 | { | ||
6856 | m_host.AddScriptLPS(1); | ||
6857 | if (link == ScriptBaseClass.LINK_ROOT) | ||
6858 | SitTarget(m_host.ParentGroup.RootPart, offset, rot); | ||
6859 | else if (link == ScriptBaseClass.LINK_THIS) | ||
6860 | SitTarget(m_host, offset, rot); | ||
6861 | else | ||
6862 | { | ||
6863 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link); | ||
6864 | if (null != part) | ||
6865 | { | ||
6866 | SitTarget(part, offset, rot); | ||
6867 | } | ||
6868 | } | ||
6847 | } | 6869 | } |
6848 | 6870 | ||
6849 | public LSL_String llAvatarOnSitTarget() | 6871 | public LSL_String llAvatarOnSitTarget() |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 2424130..e29ab95 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2779,7 +2779,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2779 | CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); | 2779 | CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); |
2780 | m_host.AddScriptLPS(1); | 2780 | m_host.AddScriptLPS(1); |
2781 | ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); | 2781 | ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); |
2782 | avatar.SpeedModifier = (float)SpeedModifier; | 2782 | |
2783 | if (avatar != null) | ||
2784 | avatar.SpeedModifier = (float)SpeedModifier; | ||
2783 | } | 2785 | } |
2784 | 2786 | ||
2785 | public void osKickAvatar(string FirstName,string SurName,string alert) | 2787 | public void osKickAvatar(string FirstName,string SurName,string alert) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 9679798..bf7e7b5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -220,6 +220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
220 | LSL_String llGetDisplayName(string id); | 220 | LSL_String llGetDisplayName(string id); |
221 | LSL_String llRequestDisplayName(string id); | 221 | LSL_String llRequestDisplayName(string id); |
222 | void llLinkParticleSystem(int linknum, LSL_List rules); | 222 | void llLinkParticleSystem(int linknum, LSL_List rules); |
223 | void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot); | ||
223 | LSL_String llList2CSV(LSL_List src); | 224 | LSL_String llList2CSV(LSL_List src); |
224 | LSL_Float llList2Float(LSL_List src, int index); | 225 | LSL_Float llList2Float(LSL_List src, int index); |
225 | LSL_Integer llList2Integer(LSL_List src, int index); | 226 | LSL_Integer llList2Integer(LSL_List src, int index); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index dcaa3b4..21d8432 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -1710,6 +1710,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1710 | m_LSL_Functions.llSitTarget(offset, rot); | 1710 | m_LSL_Functions.llSitTarget(offset, rot); |
1711 | } | 1711 | } |
1712 | 1712 | ||
1713 | public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) | ||
1714 | { | ||
1715 | m_LSL_Functions.llLinkSitTarget(link, offset, rot); | ||
1716 | } | ||
1717 | |||
1713 | public void llSleep(double sec) | 1718 | public void llSleep(double sec) |
1714 | { | 1719 | { |
1715 | m_LSL_Functions.llSleep(sec); | 1720 | m_LSL_Functions.llSleep(sec); |