Use Box2D's callbacks for destruction of physics objects and wait until the end of the timestep before destroying them.

Merge of box2d-id2 from love-experiments
This commit is contained in:
Bart van Strien
2012-01-08 13:16:50 +01:00
parent 9629e5b233
commit c1f68e058d
34 changed files with 340 additions and 118 deletions
+2 -1
View File
@@ -56,6 +56,7 @@ namespace box2d
friend class CircleShape;
friend class PolygonShape;
friend class Shape;
friend class Fixture;
private:
@@ -386,7 +387,7 @@ namespace box2d
int getFixtureList(lua_State * L) const;
/**
* Mark the body for destruction
* Destroy this body.
**/
void destroy();