aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs5
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneGraph.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs12
5 files changed, 29 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 113b16c..d1e0c24 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -2088,10 +2088,11 @@ namespace OpenSim.Region.Environment.Scenes
2088 } 2088 }
2089 2089
2090 // Fire on_rez 2090 // Fire on_rez
2091 group.CreateScriptInstances(0, true, DefaultScriptEngine, 0);
2092
2093 if (!attachment) 2091 if (!attachment)
2092 {
2093 group.CreateScriptInstances(0, true, DefaultScriptEngine, 0);
2094 rootPart.ScheduleFullUpdate(); 2094 rootPart.ScheduleFullUpdate();
2095 }
2095 2096
2096 if (!Permissions.BypassPermissions()) 2097 if (!Permissions.BypassPermissions())
2097 { 2098 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneGraph.cs b/OpenSim/Region/Environment/Scenes/SceneGraph.cs
index da3be08..22e5150 100644
--- a/OpenSim/Region/Environment/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneGraph.cs
@@ -472,6 +472,10 @@ namespace OpenSim.Region.Environment.Scenes
472 objatt.ScheduleGroupForFullUpdate(); 472 objatt.ScheduleGroupForFullUpdate();
473 if (tainted) 473 if (tainted)
474 objatt.HasGroupChanged = true; 474 objatt.HasGroupChanged = true;
475
476 // Fire after attach, so we don't get messy perms dialogs
477 //
478 objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 0);
475 } 479 }
476 return objatt; 480 return objatt;
477 } 481 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs
index 793d31b..99ac722 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPartInventory.cs
@@ -241,6 +241,15 @@ namespace OpenSim.Region.Environment.Scenes
241 241
242 if (!m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts) 242 if (!m_part.ParentGroup.Scene.RegionInfo.RegionSettings.DisableScripts)
243 { 243 {
244 if (stateSource == 1) // Prim crossing
245 {
246 m_items[item.ItemID].PermsMask = 0;
247 m_items[item.ItemID].PermsGranter = UUID.Zero;
248 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
249 m_part.LocalId, item.ItemID, String.Empty, startParam, postOnRez, engine, stateSource);
250 m_part.ParentGroup.AddActiveScriptCount(1);
251 m_part.ScheduleFullUpdate();
252 }
244 AssetCache cache = m_part.ParentGroup.Scene.AssetCache; 253 AssetCache cache = m_part.ParentGroup.Scene.AssetCache;
245 254
246 cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset) 255 cache.GetAsset(item.AssetID, delegate(UUID assetID, AssetBase asset)
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))