diff options
author | kdx <kikoodx@paranoici.org> | 2023-03-19 01:37:14 +0100 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-03-19 01:37:14 +0100 |
commit | fd2c1baa4edc4a99ff3752f86267ae98f017a77b (patch) | |
tree | 1b7615052e56cb641e52db663f1b9b46c6cef35e /src/player.c | |
parent | 56d1c26ede4e9641addc6aaed90d5055fd9db9d2 (diff) | |
download | hyperultra-fd2c1baa4edc4a99ff3752f86267ae98f017a77b.tar.gz |
spikes!
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/player.c b/src/player.c index f5a824f..3af2dfc 100644 --- a/src/player.c +++ b/src/player.c @@ -1,4 +1,5 @@ #include "deathpart.h" +#include "entity.h" #include "entityimpl.h" #include "game.h" #include "input.h" @@ -44,7 +45,8 @@ IMPL_UPDATE() { if (this->vel[0] == 0.0 && this->vel[1] >= -0.0) this->player.dirx *= -1; - if (this->bonk_ceiling) { + if (this->bonk_ceiling || + entity_place_meeting(this, g, ET_spike) != NULL) { int dy = this->pos[1] - 6; for (int y = 0; y < 7; y++) { int dx = this->pos[0] - 6; |