add try
parent
c171f0e739
commit
8d7a69b962
|
@ -223,25 +223,33 @@ namespace OpenSim.Modules.PathFinding
|
||||||
[ScriptInvocation]
|
[ScriptInvocation]
|
||||||
public string osCreateNewPathFindingScene(UUID hostID, UUID scriptID)
|
public string osCreateNewPathFindingScene(UUID hostID, UUID scriptID)
|
||||||
{
|
{
|
||||||
SceneObjectPart _host = m_scene.GetSceneObjectPart(hostID);
|
try
|
||||||
|
|
||||||
if(_host != null || m_asyncCommands != null)
|
|
||||||
{
|
{
|
||||||
String imageName = UUID.Random().ToString();
|
SceneObjectGroup _host = m_scene.GetSceneObjectGroup(hostID);
|
||||||
|
|
||||||
UUID tid = m_asyncCommands.DataserverPlugin.RegisterRequest(_host.LocalId, _host.GroupID, imageName);
|
if (_host != null || m_asyncCommands != null)
|
||||||
|
{
|
||||||
|
String imageName = UUID.Random().ToString();
|
||||||
|
|
||||||
(new Thread(delegate () { createPathFindingScene(imageName); })).Start();
|
UUID tid = m_asyncCommands.DataserverPlugin.RegisterRequest(_host.LocalId, _host.GroupID, imageName);
|
||||||
|
|
||||||
return imageName;
|
(new Thread(delegate () { createPathFindingScene(imageName); })).Start();
|
||||||
|
|
||||||
|
return imageName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_host == null)
|
||||||
|
m_log.ErrorFormat("[" + Name + "]: Host is null");
|
||||||
|
|
||||||
|
if (m_asyncCommands == null)
|
||||||
|
m_log.ErrorFormat("[" + Name + "]: AsyncCommands is null");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
catch(Exception _error)
|
||||||
{
|
{
|
||||||
if (_host == null)
|
m_log.Error(_error.Message);
|
||||||
m_log.ErrorFormat("[" + Name + "]: Host is null");
|
m_log.Error(_error.StackTrace);
|
||||||
|
|
||||||
if (m_asyncCommands == null)
|
|
||||||
m_log.ErrorFormat("[" + Name + "]: AsyncCommands is null");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return UUID.Zero.ToString();
|
return UUID.Zero.ToString();
|
||||||
|
|
Loading…
Reference in New Issue