Add the "StateChange" function to the async comand manager to differentiate

between state changes and script exit/reset.
0.8.0.3
Melanie 2014-04-30 20:54:34 +01:00
parent 44f533d95a
commit f0eeb47262
1 changed files with 23 additions and 1 deletions

View File

@ -300,6 +300,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
}
public static void StateChange(IScriptEngine engine, uint localID, UUID itemID)
{
// Remove a specific script
// Remove dataserver events
m_Dataserver[engine].RemoveEvents(localID, itemID);
IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>();
if (comms != null)
comms.DeleteListener(itemID);
IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>();
if (xmlrpc != null)
{
xmlrpc.DeleteChannels(itemID);
xmlrpc.CancelSRDRequests(itemID);
}
// Remove Sensors
m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID);
}
/// <summary>
/// Get the sensor repeat plugin for this script engine.
/// </summary>