make sure XEngine does release script events when a script is destroyed

This commit is contained in:
UbitUmarov
2019-08-01 05:31:03 +01:00
parent 618c6ceda5
commit 96dabca85b
2 changed files with 4 additions and 4 deletions

View File

@@ -1112,10 +1112,7 @@ namespace OpenSim.Region.Framework.Scenes
m_part.RemFlag(PrimFlags.Scripted);
}
if (type == (int)InventoryType.LSL)
m_part.aggregateScriptEvents(); // this also does full update
else
m_part.ScheduleFullUpdate();
m_part.ScheduleFullUpdate();
m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
return type;

View File

@@ -490,6 +490,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
{
ReleaseControls();
AsyncCommandManager.RemoveScript(Engine, LocalID, ItemID);
SceneObjectPart part = Engine.World.GetSceneObjectPart(LocalID);
if (part != null)
part.RemoveScriptEvents(ItemID);
}
public void RemoveState()