Polish kinematic movement
This commit is contained in:
@@ -53,7 +53,7 @@ void inputPrimaryAction(Game *game, InputState *input) {
|
||||
resetInputState(input);
|
||||
input->state = INPUT_SELECTED_UNITS;
|
||||
} else if (isInputBtnJustUp(input, primaryBtn)) {
|
||||
if (pickEntity(game->entityGrid, input->mouseDownWorld, Unit)) {
|
||||
if (pickEntity(game->entityGrid, input->mouseDownWorld, ecs_id(Unit))) {
|
||||
resetInputState(input);
|
||||
input->state = INPUT_SELECTED_UNITS;
|
||||
} else if (pickEntity(game->entityGrid, input->mouseDownWorld, Harvestable)) {
|
||||
@@ -432,7 +432,7 @@ void pickUnits(BzSpatialGrid *entityGrid, Rectangle area) {
|
||||
BzSpatialGridIter it = bzSpatialGridIter(entityGrid, area.x, area.y, area.width, area.height);
|
||||
while (bzSpatialGridQueryNext(&it)) {
|
||||
ecs_entity_t entity = *(ecs_entity_t *) it.data;
|
||||
if (!ecs_has_id(ECS, entity, Unit)) continue;
|
||||
if (!ecs_has_id(ECS, entity, ecs_id(Unit))) continue;
|
||||
Rectangle bounds;
|
||||
if (!getEntityBounds(entity, NULL, NULL, &bounds)) continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user