Fix a raycast issue

avinationmerge
Tom 2011-07-15 11:12:10 -07:00
parent c920ff9d1d
commit cc69d12d54
2 changed files with 20 additions and 4 deletions

View File

@ -109,8 +109,17 @@ namespace OpenSim.Region.Physics.OdePlugin
ODERayCastRequest[] reqs = m_PendingRequests.ToArray(); ODERayCastRequest[] reqs = m_PendingRequests.ToArray();
for (int i = 0; i < reqs.Length; i++) for (int i = 0; i < reqs.Length; i++)
{ {
if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast try
RayCast(reqs[i]); // if there isn't anyone to send results {
if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
RayCast(reqs[i]); // if there isn't anyone to send results
}
catch
{
//Fail silently
//This can genuinely happen because raycast requests are queued, and the actor may have
//been removed from the scene since it was queued
}
} }
/* /*
foreach (ODERayCastRequest req in m_PendingRequests) foreach (ODERayCastRequest req in m_PendingRequests)

View File

@ -109,8 +109,15 @@ namespace OpenSim.Region.Physics.OdePlugin
ODERayCastRequest[] reqs = m_PendingRequests.ToArray(); ODERayCastRequest[] reqs = m_PendingRequests.ToArray();
for (int i = 0; i < reqs.Length; i++) for (int i = 0; i < reqs.Length; i++)
{ {
if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast try
RayCast(reqs[i]); // if there isn't anyone to send results {
if (reqs[i].callbackMethod != null) // quick optimization here, don't raycast
RayCast(reqs[i]); // if there isn't anyone to send results
}
catch
{
//Fail silently
}
} }
/* /*
foreach (ODERayCastRequest req in m_PendingRequests) foreach (ODERayCastRequest req in m_PendingRequests)