Move towards center when harvesting resources
This commit is contained in:
@@ -155,10 +155,10 @@ void inputUnitAction(Game *game, InputState *input) {
|
||||
|
||||
if (!hasNext) break;
|
||||
Position target = *ecs_get(ECS, harvestEntity, Position);
|
||||
HitBox targetHB = *ecs_get(ECS, harvestEntity, HitBox);
|
||||
target = entityGetCenter(target, targetHB);
|
||||
|
||||
f32 proximity = 8.0f;
|
||||
if (resource.type == RES_FOOD)
|
||||
proximity = 2.0f;
|
||||
f32 proximity = 4.0f;
|
||||
|
||||
Worker *worker = ecs_get_mut(ECS, entity, Worker);
|
||||
worker->carryRes = resource.type;
|
||||
|
||||
Reference in New Issue
Block a user