mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Bring back some elements of better Body destruction that got lost in the merge
This commit is contained in:
@@ -40,6 +40,7 @@ namespace box2d
|
||||
{
|
||||
|
||||
class Contact;
|
||||
class Body;
|
||||
class Fixture;
|
||||
|
||||
/**
|
||||
@@ -106,6 +107,9 @@ namespace box2d
|
||||
|
||||
// Ground body
|
||||
b2Body * groundBody;
|
||||
|
||||
// The list of to be destructed bodies.
|
||||
std::vector<Body*> destructBodies;
|
||||
|
||||
// Contact callbacks.
|
||||
ContactCallback begin, end, presolve, postsolve;
|
||||
@@ -255,6 +259,12 @@ namespace box2d
|
||||
* Raycasts the World for all Fixtures in the path of the ray.
|
||||
**/
|
||||
int rayCast(lua_State * L);
|
||||
|
||||
/**
|
||||
* Mark a body for destruction.
|
||||
* To be called from Body
|
||||
**/
|
||||
void destroyBody(Body * b);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user