aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-24 02:58:05 +0000
committerMelanie Thielker2008-09-24 02:58:05 +0000
commit218902bedc7f430c8401426a1cee373bfc0b5485 (patch)
treedea8a685e3663c50013c220a120bd20f7aba7e7a /OpenSim/Region/ScriptEngine/Shared/Instance
parentUpdate svn properties, formatting cleanup. (diff)
downloadopensim-SC_OLD-218902bedc7f430c8401426a1cee373bfc0b5485.zip
opensim-SC_OLD-218902bedc7f430c8401426a1cee373bfc0b5485.tar.gz
opensim-SC_OLD-218902bedc7f430c8401426a1cee373bfc0b5485.tar.bz2
opensim-SC_OLD-218902bedc7f430c8401426a1cee373bfc0b5485.tar.xz
Decouple AsyncCommands from XEngine and the script instance. Make
all methods needed outside the API ststic. Async command processing is now wholly internal to the API. This sets the stage for the next convergence step.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs16
1 files changed, 6 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 3a8c4da..14ac256 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -246,8 +246,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
246 246
247 ScriptSerializer.Deserialize(xml, this); 247 ScriptSerializer.Deserialize(xml, this);
248 248
249 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 249 AsyncCommandManager.CreateFromData(m_Engine.World,
250 async.CreateFromData(
251 m_LocalID, m_ItemID, m_ObjectID, 250 m_LocalID, m_ItemID, m_ObjectID,
252 PluginData); 251 PluginData);
253 252
@@ -337,6 +336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
337 public void DestroyScriptInstance() 336 public void DestroyScriptInstance()
338 { 337 {
339 ReleaseControls(); 338 ReleaseControls();
339 AsyncCommandManager.RemoveScript(m_Engine.World, m_LocalID, m_ItemID);
340 } 340 }
341 341
342 public void RemoveState() 342 public void RemoveState()
@@ -554,8 +554,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
554 // m_Engine.Log.DebugFormat("[Script] Script {0}.{1} state set to {2}", 554 // m_Engine.Log.DebugFormat("[Script] Script {0}.{1} state set to {2}",
555 // m_PrimName, m_ScriptName, data.Params[0].ToString()); 555 // m_PrimName, m_ScriptName, data.Params[0].ToString());
556 m_State=data.Params[0].ToString(); 556 m_State=data.Params[0].ToString();
557 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 557 AsyncCommandManager.RemoveScript(m_Engine.World,
558 async.RemoveScript(
559 m_LocalID, m_ItemID); 558 m_LocalID, m_ItemID);
560 559
561 SceneObjectPart part = m_Engine.World.GetSceneObjectPart( 560 SceneObjectPart part = m_Engine.World.GetSceneObjectPart(
@@ -691,8 +690,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
691 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID); 690 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID);
692 part.GetInventoryItem(m_ItemID).PermsMask = 0; 691 part.GetInventoryItem(m_ItemID).PermsMask = 0;
693 part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero; 692 part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero;
694 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 693 AsyncCommandManager.RemoveScript(m_Engine.World, m_LocalID, m_ItemID);
695 async.RemoveScript(m_LocalID, m_ItemID);
696 m_EventQueue.Clear(); 694 m_EventQueue.Clear();
697 m_Script.ResetVars(); 695 m_Script.ResetVars();
698 m_State = "default"; 696 m_State = "default";
@@ -717,8 +715,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
717 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID); 715 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID);
718 part.GetInventoryItem(m_ItemID).PermsMask = 0; 716 part.GetInventoryItem(m_ItemID).PermsMask = 0;
719 part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero; 717 part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero;
720 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 718 AsyncCommandManager.RemoveScript(m_Engine.World, m_LocalID, m_ItemID);
721 async.RemoveScript(m_LocalID, m_ItemID);
722 719
723 m_EventQueue.Clear(); 720 m_EventQueue.Clear();
724 m_Script.ResetVars(); 721 m_Script.ResetVars();
@@ -775,8 +772,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
775 return; 772 return;
776 } 773 }
777 774
778 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 775 PluginData = AsyncCommandManager.GetSerializationData(m_Engine.World, m_ItemID);
779 PluginData = async.GetSerializationData(m_ItemID);
780 776
781 string xml = ScriptSerializer.Serialize(this); 777 string xml = ScriptSerializer.Serialize(this);
782 778