diff --git a/code/game/src/gui/build_mode.c b/code/game/src/gui/build_mode.c index eea88e0..cf74937 100644 --- a/code/game/src/gui/build_mode.c +++ b/code/game/src/gui/build_mode.c @@ -3,6 +3,8 @@ static bool build_submit_placements = false; static bool build_is_in_draw_mode = false; +extern bool inv_is_inside; + static uint8_t build_num_placements = 0; static item_placement build_placements[BUILD_MAX_PLACEMENTS] = {0}; @@ -14,6 +16,7 @@ void buildmode_clear_buffers(void) { } void buildmode_draw(void) { + if (inv_is_inside) return; camera cam = camera_get(); camera old_cam = cam; Vector2 mpos = GetMousePosition(); diff --git a/code/game/src/gui/inventory.c b/code/game/src/gui/inventory.c index 385dd14..430f338 100644 --- a/code/game/src/gui/inventory.c +++ b/code/game/src/gui/inventory.c @@ -9,6 +9,7 @@ static ItemDrop inv_held_item = {0}; static bool inv_swap = false; static uint8_t inv_swap_from = 0; static uint8_t inv_swap_to = 0; +bool inv_is_inside = false; void inventory_draw() { inv_drop_item = false; @@ -32,6 +33,8 @@ void inventory_draw() { float x = sx; float y = sy; + inv_is_inside = check_mouse_area(sx, sy, 64*3, 64*3) != DAREA_OUTSIDE; + for (int32_t i = 0; i < ITEMS_INVENTORY_SIZE; i += 1) { { debug_area_status area = check_mouse_area(x, y, 64, 64); diff --git a/code/game/src/packets/pkt_send_keystate.c b/code/game/src/packets/pkt_send_keystate.c index 811ce24..f65a8ef 100644 --- a/code/game/src/packets/pkt_send_keystate.c +++ b/code/game/src/packets/pkt_send_keystate.c @@ -4,6 +4,7 @@ #include "modules/components.h" #include "modules/systems.h" #include "world/world.h" +#include "entity.h" #include "debug_replay.h" @@ -61,6 +62,7 @@ int32_t pkt_send_keystate_handler(pkt_header *header) { } } debug_replay_record_keystate(table); + entity_wake(e); } return 0;