Added Body/Contact/Fixture/Joint/World:isDestroyed (resolves issue #964.)

This commit is contained in:
Alex Szpakowski
2015-01-05 00:14:41 -04:00
parent be9b5b5d1a
commit 91062a1496
21 changed files with 56 additions and 0 deletions
@@ -262,6 +262,13 @@ int w_Fixture_destroy(lua_State *L)
return 0;
}
int w_Fixture_isDestroyed(lua_State *L)
{
Fixture *f = luax_checktype<Fixture>(L, 1, "Fixture", PHYSICS_FIXTURE_T);
luax_pushboolean(L, !f->isValid());
return 1;
}
static const luaL_Reg functions[] =
{
{ "getType", w_Fixture_getType },
@@ -290,6 +297,7 @@ static const luaL_Reg functions[] =
{ "getGroupIndex", w_Fixture_getGroupIndex },
{ "setGroupIndex", w_Fixture_setGroupIndex },
{ "destroy", w_Fixture_destroy },
{ "isDestroyed", w_Fixture_isDestroyed },
{ 0, 0 }
};