Remove unused field

This commit is contained in:
Sunketchupm 2026-03-13 09:58:39 -04:00
parent 0f07bb9d2d
commit 1e0b902f12
5 changed files with 5 additions and 11 deletions

View file

@ -2067,7 +2067,6 @@
--- @field public gfx GraphNodeObject
--- @field public next ObjectNode
--- @field public prev ObjectNode
--- @field public pool ObjectPoolNode
--- @class ObjectPoolNode
--- @field public pool Object[]

View file

@ -2688,7 +2688,6 @@
| gfx | [GraphNodeObject](structs.md#GraphNodeObject) | read-only |
| next | [ObjectNode](structs.md#ObjectNode) | read-only |
| prev | [ObjectNode](structs.md#ObjectNode) | read-only |
| pool | [ObjectPoolNode](structs.md#ObjectPoolNode) | |
[:arrow_up_small:](#)

View file

@ -232,7 +232,6 @@ struct ObjectNode
struct GraphNodeObject gfx;
struct ObjectNode *next;
struct ObjectNode *prev;
struct ObjectPoolNode* pool;
};
// NOTE: Since ObjectNode is the first member of Object, it is difficult to determine

View file

@ -155,7 +155,7 @@ static void deallocate_object(struct ObjectNode *obj) {
if (obj->next) { obj->next->prev = obj->prev; }
if (obj->prev) { obj->prev->next = obj->next; }
// Insert at beginning of free list
// Insert at beginning of the first available free list
for (struct ObjectPoolNode* node = &gObjectPool; node != NULL; node = node->next) {
if (node->freeList.next == NULL) { continue; }
obj->next = node->freeList.next;
@ -181,8 +181,6 @@ void init_free_object_list(struct ObjectPoolNode* node) {
// End the list
obj->header.next = NULL;
// Attach pool
obj->header.pool = node;
}
/**

View file

@ -2382,12 +2382,11 @@ static struct LuaObjectField sObjectHitboxFields[LUA_OBJECT_HITBOX_FIELD_COUNT]
{ "radius", LVT_S16, offsetof(struct ObjectHitbox, radius), false, LOT_NONE, 1, sizeof(s16) },
};
#define LUA_OBJECT_NODE_FIELD_COUNT 4
#define LUA_OBJECT_NODE_FIELD_COUNT 3
static struct LuaObjectField sObjectNodeFields[LUA_OBJECT_NODE_FIELD_COUNT] = {
{ "gfx", LVT_COBJECT, offsetof(struct ObjectNode, gfx), true, LOT_GRAPHNODEOBJECT, 1, sizeof(struct GraphNodeObject) },
{ "next", LVT_COBJECT_P, offsetof(struct ObjectNode, next), true, LOT_OBJECTNODE, 1, sizeof(struct ObjectNode*) },
{ "pool", LVT_COBJECT_P, offsetof(struct ObjectNode, pool), false, LOT_OBJECTPOOLNODE, 1, sizeof(struct ObjectPoolNode*) },
{ "prev", LVT_COBJECT_P, offsetof(struct ObjectNode, prev), true, LOT_OBJECTNODE, 1, sizeof(struct ObjectNode*) },
{ "gfx", LVT_COBJECT, offsetof(struct ObjectNode, gfx), true, LOT_GRAPHNODEOBJECT, 1, sizeof(struct GraphNodeObject) },
{ "next", LVT_COBJECT_P, offsetof(struct ObjectNode, next), true, LOT_OBJECTNODE, 1, sizeof(struct ObjectNode*) },
{ "prev", LVT_COBJECT_P, offsetof(struct ObjectNode, prev), true, LOT_OBJECTNODE, 1, sizeof(struct ObjectNode*) },
};
#define LUA_OBJECT_POOL_NODE_FIELD_COUNT 3