mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
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:
@@ -28,7 +28,10 @@ namespace box2d
|
||||
{
|
||||
FrictionJoint * luax_checkfrictionjoint(lua_State * L, int idx)
|
||||
{
|
||||
return luax_checktype<FrictionJoint>(L, idx, "FrictionJoint", PHYSICS_FRICTION_JOINT_T);
|
||||
FrictionJoint * j = luax_checktype<FrictionJoint>(L, idx, "FrictionJoint", PHYSICS_FRICTION_JOINT_T);
|
||||
if (!j->isValid())
|
||||
luaL_error(L, "Attempt to use destroyed joint.");
|
||||
return j;
|
||||
}
|
||||
|
||||
int w_FrictionJoint_setMaxForce(lua_State * L)
|
||||
|
||||
Reference in New Issue
Block a user