diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-06-29 23:19:10 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-06-29 23:19:10 +0100 |
commit | 83cbe80dd9c07ebe767d92d97c1dfe447e264751 (patch) | |
tree | 4043eceeb4bda5bfa1edf31d8d95c2b50e242c08 /src/player.c | |
parent | b176d3779cbc3d0d02d6651b082cd5011522f7be (diff) | |
download | gold-mine-run-83cbe80dd9c07ebe767d92d97c1dfe447e264751.tar.gz gold-mine-run-83cbe80dd9c07ebe767d92d97c1dfe447e264751.zip |
Collect pickups even if invulnerable
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/player.c b/src/player.c index 71c951a..a8a75cf 100644 --- a/src/player.c +++ b/src/player.c @@ -297,7 +297,15 @@ void player_draw() uint8_t player_collision(Entity *e) { - if (invuln || dying) + if (invuln) + return 0; + + return player_collision_pickup(e); +} + +uint8_t player_collision_pickup(Entity *e) +{ + if (dying) return 0; if (y < e->y + 16 && e->y < y + 16 |