Fix flag hitbox and spice bar

main
Cameron Murphy Reikes 2 years ago
parent 54992b9043
commit fef2fd076a

Binary file not shown.

@ -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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 6.1 KiB

@ -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)
{

Loading…
Cancel
Save