Update to box2d 2.4.1

This commit is contained in:
Garrett Brown
2020-10-17 22:15:18 -04:00
parent 7d24beab90
commit 77f238767f
58 changed files with 879 additions and 367 deletions
+2 -2
View File
@@ -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)
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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)