Fire the scripting changed event with CHANGED_OWNER when an object that has changed owners is rezzed.

This needs to occur after the script is resumed rather than before, when the event is just dropped.
Addresses http://opensimulator.org/mantis/view.php?id=5890 and http://opensimulator.org/mantis/view.php?id=5952
This commit is contained in:
Justin Clark-Casey (justincc)
2012-05-05 00:29:14 +01:00
parent e18686528e
commit 01b00ad0d5
4 changed files with 30 additions and 15 deletions

View File

@@ -1219,13 +1219,19 @@ namespace OpenSim.Region.Framework.Scenes
{
if (engine != null)
{
// m_log.DebugFormat(
// "[PRIM INVENTORY]: Resuming script {0} {1} for {2}, OwnerChanged {3}",
// item.Name, item.ItemID, item.OwnerID, item.OwnerChanged);
engine.ResumeScript(item.ItemID);
if (item.OwnerChanged)
engine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.OWNER });
item.OwnerChanged = false;
engine.ResumeScript(item.ItemID);
}
}
}
}
}
}
}