aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-06-22 22:56:48 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-06-22 22:56:48 +0100
commit8524301a3c4348a8efd608f39dd4a9fd1991e775 (patch)
tree00eccdff2400003fb8153efe91d0ff516248b9b1
parent5733a241a6e35dd539231c569bb54b7f1cb1e758 (diff)
downloadgold-mine-run-8524301a3c4348a8efd608f39dd4a9fd1991e775.tar.gz
gold-mine-run-8524301a3c4348a8efd608f39dd4a9fd1991e775.zip
When player is hit, exit the update
-rw-r--r--src/player.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/player.c b/src/player.c
index 7b51a35..856cafd 100644
--- a/src/player.c
+++ b/src/player.c
@@ -235,7 +235,10 @@ void player_update()
/* is a deadly block? */
if (map_is_deadly(x + 11, y + 16)
|| map_is_deadly(x + 4, y + 16))
+ {
player_hit();
+ return;
+ }
break;
}
y++;