still issues with volume detectors and sleeping bodies

This commit is contained in:
UbitUmarov
2017-04-15 01:21:47 +01:00
parent 73be6cb269
commit 4f8f04d949
2 changed files with 41 additions and 23 deletions

View File

@@ -1210,14 +1210,17 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (m_cureventsubscription < 50000)
m_cureventsubscription += timestep;
if(CollisionVDTCEventsThisFrame != null && CollisionVDTCEventsThisFrame.Count >0 && (Body == IntPtr.Zero || d.BodyIsEnabled(Body)))
CollisionVDTCEventsThisFrame.Clear();
if (m_cureventsubscription < m_eventsubscription)
return;
if (CollisionEventsThisFrame == null)
return;
int ncolisions = CollisionEventsThisFrame.m_objCollisionList.Count;
if (m_cureventsubscription < m_eventsubscription)
return;
if (!SentEmptyCollisionsEvent || ncolisions > 0)
{
base.SendCollisionUpdate(CollisionEventsThisFrame);
@@ -1234,8 +1237,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
CollisionEventsThisFrame.Clear();
}
}
if(CollisionVDTCEventsThisFrame != null && (Body == IntPtr.Zero || d.BodyIsEnabled(Body)))
CollisionVDTCEventsThisFrame.Clear();
}
public override bool SubscribedEvents()
@@ -2938,7 +2939,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde
{
d.GeomSetPosition(prim_geom, newPos.X, newPos.Y, newPos.Z);
_position = newPos;
m_bodyMoveCoolDown = -5;
if (Body != IntPtr.Zero && !m_disabled)
m_bodyMoveCoolDown = -5;
}
if (Body != IntPtr.Zero && !d.BodyIsEnabled(Body))
{