|
@@ -1230,8 +1230,15 @@ bool RigidShape::resolveCollision(Rigid& ns,CollisionList& cList)
|
|
|
|
|
|
// Apply impulses to the rigid body to keep it from
|
|
|
// penetrating the surface.
|
|
|
- ns.resolveCollision(cList[i].point,
|
|
|
- cList[i].normal);
|
|
|
+ if (c.object->getTypeMask() & VehicleObjectType)
|
|
|
+ {
|
|
|
+ RigidShape* otherRigid = dynamic_cast<RigidShape*>(c.object);
|
|
|
+ if (otherRigid)
|
|
|
+ ns.resolveCollision(cList[i].point, cList[i].normal, &otherRigid->mRigid);
|
|
|
+ else
|
|
|
+ ns.resolveCollision(cList[i].point, cList[i].normal);
|
|
|
+ }
|
|
|
+ else ns.resolveCollision(cList[i].point, cList[i].normal);
|
|
|
collided = true;
|
|
|
|
|
|
// Keep track of objects we collide with
|