aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-15 19:11:10 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-15 19:11:10 +0100
commit9f7bd4ccfc1adb1fb98744a0ac0d344a40c23121 (patch)
treeb90741a7d07af3d5a728b31a7244160dc96ef8d3 /src
parent52184a396ecd124bf3b304ac026ff07c84414971 (diff)
downloadgold-mine-run-9f7bd4ccfc1adb1fb98744a0ac0d344a40c23121.tar.gz
gold-mine-run-9f7bd4ccfc1adb1fb98744a0ac0d344a40c23121.zip
Better at deciding when to jump
Diffstat (limited to 'src')
-rw-r--r--src/old.c2
1 files changed, 2 insertions, 0 deletions
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;