commit b9882d640fa79f55499c9b329821fc152d4f411d
parent 732cca38e6985660d53a7520e0cf5636a53346d8
Author: Sophie <info@soophie.de>
Date: Tue, 17 Dec 2024 15:15:35 +0100
feat: Reduced enemy turn around tolerance
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/enemy.c b/src/enemy.c
@@ -129,7 +129,7 @@ void enemy_update(enemy_t *enemy, game_t *game) {
enemy->frozen_timer++;
}
// handle movement
- tile_t *next_ground_tile = tile_get(game, enemy->pos.x + ENEMY_WIDTH / 2.0 + enemy->dir * ENEMY_WIDTH / 2.0, enemy->pos.y + ENEMY_HEIGHT + 1);
+ tile_t *next_ground_tile = tile_get(game, enemy->pos.x + ENEMY_WIDTH / 2.0 + enemy->dir * ENEMY_WIDTH / 6.0, enemy->pos.y + ENEMY_HEIGHT + 1);
if (!enemy->frozen) {
if (enemy->on_ground && (next_ground_tile == NULL || next_ground_tile->type == TILE_AIR)) {
enemy->dir = -enemy->dir;