|
@@ -107,6 +107,7 @@ namespace box2d
|
|
|
Body * body = t->getBody();
|
|
|
if(body == 0)
|
|
|
return 0;
|
|
|
+ body->retain();
|
|
|
luax_newtype(L, "Body", PHYSICS_BODY_T, (void*)body);
|
|
|
return 1;
|
|
|
}
|
|
@@ -233,6 +234,7 @@ namespace box2d
|
|
|
{ "getFriction", w_Shape_getFriction },
|
|
|
{ "getRestitution", w_Shape_getRestitution },
|
|
|
{ "getDensity", w_Shape_getDensity },
|
|
|
+ { "getBody", w_Shape_getBody },
|
|
|
{ "isSensor", w_Shape_isSensor },
|
|
|
{ "testPoint", w_Shape_testPoint },
|
|
|
{ "testSegment", w_Shape_testSegment },
|