Better formation placement

This commit is contained in:
2024-02-09 09:46:36 +01:00
parent 8056fda650
commit ea738270a0
9 changed files with 4673 additions and 267 deletions

View File

@@ -24,7 +24,9 @@ BzBTStatus aiMoveTo(AIBlackboard *data, f32 dt) {
return BZ_BT_SUCCESS;
}
if (!ecs_has(ECS, data->entity, Path)) {
entitySetPath(data->entity, target, game);
bool pathfindSuccessful = entitySetPath(data->entity, target, game);
if (!pathfindSuccessful)
return BZ_BT_FAIL;
}
if (ecs_has(ECS, data->entity, Orientation)) {
Orientation *orientation = ecs_get_mut(ECS, data->entity, Orientation);