diff --git a/flight.rdbg b/flight.rdbg index bb1d2c5..993985d 100644 Binary files a/flight.rdbg and b/flight.rdbg differ diff --git a/gamestate.c b/gamestate.c index 00d2a8b..d757823 100644 --- a/gamestate.c +++ b/gamestate.c @@ -538,7 +538,7 @@ void entity_set_pos(Entity *e, cpVect pos) cpBodySetPosition(e->body, (pos)); } -static const cpShapeFilter BOXES_FILTER = {CP_NO_GROUP, BOXES, CP_ALL_CATEGORIES}; +static const cpShapeFilter BOXES_FILTER = {CP_NO_GROUP, BOXES, BOXES}; static const cpShapeFilter NOT_BOXES_FILTER = {CP_NO_GROUP, CP_ALL_CATEGORIES & (~BOXES), CP_ALL_CATEGORIES}; #define PLAYER_SHAPE_FILTER cpShapeFilterNew(CP_NO_GROUP, PLAYERS, CP_ALL_CATEGORIES) diff --git a/loaded/flag_available.png b/loaded/flag_available.png index f193c39..000a5b4 100644 Binary files a/loaded/flag_available.png and b/loaded/flag_available.png differ diff --git a/loaded/flag_ripped.png b/loaded/flag_ripped.png index 80ac3f4..c08e304 100644 Binary files a/loaded/flag_ripped.png and b/loaded/flag_ripped.png differ diff --git a/main.c b/main.c index 32dc6ce..59dc6c7 100644 --- a/main.c +++ b/main.c @@ -1184,8 +1184,7 @@ static void ui(bool draw, double dt, double width, double height) } double size = 128.0; - bool hovering = - cpvdist(mouse_pos, flag_pos[i]) < size * 0.25 && this_squad_available; + bool hovering = box_has_point((BoxCentered){.pos = flag_pos[i], .rotation = flag_rot[i], .size = cpv(size*0.5, size)}, mouse_pos) && this_squad_available; if (!choosing_flags && hovering && build_pressed) { @@ -1391,7 +1390,7 @@ static void ui(bool draw, double dt, double width, double height) set_color_values(0.5, 0.5, 0.5, cur_opacity); double bar_width = itembar_width * 1.1; - double margin = (width - bar_width)/2.0; + double margin = (width - bar_width) / 2.0; double y = height - 150.0; draw_filled_rect(margin, y, bar_width, 30.0); set_color_values(1.0, 1.0, 1.0, cur_opacity);