* Tweaking collision reporting a little more in ScenePresence to not check if the collisions will affect health if the avatar is invulnerable. (saves 3 loops)

trunk
Teravus Ovares 2009-07-16 04:50:49 +00:00
parent 5f68b5b82e
commit 8e1ab33ed3
2 changed files with 3 additions and 3 deletions

View File

@ -3217,7 +3217,7 @@ namespace OpenSim.Region.Framework.Scenes
// Event called by the physics plugin to tell the avatar about a collision. // Event called by the physics plugin to tell the avatar about a collision.
private void PhysicsCollisionUpdate(EventArgs e) private void PhysicsCollisionUpdate(EventArgs e)
{ {
if (e == null) if ((e == null) || m_invulnerable)
return; return;
CollisionEventUpdate collisionData = (CollisionEventUpdate)e; CollisionEventUpdate collisionData = (CollisionEventUpdate)e;
Dictionary<uint, float> coldata = collisionData.m_objCollisionList; Dictionary<uint, float> coldata = collisionData.m_objCollisionList;

View File

@ -308,7 +308,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
if (m_wascolliding != m_iscolliding) if (m_wascolliding != m_iscolliding)
{ {
base.SendCollisionUpdate(new CollisionEventUpdate()); //base.SendCollisionUpdate(new CollisionEventUpdate());
} }
m_wascolliding = m_iscolliding; m_wascolliding = m_iscolliding;
} }
@ -362,7 +362,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
if (m_wascollidingGround != m_iscollidingGround) if (m_wascollidingGround != m_iscollidingGround)
{ {
base.SendCollisionUpdate(new CollisionEventUpdate()); //base.SendCollisionUpdate(new CollisionEventUpdate());
} }
m_wascollidingGround = m_iscollidingGround; m_wascollidingGround = m_iscollidingGround;
} }