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

@@ -183,7 +183,6 @@ void entityUpdate(ecs_iter_t *it) {
// Attack update
if (canAttack && ecs_has(ECS, other, Health) && ecs_has(ECS, other, Owner)) {
Health *otherHealth = ecs_get_mut(ECS, other, Health);
Player otherPlayer = ecs_get(ECS, other, Owner)->player;
if (otherPlayer != owner[i].player) {
@@ -219,7 +218,7 @@ void entityUpdate(ecs_iter_t *it) {
velocity[i] = Vector2Subtract(velocity[i], dir);
}
slowDown = BZ_MIN(slowDown, 0.65f);
slowDown = BZ_MIN(slowDown, 0.2f);
if (!stationary && slowDown > 0.0f) {
velocity[i] = Vector2Scale(velocity[i], 1 - slowDown);
}