Code cleanup for better exception processing when looking for a scenePresence when routing a physics event
parent
254436e914
commit
251592e54a
|
@ -233,7 +233,8 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
/// <param name="pa"></param>
|
/// <param name="pa"></param>
|
||||||
public static void RouteUpdate(PhysicsActor pa)
|
public static void RouteUpdate(PhysicsActor pa)
|
||||||
{
|
{
|
||||||
SceneObjectPart sop = null;
|
SceneObjectPart sop;
|
||||||
|
ScenePresence sp;
|
||||||
Scene s = null;
|
Scene s = null;
|
||||||
foreach (Scene ss in m_allScenes)
|
foreach (Scene ss in m_allScenes)
|
||||||
{
|
{
|
||||||
|
@ -250,15 +251,20 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
s = ss;
|
s = ss;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
try
|
||||||
{
|
{
|
||||||
ScenePresence sp = ss.GetScenePresence(pa.LocalID);
|
sp = ss.GetScenePresence(pa.LocalID);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
sp = null;
|
||||||
|
}
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
{
|
||||||
s = ss;
|
s = ss;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (s != null)
|
if (s != null)
|
||||||
{
|
{
|
||||||
if (s.PhysEngineToSceneConnectorModule != null)
|
if (s.PhysEngineToSceneConnectorModule != null)
|
||||||
|
@ -447,7 +453,6 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
m_log.Warn(LogHeader + " Not currently synchronized");
|
m_log.Warn(LogHeader + " Not currently synchronized");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_log.Warn(LogHeader + " Synchronized");
|
|
||||||
foreach (KeyValuePair<string, PhysEngineToSceneConnector> pair in m_PEToSceneConnectors)
|
foreach (KeyValuePair<string, PhysEngineToSceneConnector> pair in m_PEToSceneConnectors)
|
||||||
{
|
{
|
||||||
PhysEngineToSceneConnector sceneConnector = pair.Value;
|
PhysEngineToSceneConnector sceneConnector = pair.Value;
|
||||||
|
|
Loading…
Reference in New Issue