mirror of https://github.com/basinserver/basin/
finish prototype of player handler updates
This commit is contained in:
parent
dcc1eb360b
commit
bb80d45890
|
@ -49,6 +49,8 @@ struct inventory {
|
|||
struct slot** slots;
|
||||
size_t slot_count;
|
||||
int window;
|
||||
struct mempool* drag_pool;
|
||||
struct llist* drag_slot;
|
||||
struct hashmap* watching_players;
|
||||
struct tile_entity* tile;
|
||||
pthread_mutex_t mutex;
|
||||
|
|
|
@ -31,6 +31,9 @@ struct inventory* inventory_new(struct mempool* pool, int type, int id, size_t s
|
|||
inv->type = type;
|
||||
inv->window = id;
|
||||
inv->watching_players = hashmap_thread_new(8, inv->pool);
|
||||
inv->drag_pool = mempool_new();
|
||||
pchild(inv->pool, inv->drag_pool);
|
||||
inv->drag_slot = llist_new(inv->drag_pool);
|
||||
pthread_mutex_init(&inv->mutex, NULL);
|
||||
phook(inv->pool, (void (*)(void*)) pthread_mutex_destroy, &inv->mutex);
|
||||
return inv;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue