~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/gameengine/Ketsji/KX_BulletPhysicsController.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kevin Roy
  • Date: 2011-02-08 22:20:54 UTC
  • mfrom: (1.4.2 upstream)
  • mto: (14.2.6 sid) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 27.
  • Revision ID: james.westby@ubuntu.com-20110208222054-kk0gwa4bu8h5lyq4
Tags: upstream-2.56.1-beta-svn34076
ImportĀ upstreamĀ versionĀ 2.56.1-beta-svn34076

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
        // we will need this to make sure that we remove the right proxy later when unparenting
280
280
        proxyShapeInfo->m_userData = childCtrl;
281
281
        proxyShapeInfo->SetProxy(childCtrl->GetShapeInfo()->AddRef());
282
 
        // add to parent compound shapeinfo
 
282
        // add to parent compound shapeinfo (increments ref count)
283
283
        GetShapeInfo()->AddShape(proxyShapeInfo);
284
284
        // create new bullet collision shape from the object shapeinfo and set scaling
285
 
        btCollisionShape* newChildShape = proxyShapeInfo->CreateBulletShape(childCtrl->GetMargin());
 
285
        btCollisionShape* newChildShape = proxyShapeInfo->CreateBulletShape(childCtrl->GetMargin(), childCtrl->getConstructionInfo().m_bGimpact, true);
286
286
        newChildShape->setLocalScaling(relativeScale);
287
287
        // add bullet collision shape to parent compound collision shape
288
288
        compoundShape->addChildShape(proxyShapeInfo->m_childTrans,newChildShape);
 
289
        // proxyShapeInfo is not needed anymore, release it
 
290
        proxyShapeInfo->Release();
289
291
        // remember we created this shape
290
292
        childCtrl->m_bulletChildShape = newChildShape;
291
293
        // recompute inertia of parent
519
521
//      return false;
520
522
}
521
523
 
522
 
#endif //#ifdef USE_BULLET
 
524
#endif // USE_BULLET