mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user