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;
|
struct slot** slots;
|
||||||
size_t slot_count;
|
size_t slot_count;
|
||||||
int window;
|
int window;
|
||||||
|
struct mempool* drag_pool;
|
||||||
|
struct llist* drag_slot;
|
||||||
struct hashmap* watching_players;
|
struct hashmap* watching_players;
|
||||||
struct tile_entity* tile;
|
struct tile_entity* tile;
|
||||||
pthread_mutex_t mutex;
|
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->type = type;
|
||||||
inv->window = id;
|
inv->window = id;
|
||||||
inv->watching_players = hashmap_thread_new(8, inv->pool);
|
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);
|
pthread_mutex_init(&inv->mutex, NULL);
|
||||||
phook(inv->pool, (void (*)(void*)) pthread_mutex_destroy, &inv->mutex);
|
phook(inv->pool, (void (*)(void*)) pthread_mutex_destroy, &inv->mutex);
|
||||||
return inv;
|
return inv;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue