add asyn command

master
Christopher Latza 2020-06-10 20:21:19 +02:00
parent bc15406d8f
commit 4eefa52033
1 changed files with 6 additions and 1 deletions

View File

@ -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;