aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2012-06-29 22:24:53 +0100
committerMelanie2012-06-29 22:24:53 +0100
commit6137f37028a798f87af3f8afb71ec4856b2a5ad8 (patch)
tree39289035f883415b5ccae36a9b2af1ad60c7acf6 /OpenSim/Region/ScriptEngine
parentMerge branch 'avination' into careminster (diff)
parentMove update of the final optional ODE total frame stat inside the OdeLock rat... (diff)
downloadopensim-SC-6137f37028a798f87af3f8afb71ec4856b2a5ad8.zip
opensim-SC-6137f37028a798f87af3f8afb71ec4856b2a5ad8.tar.gz
opensim-SC-6137f37028a798f87af3f8afb71ec4856b2a5ad8.tar.bz2
opensim-SC-6137f37028a798f87af3f8afb71ec4856b2a5ad8.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs15
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs29
2 files changed, 24 insertions, 20 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 389980e..04c4c00 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3267,15 +3267,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3267 3267
3268 private void DetachWrapper(object o) 3268 private void DetachWrapper(object o)
3269 { 3269 {
3270 SceneObjectPart host = (SceneObjectPart)o; 3270 if (World.AttachmentsModule != null)
3271 3271 {
3272 SceneObjectGroup grp = host.ParentGroup; 3272 SceneObjectPart host = (SceneObjectPart)o;
3273 UUID itemID = grp.FromItemID; 3273 ScenePresence presence = World.GetScenePresence(host.OwnerID);
3274 ScenePresence presence = World.GetScenePresence(host.OwnerID); 3274 World.AttachmentsModule.DetachSingleAttachmentToInv(presence, host.ParentGroup);
3275 3275 }
3276 IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
3277 if (attachmentsModule != null)
3278 attachmentsModule.DetachSingleAttachmentToInv(presence, itemID);
3279 } 3276 }
3280 3277
3281 public void llAttachToAvatar(int attachmentPoint) 3278 public void llAttachToAvatar(int attachmentPoint)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 79d1944..7364b19 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -847,27 +847,34 @@ namespace OpenSim.Region.ScriptEngine.XEngine
847 if (engine == ScriptEngineName) 847 if (engine == ScriptEngineName)
848 { 848 {
849 // If we are falling back on XEngine as the default engine, then only complain to the user 849 // If we are falling back on XEngine as the default engine, then only complain to the user
850 // if a script language has been explicitly set and it's one that we recognize. If it's 850 // if a script language has been explicitly set and it's one that we recognize or there are
851 // no non-whitespace characters after the colon.
852 //
853 // If the script is
851 // explicitly not allowed or the script is not in LSL then the user will be informed by a later compiler message. 854 // explicitly not allowed or the script is not in LSL then the user will be informed by a later compiler message.
852 // 855 //
856 // If the colon ends the line then we'll risk the false positive as this is more likely
857 // to signal a real scriptengine line where the user wants to use the default compile language.
858 //
853 // This avoids the overwhelming number of false positives where we're in this code because 859 // This avoids the overwhelming number of false positives where we're in this code because
854 // there's a colon in a comment in the first line of a script for entirely 860 // there's a colon in a comment in the first line of a script for entirely
855 // unrelated reasons (e.g. vim settings). 861 // unrelated reasons (e.g. vim settings).
856 // 862 //
857 // TODO: A better fix would be to deprecate simple : detection and look for some less likely 863 // TODO: A better fix would be to deprecate simple : detection and look for some less likely
858 // string to begin the comment (like #! in unix shell scripts). 864 // string to begin the comment (like #! in unix shell scripts).
859 bool scriptExplicitlyInXEngineLanguage = false; 865 bool warnRunningInXEngine = false;
860 string restOfScript = script.Substring(colon + 1); 866 string restOfFirstLine = firstline.Substring(colon + 1);
861 867
862 // FIXME: These are hardcoded because they are currently hardcoded in Compiler.cs 868 // FIXME: These are hardcoded because they are currently hardcoded in Compiler.cs
863 if (restOfScript.StartsWith("c#") 869 if (restOfFirstLine.StartsWith("c#")
864 || restOfScript.StartsWith("vb") 870 || restOfFirstLine.StartsWith("vb")
865 || restOfScript.StartsWith("lsl") 871 || restOfFirstLine.StartsWith("lsl")
866 || restOfScript.StartsWith("js") 872 || restOfFirstLine.StartsWith("js")
867 || restOfScript.StartsWith("yp")) 873 || restOfFirstLine.StartsWith("yp")
868 scriptExplicitlyInXEngineLanguage = true; 874 || restOfFirstLine.Length == 0)
869 875 warnRunningInXEngine = true;
870 if (scriptExplicitlyInXEngineLanguage) 876
877 if (warnRunningInXEngine)
871 { 878 {
872 SceneObjectPart part = 879 SceneObjectPart part =
873 m_Scene.GetSceneObjectPart( 880 m_Scene.GetSceneObjectPart(