mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Update to box2d 2.4.1
This commit is contained in:
@@ -45,7 +45,7 @@ Body::Body(World *world, b2Vec2 p, Body::Type type)
|
||||
udata->ref = nullptr;
|
||||
b2BodyDef def;
|
||||
def.position = Physics::scaleDown(p);
|
||||
def.userData = (void *) udata;
|
||||
def.userData = udata;
|
||||
body = world->world->CreateBody(&def);
|
||||
// Box2D body holds a reference to the love Body.
|
||||
this->retain();
|
||||
@@ -529,7 +529,7 @@ int Body::setUserData(lua_State *L)
|
||||
if (udata == nullptr)
|
||||
{
|
||||
udata = new bodyudata();
|
||||
body->SetUserData((void *) udata);
|
||||
body->SetUserData(udata);
|
||||
}
|
||||
|
||||
if(!udata->ref)
|
||||
|
||||
@@ -45,7 +45,7 @@ Fixture::Fixture(Body *body, Shape *shape, float density)
|
||||
udata->ref = nullptr;
|
||||
b2FixtureDef def;
|
||||
def.shape = shape->shape;
|
||||
def.userData = (void *)udata;
|
||||
def.userData = udata;
|
||||
def.density = density;
|
||||
fixture = body->body->CreateFixture(&def);
|
||||
this->retain();
|
||||
@@ -262,7 +262,7 @@ int Fixture::setUserData(lua_State *L)
|
||||
if (udata == nullptr)
|
||||
{
|
||||
udata = new fixtureudata();
|
||||
fixture->SetUserData((void *) udata);
|
||||
fixture->SetUserData(udata);
|
||||
}
|
||||
|
||||
if(!udata->ref)
|
||||
|
||||
@@ -202,7 +202,7 @@ int Joint::setUserData(lua_State *L)
|
||||
if (udata == nullptr)
|
||||
{
|
||||
udata = new jointudata();
|
||||
joint->SetUserData((void *) udata);
|
||||
joint->SetUserData(udata);
|
||||
}
|
||||
|
||||
if(!udata->ref)
|
||||
|
||||
Reference in New Issue
Block a user