add asyn command
parent
bc15406d8f
commit
4eefa52033
|
@ -5,6 +5,7 @@ using OpenMetaverse;
|
||||||
using OpenSim.Region.CoreModules.World.LegacyMap;
|
using OpenSim.Region.CoreModules.World.LegacyMap;
|
||||||
using OpenSim.Region.Framework.Interfaces;
|
using OpenSim.Region.Framework.Interfaces;
|
||||||
using OpenSim.Region.Framework.Scenes;
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.ScriptEngine.Shared.Api;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
@ -33,6 +34,7 @@ namespace OpenSim.Modules.PathFinding
|
||||||
private bool m_enabled = true;
|
private bool m_enabled = true;
|
||||||
private string m_dataDirectory = "./PathFindingData";
|
private string m_dataDirectory = "./PathFindingData";
|
||||||
private IScriptModuleComms m_scriptModule;
|
private IScriptModuleComms m_scriptModule;
|
||||||
|
private AsyncCommandManager m_asyncCommands = null;
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
|
@ -212,9 +214,12 @@ namespace OpenSim.Modules.PathFinding
|
||||||
[ScriptInvocation]
|
[ScriptInvocation]
|
||||||
public string osCreateNewPathFindingScene(UUID hostID, UUID scriptID)
|
public string osCreateNewPathFindingScene(UUID hostID, UUID scriptID)
|
||||||
{
|
{
|
||||||
MapImageModule _mapModule = new MapImageModule();
|
SceneObjectGroup _host = m_scene.GetSceneObjectGroup(host);
|
||||||
|
|
||||||
String imageName = UUID.Random().ToString();
|
String imageName = UUID.Random().ToString();
|
||||||
|
|
||||||
|
UUID tid = m_asyncCommands.DataserverPlugin.RegisterRequest(_host.LocalId, _host.GroupID, imageName);
|
||||||
|
|
||||||
(new Thread(delegate () { createPathFindingScene(imageName); })).Start();
|
(new Thread(delegate () { createPathFindingScene(imageName); })).Start();
|
||||||
|
|
||||||
return imageName;
|
return imageName;
|
||||||
|
|
Loading…
Reference in New Issue