Experimental. Expand Fire & Forget for NPC delete
parent
54fc78013d
commit
a829f20828
|
@ -2584,6 +2584,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
CheckThreatLevel(ThreatLevel.High, "osNpcRemove");
|
CheckThreatLevel(ThreatLevel.High, "osNpcRemove");
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
Util.FireAndForget(delegate(object x) {
|
||||||
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
||||||
if (module != null)
|
if (module != null)
|
||||||
{
|
{
|
||||||
|
@ -2592,7 +2593,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Util.FireAndForget(delegate(object x) {
|
|
||||||
module.DeleteNPC(npcId, World);
|
module.DeleteNPC(npcId, World);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue