aboutsummaryrefslogtreecommitdiff
path: root/src/bones.c
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-07 07:21:18 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-07 07:21:18 +0100
commit55a4aed50112c06991d1dbb6199248bb4083c6a9 (patch)
treea5f4e06ddcd0944de825003da5d817c7de3b6a25 /src/bones.c
parentbbe888fc60ba967685be3350509e064277df31f0 (diff)
downloadgold-mine-run-55a4aed50112c06991d1dbb6199248bb4083c6a9.tar.gz
gold-mine-run-55a4aed50112c06991d1dbb6199248bb4083c6a9.zip
Prevent Mr Bones to get stuck turning when can't reach the player
Diffstat (limited to 'src/bones.c')
-rw-r--r--src/bones.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bones.c b/src/bones.c
index f5d7f42..8891534 100644
--- a/src/bones.c
+++ b/src/bones.c
@@ -33,7 +33,7 @@ void bones_init(Entity *e)
void bones_update(Entity *e)
{
- if (abs(player_y() - e->y) < 8)
+ if (abs(player_y() - e->y) < 8 && e->flags < ENEMY_JUMP_DELAY)
{
if (player_x() > e->x && e->dir != DIR_RIGHT)
e->dir = DIR_RIGHT;