From 4eefa5203322aac86e1db2401191e8a507a7e08a Mon Sep 17 00:00:00 2001 From: Christopher Latza Date: Wed, 10 Jun 2020 20:21:19 +0200 Subject: [PATCH] add asyn command --- src/BasicPathFinding.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/BasicPathFinding.cs b/src/BasicPathFinding.cs index 28b7779..6113877 100644 --- a/src/BasicPathFinding.cs +++ b/src/BasicPathFinding.cs @@ -5,6 +5,7 @@ using OpenMetaverse; using OpenSim.Region.CoreModules.World.LegacyMap; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.ScriptEngine.Shared.Api; using System; using System.Collections.Generic; using System.Drawing; @@ -33,6 +34,7 @@ namespace OpenSim.Modules.PathFinding private bool m_enabled = true; private string m_dataDirectory = "./PathFindingData"; private IScriptModuleComms m_scriptModule; + private AsyncCommandManager m_asyncCommands = null; public string Name { @@ -212,9 +214,12 @@ namespace OpenSim.Modules.PathFinding [ScriptInvocation] public string osCreateNewPathFindingScene(UUID hostID, UUID scriptID) { - MapImageModule _mapModule = new MapImageModule(); + SceneObjectGroup _host = m_scene.GetSceneObjectGroup(host); String imageName = UUID.Random().ToString(); + + UUID tid = m_asyncCommands.DataserverPlugin.RegisterRequest(_host.LocalId, _host.GroupID, imageName); + (new Thread(delegate () { createPathFindingScene(imageName); })).Start(); return imageName;