Import box2d-contacts branch from love-experiments

Fix issues with Contact lifetime, based on the work of
Matteo "teomat" Goggi
This commit is contained in:
Boolsheet
2012-07-24 23:59:42 +02:00
parent 82d6edb32c
commit cde5aa3307
4 changed files with 56 additions and 16 deletions
+4 -1
View File
@@ -29,7 +29,10 @@ namespace box2d
Contact *luax_checkcontact(lua_State *L, int idx)
{
return luax_checktype<Contact>(L, idx, "Contact", PHYSICS_CONTACT_T);
Contact *c = luax_checktype<Contact>(L, idx, "Contact", PHYSICS_CONTACT_T);
if (!c->isValid())
luaL_error(L, "Attempt to use destroyed contact.");
return c;
}
int w_Contact_getPositions(lua_State *L)