mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Remove legacy meter setting from love.physics.newWorld
--HG-- branch : box2d-update
This commit is contained in:
@@ -38,9 +38,8 @@ namespace box2d
|
||||
return "love.physics.box2d";
|
||||
}
|
||||
|
||||
World * Physics::newWorld(float gx, float gy, bool sleep, int meter)
|
||||
World * Physics::newWorld(float gx, float gy, bool sleep)
|
||||
{
|
||||
Physics::setMeter(meter);
|
||||
return new World(b2Vec2(gx, gy), sleep);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,9 +72,8 @@ namespace box2d
|
||||
* @param gx Gravity along x-axis.
|
||||
* @param gy Gravity along y-axis.
|
||||
* @param sleep Whether the World allows sleep.
|
||||
* @param meter The scale in px/m.
|
||||
**/
|
||||
World * newWorld(float gx, float gy, bool sleep, int meter);
|
||||
World * newWorld(float gx, float gy, bool sleep);
|
||||
|
||||
/**
|
||||
* Creates a new Body at the specified position.
|
||||
|
||||
@@ -34,9 +34,8 @@ namespace box2d
|
||||
float gx = (float)luaL_optnumber(L, 1, 0);
|
||||
float gy = (float)luaL_optnumber(L, 2, 0);
|
||||
bool sleep = luax_optboolean(L, 3, true);
|
||||
int meter = (int)luaL_optnumber(L, 4, Physics::DEFAULT_METER);
|
||||
|
||||
World * w = instance->newWorld(gx, gy, sleep, meter);
|
||||
World * w = instance->newWorld(gx, gy, sleep);
|
||||
luax_newtype(L, "World", PHYSICS_WORLD_T, (void*)w);
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user