use SceneObjectPart

master
Christopher Latza 2020-06-10 20:33:34 +02:00
parent 629d1bcb30
commit ad3d94cbe8
1 changed files with 12 additions and 6 deletions

View File

@ -214,15 +214,21 @@ namespace OpenSim.Modules.PathFinding
[ScriptInvocation] [ScriptInvocation]
public string osCreateNewPathFindingScene(UUID hostID, UUID scriptID) public string osCreateNewPathFindingScene(UUID hostID, UUID scriptID)
{ {
SceneObjectGroup _host = m_scene.GetSceneObjectGroup(hostID); SceneObjectPart _host = m_scene.GetSceneObjectPart(hostID);
String imageName = UUID.Random().ToString(); if(_host != null)
{
String imageName = UUID.Random().ToString();
UUID tid = m_asyncCommands.DataserverPlugin.RegisterRequest(_host.LocalId, _host.GroupID, imageName); 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 UUID.Zero.ToString();
return imageName;
} }
#endregion #endregion