|
@@ -564,6 +564,13 @@ int w_Body_destroy(lua_State *L)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+int w_Body_isDestroyed(lua_State *L)
|
|
|
+{
|
|
|
+ Body *b = luax_checktype<Body>(L, 1, "Body", PHYSICS_BODY_T);
|
|
|
+ luax_pushboolean(L, b->body == nullptr);
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+
|
|
|
int w_Body_setUserData(lua_State *L)
|
|
|
{
|
|
|
Body *t = luax_checkbody(L, 1);
|
|
@@ -635,6 +642,7 @@ static const luaL_Reg functions[] =
|
|
|
{ "getJointList", w_Body_getJointList },
|
|
|
{ "getContactList", w_Body_getContactList },
|
|
|
{ "destroy", w_Body_destroy },
|
|
|
+ { "isDestroyed", w_Body_isDestroyed },
|
|
|
{ "setUserData", w_Body_setUserData },
|
|
|
{ "getUserData", w_Body_getUserData },
|
|
|
{ 0, 0 }
|