mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Remove some unused love.physics Body methods, and clean up a bit of code.
This commit is contained in:
@@ -512,21 +512,6 @@ int Body::getContacts(lua_State *L) const
|
||||
return 1;
|
||||
}
|
||||
|
||||
b2Vec2 Body::getVector(lua_State *L)
|
||||
{
|
||||
love::luax_assert_argc(L, 2, 2);
|
||||
b2Vec2 v((float)lua_tonumber(L, 1), (float)lua_tonumber(L, 2));
|
||||
lua_pop(L, 2);
|
||||
return v;
|
||||
}
|
||||
|
||||
int Body::pushVector(lua_State *L, const b2Vec2 &v)
|
||||
{
|
||||
lua_pushnumber(L, v.x);
|
||||
lua_pushnumber(L, v.y);
|
||||
return 2;
|
||||
}
|
||||
|
||||
void Body::destroy()
|
||||
{
|
||||
if (world->world->IsLocked())
|
||||
|
||||
@@ -426,17 +426,6 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Gets a 2d vector from the arguments on the stack.
|
||||
**/
|
||||
b2Vec2 getVector(lua_State *L);
|
||||
|
||||
/**
|
||||
* Pushed the x- and y-components of a vector on
|
||||
* the stack.
|
||||
**/
|
||||
int pushVector(lua_State *L, const b2Vec2 &v);
|
||||
|
||||
// FIXME: This should be a weak reference, rather than being completely
|
||||
// unowned?
|
||||
World *world;
|
||||
|
||||
Reference in New Issue
Block a user