aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-29 14:16:09 +0000
committerMelanie Thielker2008-11-29 14:16:09 +0000
commitaf5e9147f04cf949045377a4c344b866af2009c7 (patch)
tree2ed85a01b6f895d9b9d2111930d8aac9d099c1fb /OpenSim/Region/ScriptEngine
parentMantis #2584 (diff)
downloadopensim-SC-af5e9147f04cf949045377a4c344b866af2009c7.zip
opensim-SC-af5e9147f04cf949045377a4c344b866af2009c7.tar.gz
opensim-SC-af5e9147f04cf949045377a4c344b866af2009c7.tar.bz2
opensim-SC-af5e9147f04cf949045377a4c344b866af2009c7.tar.xz
Start scripts in attachments only after a successful attach. Elimininate
a gratuitious asset fetch when region crossing.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs12
2 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index dbcc4ed..31202e2 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
40 { 40 {
41 NewRez = 0, 41 NewRez = 0,
42 PrimCrossing = 1, 42 PrimCrossing = 1,
43 ScriptedRez= 2 43 ScriptedRez = 2
44 } 44 }
45 45
46 public interface IScriptWorkItem 46 public interface IScriptWorkItem
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index 4c87c8a..a40b5ee 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -286,6 +286,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
286 } 286 }
287 } 287 }
288 288
289 if (Script == String.Empty)
290 {
291 if (File.Exists(OutFile))
292
293 {
294 m_scriptEngine.Log.DebugFormat("[Compiler] Returning existing assembly for {0}", asset);
295 return OutFile;
296 }
297
298 throw new Exception("Cannot find script assembly and no script text present");
299 }
300
289 enumCompileType l = DefaultCompileLanguage; 301 enumCompileType l = DefaultCompileLanguage;
290 302
291 if (Script.StartsWith("//c#", true, CultureInfo.InvariantCulture)) 303 if (Script.StartsWith("//c#", true, CultureInfo.InvariantCulture))