From 9f7bd4ccfc1adb1fb98744a0ac0d344a40c23121 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 15 Jul 2023 19:11:10 +0100 Subject: Better at deciding when to jump --- src/old.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/old.c b/src/old.c index dcb2994..44cc9ac 100644 --- a/src/old.c +++ b/src/old.c @@ -110,6 +110,7 @@ void old_update(Entity *e) if (e->flags > ENEMY_JUMP_DELAY && map_is_blocked(e->x + 7, e->y - 1) + && !map_is_blocked(e->x, e->y - 9) && !map_is_blocked(e->x + 7, e->y - 9)) { e->gravity = GRAVITY_UP; @@ -130,6 +131,7 @@ void old_update(Entity *e) if (e->flags > ENEMY_JUMP_DELAY && map_is_blocked(e->x + 7, e->y - 1) + && !map_is_blocked(e->x + 15, e->y - 9) && !map_is_blocked(e->x + 7, e->y - 9)) { e->gravity = GRAVITY_UP; -- cgit v1.2.3