Polish up AI
This commit is contained in:
@@ -263,8 +263,12 @@ void inputUnitAction(Game *game, InputState *input) {
|
||||
|
||||
for (i32 i = 0; i < unitIdx; i++) {
|
||||
ecs_entity_t entity = entities[i].entity;
|
||||
setAIBehaviour(entity, game->BTs.unit, &(AIBlackboard) {
|
||||
BzBTNode *BT = game->BTs.unit;
|
||||
if (ecs_has(ECS, entity, Worker))
|
||||
BT = game->BTs.unitEvasive;
|
||||
setAIBehaviour(entity, BT, &(AIBlackboard) {
|
||||
.moveToPos = positions[i],
|
||||
.shouldMoveTo = true,
|
||||
.proximity = 1.0f,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user