summaryrefslogtreecommitdiff
path: root/src/enemy/enemy50.c
diff options
context:
space:
mode:
authorKEKW555 <152369890+KEKW555@users.noreply.github.com>2023-12-24 11:52:42 +0530
committerGitHub <noreply@github.com>2023-12-24 11:52:42 +0530
commit20b4cf672439c7d6fe0828d1fbfe51dd05aff3ef (patch)
tree3b4ab8015be29786cb53f9246bf5f2fc981a4942 /src/enemy/enemy50.c
parentc1571218ae991339cd02fb1202b10e7d9a301611 (diff)
True match Enemy50_OnCollision
Diffstat (limited to 'src/enemy/enemy50.c')
-rw-r--r--src/enemy/enemy50.c52
1 files changed, 25 insertions, 27 deletions
diff --git a/src/enemy/enemy50.c b/src/enemy/enemy50.c
index db7bd2c1..dceedf13 100644
--- a/src/enemy/enemy50.c
+++ b/src/enemy/enemy50.c
@@ -82,40 +82,38 @@ void Enemy50_OnCollision(Enemy50Entity* this) {
sub_08041134(this);
sub_0803F6EC(this);
}
- if (super->hitType == 0x25) {
+ if (super->hitType == 0x25 && super->contactFlags == 0x80) {
+ super->action = 8;
+ InitializeAnimation(super, 3);
+ } else {
if (super->contactFlags == 0x80) {
- super->action = 8;
- InitializeAnimation(super, 3);
- goto _08040C9C;
+ this->unk_7c = 0x78;
+ sub_08041128(this);
}
- } else if (super->contactFlags == 0x80) {
- this->unk_7c = 0x78;
- sub_08041128(this);
- }
- if (super->contactFlags == 0x9d) {
- super->zVelocity = Q_16_16(1.5);
- }
- if (super->confusedTime != 0) {
- super->animationState = super->knockbackDirection >> 4;
- InitializeAnimation(super, super->animationState + 7);
- Create0x68FX(super, FX_STARS);
- }
- if (super->health != this->unk_7a) {
- if (super->type == 0) {
+ if (super->contactFlags == 0x9d) {
+ super->zVelocity = Q_16_16(1.5);
+ }
+ if (super->confusedTime != 0) {
super->animationState = super->knockbackDirection >> 4;
InitializeAnimation(super, super->animationState + 7);
- } else {
- if (super->iframes > 0) {
- *((u8*)&super->iframes) |= 0x80;
+ Create0x68FX(super, FX_STARS);
+ }
+ if (super->health != this->unk_7a) {
+ if (super->type == 0) {
+ super->animationState = super->knockbackDirection >> 4;
+ InitializeAnimation(super, super->animationState + 7);
+ } else {
+ if (super->iframes > 0) {
+ *((u8*)&super->iframes) |= 0x80;
+ }
+ super->flags |= 0x80;
+ super->health = 0xff;
+ super->action = 0xa;
+ super->timer = 60;
}
- super->flags |= 0x80;
- super->health = 0xff;
- super->action = 0xa;
- super->timer = 60;
+ this->unk_7a = super->health;
}
- this->unk_7a = super->health;
}
-_08040C9C:
EnemyFunctionHandlerAfterCollision(super, Enemy50_Functions);
}