love.physics: simplify some internal bookkeeping code

This commit is contained in:
Sasha Szpakowski
2023-10-01 15:55:23 -03:00
parent dbc7d7f3ca
commit b1609ed83b
9 changed files with 60 additions and 137 deletions
+2 -11
View File
@@ -41,16 +41,6 @@ class World;
class Shape;
class Fixture;
/**
* This struct is stored in a void pointer in the Box2D Body class. For now, all
* we need is a Lua reference to arbitrary data, but we might need more later.
**/
struct bodyudata
{
// Reference to arbitrary data.
Reference *ref = nullptr;
};
/**
* A Body is an entity which has position and orientation
* in world space. A Body does have collision geometry
@@ -441,7 +431,8 @@ private:
// unowned?
World *world;
bodyudata *udata;
// Reference to arbitrary data.
Reference* ref = nullptr;
}; // Body