mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Update userdata stuff to how new box2d wants it
This commit is contained in:
@@ -45,7 +45,7 @@ Fixture::Fixture(Body *body, Shape *shape, float density)
|
||||
udata->ref = nullptr;
|
||||
b2FixtureDef def;
|
||||
def.shape = shape->shape;
|
||||
def.userData = udata;
|
||||
def.userData.pointer = (uintptr_t)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(udata);
|
||||
fixture->GetUserData().pointer = (uintptr_t)udata;
|
||||
}
|
||||
|
||||
if(!udata->ref)
|
||||
|
||||
Reference in New Issue
Block a user