ode.cpp.diff 1.2 KB

12345678910111213141516171819202122232425262728
  1. 212,230d211
  2. < /******************** breakable joint contribution ***********************/
  3. < dxJoint* nextJ;
  4. < if (!world->firstjoint)
  5. < nextJ = 0;
  6. < else
  7. < nextJ = (dxJoint*)world->firstjoint->next;
  8. < for (j=world->firstjoint; j; j=nextJ) {
  9. < nextJ = (dxJoint*)j->next;
  10. < // check if joint is breakable and broken
  11. < if (j->breakInfo && j->breakInfo->flags & dJOINT_BROKEN) {
  12. < // detach (break) the joint
  13. < dJointAttach (j, 0, 0);
  14. < // call the callback function if it is set
  15. < if (j->breakInfo->callback) j->breakInfo->callback (j);
  16. < // finally destroy the joint if the dJOINT_DELETE_ON_BREAK is set
  17. < if (j->breakInfo->flags & dJOINT_DELETE_ON_BREAK) dJointDestroy (j);
  18. < }
  19. < }
  20. < /*************************************************************************/
  21. 931,933d911
  22. < /******************** breakable joint contribution ***********************/
  23. < j->breakInfo = 0;
  24. < /*************************************************************************/
  25. 1011,1013d988
  26. < /******************** breakable joint contribution ***********************/
  27. < if (j->breakInfo) delete j->breakInfo;
  28. < /*************************************************************************/