summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/code_08049DF4.c8
-rw-r--r--src/collision.c4
-rw-r--r--src/enemy/acroBandits.c2
-rw-r--r--src/enemy/armos.c6
-rw-r--r--src/enemy/beetle.c4
-rw-r--r--src/enemy/bobomb.c2
-rw-r--r--src/enemy/bowMoblin.c2
-rw-r--r--src/enemy/chaser.c2
-rw-r--r--src/enemy/chuchuBoss.c8
-rw-r--r--src/enemy/cloudPiranha.c2
-rw-r--r--src/enemy/crow.c2
-rw-r--r--src/enemy/darkNut.c2
-rw-r--r--src/enemy/enemy50.c8
-rw-r--r--src/enemy/eyegore.c6
-rw-r--r--src/enemy/flyingPot.c4
-rw-r--r--src/enemy/flyingSkull.c4
-rw-r--r--src/enemy/ghini.c4
-rw-r--r--src/enemy/gibdo.c8
-rw-r--r--src/enemy/gleerok.c8
-rw-r--r--src/enemy/hangingSeed.c2
-rw-r--r--src/enemy/helmasaur.c2
-rw-r--r--src/enemy/keaton.c2
-rw-r--r--src/enemy/lakitu.c2
-rw-r--r--src/enemy/leever.c2
-rw-r--r--src/enemy/likeLike.c10
-rw-r--r--src/enemy/madderpillar.c4
-rw-r--r--src/enemy/mazaalBracelet.c6
-rw-r--r--src/enemy/moldworm.c6
-rw-r--r--src/enemy/mulldozer.c2
-rw-r--r--src/enemy/peahat.c6
-rw-r--r--src/enemy/pesto.c6
-rw-r--r--src/enemy/rockChuchu.c2
-rw-r--r--src/enemy/rollobite.c4
-rw-r--r--src/enemy/rupeeLike.c4
-rw-r--r--src/enemy/scissorsBeetle.c2
-rw-r--r--src/enemy/spark.c2
-rw-r--r--src/enemy/spearMoblin.c4
-rw-r--r--src/enemy/spinyBeetle.c2
-rw-r--r--src/enemy/spinyChuchu.c2
-rw-r--r--src/enemy/stalfos.c6
-rw-r--r--src/enemy/takkuri.c2
-rw-r--r--src/enemy/tektite.c2
-rw-r--r--src/enemy/tektiteGolden.c2
-rw-r--r--src/enemy/vaatiArm.c6
-rw-r--r--src/enemy/vaatiBall.c2
-rw-r--r--src/enemy/vaatiProjectile.c4
-rw-r--r--src/enemy/vaatiRebornEnemy.c4
-rw-r--r--src/enemy/vaatiTransfigured.c4
-rw-r--r--src/enemy/vaatiTransfiguredEye.c2
-rw-r--r--src/enemy/vaatiWrath.c2
-rw-r--r--src/enemy/wisp.c2
-rw-r--r--src/enemy/wizzrobeIce.c2
-rw-r--r--src/enemy/wizzrobeWind.c2
-rw-r--r--src/enemyUtils.c6
-rw-r--r--src/interrupts.c5
-rw-r--r--src/npc/cat.c2
-rw-r--r--src/npc/npc5.c6
-rw-r--r--src/object.c2
-rw-r--r--src/object/barrelSpiderweb.c8
-rw-r--r--src/object/bigIceBlock.c2
-rw-r--r--src/object/bush.c2
-rw-r--r--src/object/dirtParticle.c6
-rw-r--r--src/object/evilSpirit.c2
-rw-r--r--src/object/eyeSwitch.c4
-rw-r--r--src/object/fairy.c6
-rw-r--r--src/object/gleerokParticle.c2
-rw-r--r--src/object/hittableLever.c4
-rw-r--r--src/object/itemOnGround.c8
-rw-r--r--src/object/jarPortal.c4
-rw-r--r--src/object/lavaPlatform.c6
-rw-r--r--src/object/lightableSwitch.c8
-rw-r--r--src/object/lilypadLarge.c2
-rw-r--r--src/object/minecart.c6
-rw-r--r--src/object/mineralWaterSource.c2
-rw-r--r--src/object/objectA8.c4
-rw-r--r--src/object/objectOnSpinyBeetle.c6
-rw-r--r--src/object/playerClone.c2
-rw-r--r--src/object/pot.c4
-rw-r--r--src/object/pullableMushroom.c4
-rw-r--r--src/object/sanctuaryStoneTablet.c4
-rw-r--r--src/object/smallIceBlock.c4
-rw-r--r--src/object/smokeParticle.c2
-rw-r--r--src/object/treeThorns.c2
-rw-r--r--src/object/unusedSkull.c4
-rw-r--r--src/object/whirlwind.c4
-rw-r--r--src/physics.c2
-rw-r--r--src/player.c8
-rw-r--r--src/playerItem.c2
-rw-r--r--src/playerItem/playerItemBoomerang.c4
-rw-r--r--src/playerItem/playerItemBottle.c2
-rw-r--r--src/playerItem/playerItemBow.c2
-rw-r--r--src/playerItem/playerItemDashSword.c2
-rw-r--r--src/playerItem/playerItemGust.c2
-rw-r--r--src/playerItem/playerItemGustBig.c4
-rw-r--r--src/playerItem/playerItemHeldObject.c2
-rw-r--r--src/playerItem/playerItemLantern.c2
-rw-r--r--src/playerItem/playerItemPacciCaneProjectile.c2
-rw-r--r--src/playerItem/playerItemShield.c2
-rw-r--r--src/playerItem/playerItemSword.c4
-rw-r--r--src/playerUtils.c8
-rw-r--r--src/projectile/arrowProjectile.c2
-rw-r--r--src/projectile/boneProjectile.c2
-rw-r--r--src/projectile/darkNutSwordSlash.c2
-rw-r--r--src/projectile/dekuSeedProjectile.c4
-rw-r--r--src/projectile/dirtBallProjectile.c2
-rw-r--r--src/projectile/gleerokProjectile.c3
-rw-r--r--src/projectile/guardLineOfSight.c4
-rw-r--r--src/projectile/keatonDagger.c2
-rw-r--r--src/projectile/lakituLightning.c2
-rw-r--r--src/projectile/mandiblesProjectile.c2
-rw-r--r--src/projectile/moblinSpear.c2
-rw-r--r--src/projectile/octorokBossProjectile.c4
-rw-r--r--src/projectile/projectile5.c2
-rw-r--r--src/projectile/removableDust.c2
-rw-r--r--src/projectile/rockProjectile.c2
-rw-r--r--src/projectile/spiderWeb.c2
-rw-r--r--src/projectile/stalfosProjectile.c2
-rw-r--r--src/projectile/v1DarkMagicProjectile.c2
-rw-r--r--src/projectile/v1FireProjectile.c2
-rw-r--r--src/projectile/v2Projectile.c2
-rw-r--r--src/projectileUtils.c2
121 files changed, 215 insertions, 215 deletions
diff --git a/src/code_08049DF4.c b/src/code_08049DF4.c
index 89cf6216..c72da0d8 100644
--- a/src/code_08049DF4.c
+++ b/src/code_08049DF4.c
@@ -18,7 +18,7 @@ Entity* sub_08049DF4(u32 arg0) {
}
Entity* sub_08049E18(void) {
- if ((gPlayerState.field_0x3c == 0) &&
+ if ((gPlayerState.killed == 0) &&
!(gPlayerState.flags &
(PL_BUSY | PL_DROWNING | PL_CAPTURED | PL_USE_PORTAL | PL_HIDDEN | PL_DISABLE_ITEMS | PL_FALLING | PL_FROZEN |
PL_IN_MINECART | PL_PIT_IS_EXIT | PL_MOLDWORM_CAPTURED | PL_IN_HOLE | PL_CONVEYOR_PUSHED | PL_CLIMBING))) {
@@ -29,7 +29,7 @@ Entity* sub_08049E18(void) {
}
Entity* sub_08049E4C(void) {
- if ((gPlayerState.field_0x3c == 0) &&
+ if ((gPlayerState.killed == 0) &&
!(gPlayerState.flags & (PL_BUSY | PL_DROWNING | PL_CAPTURED | PL_USE_PORTAL | PL_HIDDEN | PL_MINISH |
PL_DISABLE_ITEMS | PL_FALLING | PL_FROZEN | PL_IN_MINECART | PL_PIT_IS_EXIT |
PL_MOLDWORM_CAPTURED | PL_IN_HOLE | PL_CONVEYOR_PUSHED | PL_CLIMBING))) {
@@ -40,7 +40,7 @@ Entity* sub_08049E4C(void) {
}
Entity* sub_08049E80(void) {
- if ((gPlayerState.field_0x3c != 0) || !(gPlayerState.flags & PL_MINISH)) {
+ if ((gPlayerState.killed != 0) || !(gPlayerState.flags & PL_MINISH)) {
return NULL;
}
gUnk_020000B0 = &gPlayerEntity.base;
@@ -48,7 +48,7 @@ Entity* sub_08049E80(void) {
}
Entity* sub_08049EB0(void) {
- if ((gPlayerState.field_0x3c == 0) &&
+ if ((gPlayerState.killed == 0) &&
!(gPlayerState.flags & (PL_MOLDWORM_CAPTURED | PL_DISABLE_ITEMS | PL_MINISH | PL_CAPTURED))) {
gUnk_020000B0 = &gPlayerEntity.base;
return &gPlayerEntity.base;
diff --git a/src/collision.c b/src/collision.c
index 6dda05c3..95595906 100644
--- a/src/collision.c
+++ b/src/collision.c
@@ -371,7 +371,7 @@ CollisionResult CollisionNoOp(Entity* org, Entity* tgt, u32 direction, ColSettin
// target: item
CollisionResult CollisionGroundItem(Entity* org, Entity* tgt, u32 direction, ColSettings* settings) {
COLLISION_OFF(tgt);
- tgt->contactFlags = org->hurtType | CONTACT_TAKE_DAMAGE;
+ tgt->contactFlags = org->hurtType | CONTACT_NOW;
if ((tgt->type == 0x5F || tgt->type == 0x60) && sub_08081420(tgt))
tgt->health = 0;
return RESULT_COLLISION_WITHOUT_SET;
@@ -503,7 +503,7 @@ CollisionResult sub_08017DD4(Entity* org, Entity* tgt, u32 direction, ColSetting
sub_08079D84();
org->iframes = 90;
} else {
- gPlayerEntity.base.contactFlags = tgt->hurtType | CONTACT_TAKE_DAMAGE;
+ gPlayerEntity.base.contactFlags = tgt->hurtType | CONTACT_NOW;
gPlayerEntity.base.iframes = 12;
gPlayerEntity.base.knockbackDuration = 16;
gPlayerEntity.base.knockbackDirection = DirectionTurnAround(direction);
diff --git a/src/enemy/acroBandits.c b/src/enemy/acroBandits.c
index 73911ecf..f2e7c201 100644
--- a/src/enemy/acroBandits.c
+++ b/src/enemy/acroBandits.c
@@ -96,7 +96,7 @@ void AcroBandit_OnTick(AcroBanditEntity* this) {
void AcroBandit_OnCollision(AcroBanditEntity* this) {
Entity* brother;
- if (super->contactFlags != CONTACT_TAKE_DAMAGE && super->contactFlags != (CONTACT_TAKE_DAMAGE | 0x1)) {
+ if (super->contactFlags != CONTACT_NOW && super->contactFlags != (CONTACT_NOW | 0x1)) {
if (super->type == 1) {
if (super->action < 7 && super->knockbackDuration != 0) {
brother = super->child;
diff --git a/src/enemy/armos.c b/src/enemy/armos.c
index db597408..99fe9517 100644
--- a/src/enemy/armos.c
+++ b/src/enemy/armos.c
@@ -176,7 +176,7 @@ void sub_08030338(ArmosEntity* this) {
if (super->frame == 2) {
super->frame = 0;
if (this->unk_80 != 2) {
- super->flags2 = 0xb;
+ super->collisionMask = 0xb;
super->hitType = 8;
super->hitbox = (Hitbox*)&gUnk_080FD2F0;
}
@@ -281,7 +281,7 @@ void sub_08030580(ArmosEntity* this) {
void sub_08030590(ArmosEntity* this) {
super->action = 5;
- super->flags2 = 1;
+ super->collisionMask = 1;
super->hitType = 1;
super->hitbox = (Hitbox*)&gHitbox_15;
sub_080309C8(this, 5);
@@ -337,7 +337,7 @@ bool32 sub_080305BC(ArmosEntity* this) {
bool32 sub_08030650(ArmosEntity* this) {
if (super->type == 0) {
- if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags == CONTACT_NOW) {
return 1;
}
} else if (this->unk_80 != 2) {
diff --git a/src/enemy/beetle.c b/src/enemy/beetle.c
index 75924746..19603462 100644
--- a/src/enemy/beetle.c
+++ b/src/enemy/beetle.c
@@ -35,7 +35,7 @@ void Beetle_OnTick(BeetleEntity* this) {
void Beetle_OnCollision(BeetleEntity* this) {
switch (super->contactFlags) {
- case CONTACT_TAKE_DAMAGE:
+ case CONTACT_NOW:
if (gPlayerState.framestate == PL_STATE_CLIMB) {
Beetle_OnTick(this);
} else {
@@ -50,7 +50,7 @@ void Beetle_OnCollision(BeetleEntity* this) {
InitializeAnimation(super, 6);
}
break;
- case CONTACT_TAKE_DAMAGE | 0x13:
+ case CONTACT_NOW | 0x13:
Beetle_OnTick(this);
break;
}
diff --git a/src/enemy/bobomb.c b/src/enemy/bobomb.c
index 7dfae72e..f1ae158b 100644
--- a/src/enemy/bobomb.c
+++ b/src/enemy/bobomb.c
@@ -38,7 +38,7 @@ void Bobomb_OnTick(BobombEntity* this) {
}
void Bobomb_OnCollision(BobombEntity* this) {
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
switch (super->contactFlags & 0x7f) {
case 0:
case 1:
diff --git a/src/enemy/bowMoblin.c b/src/enemy/bowMoblin.c
index 6a1176ee..b071ced4 100644
--- a/src/enemy/bowMoblin.c
+++ b/src/enemy/bowMoblin.c
@@ -56,7 +56,7 @@ void BowMoblin_OnCollision(BowMoblinEntity* this) {
EnemyCreateFX(super, FX_STARS);
}
EnemyFunctionHandlerAfterCollision(super, (EntityActionArray)BowMoblin_Functions);
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
sub_0803C5F0(this);
pEVar1 = super->child;
if (pEVar1 != NULL) {
diff --git a/src/enemy/chaser.c b/src/enemy/chaser.c
index 3c374cd4..a17f4c96 100644
--- a/src/enemy/chaser.c
+++ b/src/enemy/chaser.c
@@ -43,7 +43,7 @@ void sub_0802B540(Entity* this) {
void sub_0802B56C(Entity* this) {
GetNextFrame(this);
- if (this->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags & CONTACT_NOW) {
this->speed = 0x40;
}
diff --git a/src/enemy/chuchuBoss.c b/src/enemy/chuchuBoss.c
index c9ee902c..d5502a80 100644
--- a/src/enemy/chuchuBoss.c
+++ b/src/enemy/chuchuBoss.c
@@ -978,13 +978,13 @@ void sub_08026BE8(ChuchuBossEntity* this) {
Entity* child;
child = super->child;
- child->flags2 &= ~1;
+ child->collisionMask &= ~1;
if (this->unk_7c == 0) {
super->subAction = 7;
this->unk_84->unk_03 = 0;
this->unk_7d = 0x2d;
child->flags &= ~0x80;
- child->flags2 |= 1;
+ child->collisionMask |= 1;
SoundReq(SFX_155);
} else {
this->unk_7c--;
@@ -1346,7 +1346,7 @@ void sub_080272D4(ChuchuBossEntity* this) {
super->hitbox->height = (u32)((0x10000 / this->unk_74.HALF_U.HI) * 5) >> 6;
if (*(char*)&this->unk_84 == 0)
break;
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
if (super->iframes != 0) {
((ChuchuBossEntity*)super->child)->unk_68->base.iframes = super->iframes;
super->child->parent->iframes = super->iframes;
@@ -1697,7 +1697,7 @@ bool32 sub_08027AA4(ChuchuBossEntity* this) {
s32 iVar4;
Helper* pHelper;
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) == 0) {
+ if ((super->contactFlags & CONTACT_NOW) == 0) {
return FALSE;
}
switch (super->contactFlags & 0x7f) {
diff --git a/src/enemy/cloudPiranha.c b/src/enemy/cloudPiranha.c
index 64bf98cc..74f4be6b 100644
--- a/src/enemy/cloudPiranha.c
+++ b/src/enemy/cloudPiranha.c
@@ -58,7 +58,7 @@ void CloudPiranha_OnCollision(CloudPiranhaEntity* this) {
EnemyCreateFX(super, FX_STARS);
}
EnemyFunctionHandlerAfterCollision(super, gUnk_080CF4F0);
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
if (super->hitType == 0x5a) {
switch (super->contactFlags & 0x3f) {
case 0x14:
diff --git a/src/enemy/crow.c b/src/enemy/crow.c
index c540e4ae..5c882480 100644
--- a/src/enemy/crow.c
+++ b/src/enemy/crow.c
@@ -44,7 +44,7 @@ void Crow_OnTick(CrowEntity* this) {
}
void Crow_OnCollision(CrowEntity* this) {
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
if ((super->contactFlags & 0x3f) == 0) {
COLLISION_OFF(super);
super->subtimer = 16;
diff --git a/src/enemy/darkNut.c b/src/enemy/darkNut.c
index 39820a64..6a7a17db 100644
--- a/src/enemy/darkNut.c
+++ b/src/enemy/darkNut.c
@@ -336,7 +336,7 @@ void sub_080210E4(DarkNutEntity* this) {
sub_08021644(this);
if ((super->frame & 0x10) &&
- (!ProcessMovement0(super) || (super->child && (super->child->contactFlags & CONTACT_TAKE_DAMAGE)))) {
+ (!ProcessMovement0(super) || (super->child && (super->child->contactFlags & CONTACT_NOW)))) {
sub_080213D0(this, 0);
} else {
if (--this->unk_76 == 0)
diff --git a/src/enemy/enemy50.c b/src/enemy/enemy50.c
index 9987ee88..36156ce7 100644
--- a/src/enemy/enemy50.c
+++ b/src/enemy/enemy50.c
@@ -79,15 +79,15 @@ void Enemy50_OnCollision(Enemy50Entity* this) {
sub_08041134(this);
sub_0803F6EC(this);
}
- if (super->hitType == 0x25 && super->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (super->hitType == 0x25 && super->contactFlags == CONTACT_NOW) {
super->action = 8;
InitializeAnimation(super, 3);
} else {
- if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags == CONTACT_NOW) {
this->unk_7c = 0x78;
sub_08041128(this);
}
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x1d)) {
super->zVelocity = Q_16_16(1.5);
}
if (super->confusedTime != 0) {
@@ -422,7 +422,7 @@ void sub_0804122C(Enemy50Entity* this) {
#ifndef EU
bool32 sub_08041300(Enemy50Entity* this) {
- if ((super->hitType == 0x25) && (super->contactFlags == CONTACT_TAKE_DAMAGE)) {
+ if ((super->hitType == 0x25) && (super->contactFlags == CONTACT_NOW)) {
return TRUE;
} else {
return super->action == 8 || super->action == 9;
diff --git a/src/enemy/eyegore.c b/src/enemy/eyegore.c
index 3b4ee58c..1ccf4e78 100644
--- a/src/enemy/eyegore.c
+++ b/src/enemy/eyegore.c
@@ -82,14 +82,14 @@ void Eyegore_OnTick(EyegoreEntity* this) {
void Eyegore_OnCollision(EyegoreEntity* this) {
u32 tmp;
- if ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x15)) || (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe))) {
+ if ((super->contactFlags == (CONTACT_NOW | 0x15)) || (super->contactFlags == (CONTACT_NOW | 0xe))) {
Entity* entity = super->contactedEntity;
tmp = (((entity->direction + 4) & 0x18) ^ 0x10) >> 3;
if (tmp == super->animationState) {
if ((tmp & 1) != 0) {
if (0x10 < ((entity->y.HALF.HI + entity->z.HALF.HI) - (super->y.HALF.HI + super->z.HALF.HI)) + 0x14U) {
} else {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe)) {
+ if (super->contactFlags == (CONTACT_NOW | 0xe)) {
super->health = 0;
} else {
super->health--;
@@ -105,7 +105,7 @@ void Eyegore_OnCollision(EyegoreEntity* this) {
EnqueueSFX(SFX_BUTTON_PRESS);
sub_08031344(this);
} else {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe)) {
+ if (super->contactFlags == (CONTACT_NOW | 0xe)) {
super->health = 0;
} else {
super->health--;
diff --git a/src/enemy/flyingPot.c b/src/enemy/flyingPot.c
index cc868bc0..0402aac5 100644
--- a/src/enemy/flyingPot.c
+++ b/src/enemy/flyingPot.c
@@ -93,7 +93,7 @@ void FlyingPot_OnTick(FlyingPotEntity* this) {
void FlyingPot_OnCollision(FlyingPotEntity* this) {
sub_08037418(this);
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x1d)) {
super->action = FLYING_POT_ACTION_6;
COLLISION_OFF(super);
super->zVelocity = Q_16_16(2.625);
@@ -207,7 +207,7 @@ void FlyingPot_Action2(FlyingPotEntity* this) {
super->spritePriority.b1 = 1;
super->spriteOffsetX = 0;
super->hitType = 0xA0;
- super->flags2 = 0xF;
+ super->collisionMask = 0xF;
super->hitbox = &gUnk_080FD34C;
SetBottomTile(this->tileIndex, TILE(super->x.HALF.HI, super->y.HALF.HI), super->collisionLayer);
diff --git a/src/enemy/flyingSkull.c b/src/enemy/flyingSkull.c
index 23ba5c87..4e5acb0e 100644
--- a/src/enemy/flyingSkull.c
+++ b/src/enemy/flyingSkull.c
@@ -45,7 +45,7 @@ void FlyingSkull_OnTick(FlyingSkullEntity* this) {
void FlyingSkull_OnCollision(FlyingSkullEntity* this) {
sub_0803A100(this);
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x1d)) {
super->action = 7;
COLLISION_OFF(super);
super->zVelocity = Q_16_16(2.625);
@@ -198,7 +198,7 @@ void sub_08039FAC(FlyingSkullEntity* this) {
super->spritePriority.b1 = 1;
super->spriteOffsetX = 0;
super->hitType = 0xa0;
- super->flags2 = 0xf;
+ super->collisionMask = 0xf;
super->hitbox = (Hitbox*)&gUnk_080FD34C;
SetBottomTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
}
diff --git a/src/enemy/ghini.c b/src/enemy/ghini.c
index 87a9c402..f835ec1f 100644
--- a/src/enemy/ghini.c
+++ b/src/enemy/ghini.c
@@ -59,11 +59,11 @@ void Ghini_OnCollision(GhiniEntity* this) {
sub_0803F630(this);
sub_0803F6EC(this);
}
- if ((super->hitType == 0x25) && (super->contactFlags == CONTACT_TAKE_DAMAGE)) {
+ if ((super->hitType == 0x25) && (super->contactFlags == CONTACT_NOW)) {
super->action = 8;
InitializeAnimation(super, 3);
} else {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x1d)) {
super->zVelocity = 0x18000;
}
if (super->confusedTime != 0) {
diff --git a/src/enemy/gibdo.c b/src/enemy/gibdo.c
index 0f521e14..e0813e6d 100644
--- a/src/enemy/gibdo.c
+++ b/src/enemy/gibdo.c
@@ -52,7 +52,7 @@ void Gibdo_OnTick(GibdoEntity* this) {
}
void Gibdo_OnCollision(GibdoEntity* this) {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x7)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x7)) {
if (super->action == 0x6) {
sub_08037ACC(this);
}
@@ -62,7 +62,7 @@ void Gibdo_OnCollision(GibdoEntity* this) {
Gibdo_CreateObjects(this);
} else {
if (super->action != 0x6) {
- if (super->hitType == 0x27 && super->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (super->hitType == 0x27 && super->contactFlags == CONTACT_NOW) {
sub_08037A14(this);
} else {
if ((u8)(super->action - 1) < 2) {
@@ -326,7 +326,7 @@ void sub_08037A14(GibdoEntity* this) {
super->timer = 24;
super->spritePriority.b0 &= super->timer - 32;
super->spritePriority.b0 |= 3;
- super->flags2 &= 0xfe;
+ super->collisionMask &= 0xfe;
this->field_0x7c = 5;
CopyPosition(super, super->contactedEntity);
InitAnimationForceUpdate(super, super->animationState + 0xc);
@@ -341,7 +341,7 @@ void sub_08037A58(GibdoEntity* this) {
super->iframes = 0xec;
}
super->hitType = 0x26;
- super->flags2 |= 1;
+ super->collisionMask |= 1;
super->iframes = 0xf4;
super->knockbackDirection = DirectionFromAnimationState(super->animationState) ^ 0x10;
super->knockbackDuration = 8;
diff --git a/src/enemy/gleerok.c b/src/enemy/gleerok.c
index 9eb430b9..e88550f1 100644
--- a/src/enemy/gleerok.c
+++ b/src/enemy/gleerok.c
@@ -383,7 +383,7 @@ void sub_0802D3B8(GleerokEntity* this) {
case 1:
if (super->type2 == 1) {
COLLISION_ON(super);
- super->flags2 |= 0x80;
+ super->collisionMask |= 0x80;
}
super->spritePriority.b0 = gUnk_080CD7C4[super->type2].unk0.HALF.HI;
@@ -399,7 +399,7 @@ void sub_0802D3B8(GleerokEntity* this) {
this->unk_74 = gUnk_080CD884[0];
this->unk_75 = 0;
super->spritePriority.b0 = 6;
- super->flags2 |= 0x80;
+ super->collisionMask |= 0x80;
CopyPosition(super->parent, super);
InitializeAnimation(super, 0x4f);
break;
@@ -659,7 +659,7 @@ void sub_0802D86C(GleerokEntity* this) {
}
}
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) && this->unk_74 == 0) {
+ if ((super->contactFlags & CONTACT_NOW) && this->unk_74 == 0) {
if ((super->contactFlags & 0x7f) == 0x1d) {
super->zVelocity = Q_16_16(3.0);
super->parent->subAction = 4;
@@ -1039,7 +1039,7 @@ void sub_0802E0B8(GleerokEntity* this) {
super->type2 = 4;
InitializeAnimation(super, 0x4e);
} else {
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
if (super->iframes > 0) {
SoundReq(SFX_BOSS_HIT);
}
diff --git a/src/enemy/hangingSeed.c b/src/enemy/hangingSeed.c
index dfdcae96..2f52e0ab 100644
--- a/src/enemy/hangingSeed.c
+++ b/src/enemy/hangingSeed.c
@@ -20,7 +20,7 @@ void HangingSeed_OnTick(Entity* this) {
}
void HangingSeed_OnCollision(Entity* this) {
- if (this->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags & CONTACT_NOW) {
CreateFx(this, FX_BUSH, 0x80);
DeleteThisEntity();
}
diff --git a/src/enemy/helmasaur.c b/src/enemy/helmasaur.c
index ab1437cc..6a929ab6 100644
--- a/src/enemy/helmasaur.c
+++ b/src/enemy/helmasaur.c
@@ -261,7 +261,7 @@ void sub_0802BF3C(HelmasaurEntity* this) {
void sub_0802BF78(HelmasaurEntity* this) {
super->action = 1;
- super->flags2 = 4;
+ super->collisionMask = 4;
super->gustJarFlags = 1;
super->direction = super->animationState << 3;
InitializeAnimation(super, super->animationState + 8);
diff --git a/src/enemy/keaton.c b/src/enemy/keaton.c
index 348d7e25..40688bfe 100644
--- a/src/enemy/keaton.c
+++ b/src/enemy/keaton.c
@@ -143,7 +143,7 @@ void Keaton_Action3(KeatonEntity* this) {
}
void Keaton_Action4(KeatonEntity* this) {
- if (super->child && (super->child->contactFlags & CONTACT_TAKE_DAMAGE)) {
+ if (super->child && (super->child->contactFlags & CONTACT_NOW)) {
sub_0803275C(this);
return;
}
diff --git a/src/enemy/lakitu.c b/src/enemy/lakitu.c
index 740ceb54..c0dba3db 100644
--- a/src/enemy/lakitu.c
+++ b/src/enemy/lakitu.c
@@ -342,7 +342,7 @@ void sub_0803CBAC(LakituEntity* this) {
super->spritePriority.b1 = 1;
- super->flags2 &= 0x7b;
+ super->collisionMask &= 0x7b;
super->hitType = 0x42;
diff --git a/src/enemy/leever.c b/src/enemy/leever.c
index 4bdc4253..17745ecb 100644
--- a/src/enemy/leever.c
+++ b/src/enemy/leever.c
@@ -47,7 +47,7 @@ void Leever_OnTick(LeeverEntity* this) {
}
void Leever_OnCollision(LeeverEntity* this) {
- if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags == CONTACT_NOW) {
if (super->action == 3) {
this->unk_74 = 1;
}
diff --git a/src/enemy/likeLike.c b/src/enemy/likeLike.c
index 373953f6..0a124fe5 100644
--- a/src/enemy/likeLike.c
+++ b/src/enemy/likeLike.c
@@ -46,13 +46,13 @@ void LikeLike_OnCollision(LikeLikeEntity* this) {
} else {
if (super->action == 7) {
LikeLike_ReleasePlayer(this);
- } else if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
- u8 tmp = super->contactFlags & ~CONTACT_TAKE_DAMAGE;
+ } else if (super->contactFlags & CONTACT_NOW) {
+ u8 tmp = super->contactFlags & ~CONTACT_NOW;
if (tmp == 0) {
super->action = 7;
super->timer = 95;
super->subtimer = tmp;
- super->flags2 &= 0xfc;
+ super->collisionMask &= 0xfc;
this->prevSpritePriority = gPlayerEntity.base.spritePriority.b1;
}
}
@@ -153,7 +153,7 @@ void sub_08027FB4(LikeLikeEntity* this) {
if (--super->timer == 0) {
super->action = 1;
super->timer = 1;
- super->flags2 |= 1;
+ super->collisionMask |= 1;
}
GetNextFrame(super);
}
@@ -236,7 +236,7 @@ void LikeLike_ReleasePlayer(LikeLikeEntity* this) {
super->action = 4;
super->timer = 80;
super->subtimer = tmp;
- super->flags2 |= 2;
+ super->collisionMask |= 2;
if (super->iframes == 0) {
super->iframes = -18;
}
diff --git a/src/enemy/madderpillar.c b/src/enemy/madderpillar.c
index 39d929c9..387740b9 100644
--- a/src/enemy/madderpillar.c
+++ b/src/enemy/madderpillar.c
@@ -518,7 +518,7 @@ void sub_0802A098(MadderpillarEntity* this) {
void sub_0802A0F8(MadderpillarEntity* this) {
if (super->health != 0) {
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) && super->iframes != 0) {
+ if ((super->contactFlags & CONTACT_NOW) && super->iframes != 0) {
Entity* entity = super;
u32 i;
for (i = 0; i < 6; i++) {
@@ -549,7 +549,7 @@ void sub_0802A16C(MadderpillarEntity* this) {
}
void sub_0802A18C(MadderpillarEntity* this) {
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
switch (super->contactFlags & 0x7f) {
case 0:
case 1:
diff --git a/src/enemy/mazaalBracelet.c b/src/enemy/mazaalBracelet.c
index 15e84846..a4ec8dd8 100644
--- a/src/enemy/mazaalBracelet.c
+++ b/src/enemy/mazaalBracelet.c
@@ -167,8 +167,8 @@ void MazaalBracelet_OnCollision(MazaalBraceletEntity* this) {
if (super->type < 2) {
if (super->action != 0x2b) {
- if ((0 < super->iframes) && ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x15) ||
- (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe))))) {
+ if ((0 < super->iframes) &&
+ ((super->contactFlags == (CONTACT_NOW | 0x15) || (super->contactFlags == (CONTACT_NOW | 0xe))))) {
super->action = 0x28;
COLLISION_OFF(super);
entity = (MazaalBraceletEntity*)super->parent;
@@ -1300,7 +1300,7 @@ u32 sub_0803B870(MazaalBraceletEntity* this) {
Entity* entity;
entity = super->child;
- if ((entity->contactFlags & CONTACT_TAKE_DAMAGE) != 0 && (gPlayerState.flags & PL_CAPTURED)) {
+ if ((entity->contactFlags & CONTACT_NOW) != 0 && (gPlayerState.flags & PL_CAPTURED)) {
super->action = 0x18;
super->timer = 68;
super->spriteSettings.draw = 0;
diff --git a/src/enemy/moldworm.c b/src/enemy/moldworm.c
index ef1650f7..a09275f1 100644
--- a/src/enemy/moldworm.c
+++ b/src/enemy/moldworm.c
@@ -101,7 +101,7 @@ void Moldworm_OnCollision(MoldwormEntity* this) {
super->iframes = -8;
this->unk_7f = 0;
this->unk_7b = 0;
- if (super->contactFlags == CONTACT_TAKE_DAMAGE || super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1e)) {
+ if (super->contactFlags == CONTACT_NOW || super->contactFlags == (CONTACT_NOW | 0x1e)) {
super->type2 = 0;
this->unk_80 = 0x14;
} else {
@@ -441,7 +441,7 @@ void sub_08023894(MoldwormEntity* this) {
}
void sub_0802390C(MoldwormEntity* this) {
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
Entity* ent = super->child;
do {
ent->iframes = super->iframes;
@@ -449,7 +449,7 @@ void sub_0802390C(MoldwormEntity* this) {
} else {
Entity* ent = super->child;
do {
- if (ent->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (ent->contactFlags & CONTACT_NOW) {
u8 bVar2 = 0xff - ent->health;
if (bVar2 != 0) {
u32 tmp;
diff --git a/src/enemy/mulldozer.c b/src/enemy/mulldozer.c
index 8af9198a..9afd925a 100644
--- a/src/enemy/mulldozer.c
+++ b/src/enemy/mulldozer.c
@@ -55,7 +55,7 @@ void Mulldozer_OnCollision(MulldozerEntity* this) {
EnemyCreateFX(super, 0x1c);
}
EnemyFunctionHandlerAfterCollision(super, Mulldozer_Functions);
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
switch (super->contactFlags & 0x3f) {
case 2:
case 3:
diff --git a/src/enemy/peahat.c b/src/enemy/peahat.c
index c3250c60..a8404af9 100644
--- a/src/enemy/peahat.c
+++ b/src/enemy/peahat.c
@@ -61,7 +61,7 @@ void Peahat_OnTick(PeahatEntity* this) {
void Peahat_OnCollision(PeahatEntity* this) {
if (this->unk_82) {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x14)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x14)) {
Entity* entity = CreateEnemy(PEAHAT, PeahatForm_Propeller);
if (entity != NULL) {
CopyPosition(super, entity);
@@ -74,14 +74,14 @@ void Peahat_OnCollision(PeahatEntity* this) {
super->iframes = -30;
this->unk_81 = 0;
InitializeAnimation(super, super->animationState);
- } else if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1b)) {
+ } else if (super->contactFlags == (CONTACT_NOW | 0x1b)) {
super->animationState = PeahatAnimation_BrokenPropeller;
super->action = 5;
super->speed = 0x80;
super->iframes = -30;
this->unk_81 = 0;
InitializeAnimation(super, super->animationState);
- } else if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
+ } else if (super->contactFlags == CONTACT_NOW) {
if (super->animationState == PeahatAnimation_Flying) {
super->action = 1;
super->timer = 30;
diff --git a/src/enemy/pesto.c b/src/enemy/pesto.c
index e386d4b6..05e38286 100644
--- a/src/enemy/pesto.c
+++ b/src/enemy/pesto.c
@@ -65,7 +65,7 @@ void Pesto_OnTick(PestoEntity* this) {
void Pesto_OnCollision(PestoEntity* this) {
if (super->hitType != 0x6e) {
- if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags == CONTACT_NOW) {
this->unk_86 = 0x30;
if ((this->unk_83 & 0xf) == 3 && super->action == 6) {
@@ -406,7 +406,7 @@ void sub_080244E8(PestoEntity* this) {
super->direction = DirectionSouth;
super->speed = tmp;
this->unk_84 = 0;
- super->flags2 &= 0xfc;
+ super->collisionMask &= 0xfc;
sub_080249DC(this);
this->unk_85 = gPlayerEntity.base.spritePriority.b1;
gPlayerEntity.base.flags &= ~ENT_COLLIDE;
@@ -878,7 +878,7 @@ void sub_08024F50(PestoEntity* this) {
gPlayerEntity.base.spritePriority.b1 = this->unk_85;
gPlayerEntity.base.z.HALF.HI = gPlayerEntity.base.spriteOffsetY;
gPlayerEntity.base.spriteOffsetY = 0;
- super->flags2 |= 3;
+ super->collisionMask |= 3;
this->unk_83 = 0xc0;
this->unk_80 += 2;
this->unk_84 = 0;
diff --git a/src/enemy/rockChuchu.c b/src/enemy/rockChuchu.c
index 4b760d66..72e18f8d 100644
--- a/src/enemy/rockChuchu.c
+++ b/src/enemy/rockChuchu.c
@@ -100,7 +100,7 @@ void sub_080223E4(Entity* this) {
entity = this->child;
if (entity != NULL) {
- entity->contactFlags = (CONTACT_TAKE_DAMAGE | 0x14);
+ entity->contactFlags = (CONTACT_NOW | 0x14);
entity->iframes = 0x10;
#ifndef EU
entity->knockbackDuration = 0xc;
diff --git a/src/enemy/rollobite.c b/src/enemy/rollobite.c
index db6233e1..deb60f26 100644
--- a/src/enemy/rollobite.c
+++ b/src/enemy/rollobite.c
@@ -51,7 +51,7 @@ void Rollobite_OnCollision(RollobiteEntity* this) {
InitializeAnimation(super, super->animationState + 8);
}
- if (super->contactFlags != CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags != CONTACT_NOW) {
if (super->action == 4 || super->action == 5) {
super->action = 4;
super->timer = 180;
@@ -60,7 +60,7 @@ void Rollobite_OnCollision(RollobiteEntity* this) {
}
}
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x13))
+ if (super->contactFlags == (CONTACT_NOW | 0x13))
Rollobite_OnTick(this);
}
diff --git a/src/enemy/rupeeLike.c b/src/enemy/rupeeLike.c
index 7ebff811..ada5434e 100644
--- a/src/enemy/rupeeLike.c
+++ b/src/enemy/rupeeLike.c
@@ -75,7 +75,7 @@ void RupeeLike_OnCollision(RupeeLikeEntity* this) {
super->timer = 60;
super->subtimer = 0;
this->unk_83 = 0x41;
- super->flags2 &= 0xfc;
+ super->collisionMask &= 0xfc;
this->unk_80 = gPlayerEntity.base.spritePriority.b1;
EnqueueSFX(SFX_PLACE_OBJ);
} else {
@@ -255,7 +255,7 @@ void sub_080296D8(RupeeLikeEntity* this) {
gPlayerEntity.base.speed = 0x140;
super->action = 5;
super->subtimer = 60;
- super->flags2 |= 3;
+ super->collisionMask |= 3;
if ((s8)super->iframes == 0) {
super->iframes = 0xf4;
}
diff --git a/src/enemy/scissorsBeetle.c b/src/enemy/scissorsBeetle.c
index bbd7f223..72bb2f8a 100644
--- a/src/enemy/scissorsBeetle.c
+++ b/src/enemy/scissorsBeetle.c
@@ -44,7 +44,7 @@ void ScissorsBeetle_OnCollision(ScissorsBeetleEntity* this) {
}
EnemyFunctionHandlerAfterCollision(super, ScissorsBeetle_Functions);
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) && super->action != 4) {
+ if ((super->contactFlags & CONTACT_NOW) && super->action != 4) {
u32 knockbackDir;
child = super->child;
child->iframes = super->iframes;
diff --git a/src/enemy/spark.c b/src/enemy/spark.c
index 7006c8b9..79a65afe 100644
--- a/src/enemy/spark.c
+++ b/src/enemy/spark.c
@@ -22,7 +22,7 @@ void Spark_OnTick(Entity* this) {
void Spark_OnCollision(Entity* this) {
Entity* entity;
- if (this->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags & CONTACT_NOW) {
if ((this->contactFlags & 0x7f) == 0x14) {
COLLISION_OFF(this);
this->iframes = 0;
diff --git a/src/enemy/spearMoblin.c b/src/enemy/spearMoblin.c
index 97d5850b..271a4c23 100644
--- a/src/enemy/spearMoblin.c
+++ b/src/enemy/spearMoblin.c
@@ -57,7 +57,7 @@ void SpearMoblin_OnCollision(SpearMoblinEntity* this) {
EnemyCreateFX(super, FX_STARS);
EnemyFunctionHandlerAfterCollision(super, SpearMoblin_Functions);
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
if (super->action != 4) {
sub_08028754(this);
} else {
@@ -398,7 +398,7 @@ bool32 sub_080288A4(SpearMoblinEntity* this) {
void sub_080288C0(SpearMoblinEntity* this) {
Entity* entity = super->child;
- if ((entity != NULL) && (entity->contactFlags & CONTACT_TAKE_DAMAGE)) {
+ if ((entity != NULL) && (entity->contactFlags & CONTACT_NOW)) {
super->knockbackDirection = entity->knockbackDirection;
super->iframes = -entity->iframes;
super->knockbackSpeed = entity->knockbackSpeed;
diff --git a/src/enemy/spinyBeetle.c b/src/enemy/spinyBeetle.c
index 297b3b51..3bd9b0da 100644
--- a/src/enemy/spinyBeetle.c
+++ b/src/enemy/spinyBeetle.c
@@ -49,7 +49,7 @@ void SpinyBeetle_OnCollision(SpinyBeetleEntity* this) {
}
EnemyFunctionHandlerAfterCollision(super, SpinyBeetle_Functions);
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
if (super->iframes > 0 && super->child) {
sub_08033E1C(this);
}
diff --git a/src/enemy/spinyChuchu.c b/src/enemy/spinyChuchu.c
index d736b8e0..72329b9f 100644
--- a/src/enemy/spinyChuchu.c
+++ b/src/enemy/spinyChuchu.c
@@ -60,7 +60,7 @@ void SpinyChuchu_OnCollision(SpinyChuchuEntity* this) {
super->hitType = 0x5c;
InitializeAnimation(super, 1);
}
- } else if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x14)) {
+ } else if (super->contactFlags == (CONTACT_NOW | 0x14)) {
EnemyCreateFX(super, FX_STARS);
super->action = 5;
InitializeAnimation(super, 1);
diff --git a/src/enemy/stalfos.c b/src/enemy/stalfos.c
index b4a26dfb..4bb4b5c1 100644
--- a/src/enemy/stalfos.c
+++ b/src/enemy/stalfos.c
@@ -109,7 +109,7 @@ void Stalfos_OnCollision(StalfosEntity* this) {
sub_08039A48(this);
this->unk_78 += 0x5a;
}
- super->flags2 &= 0xfb;
+ super->collisionMask &= 0xfb;
}
if (super->confusedTime != 0) {
EnemyCreateFX(super, FX_STARS);
@@ -153,7 +153,7 @@ void Stalfos_SubAction2(StalfosEntity* this) {
}
super->child = NULL;
super->gustJarState &= 0xfb;
- super->flags2 &= 0xfb;
+ super->collisionMask &= 0xfb;
sub_08039A48(this);
this->unk_78 += 0x5a;
}
@@ -279,7 +279,7 @@ void Stalfos_Action12(StalfosEntity* this) {
} else {
sub_08039A48(this);
}
- super->flags2 |= 4;
+ super->collisionMask |= 4;
this->unk_78 += 0x3c;
}
}
diff --git a/src/enemy/takkuri.c b/src/enemy/takkuri.c
index 38aa602f..fc5c90bd 100644
--- a/src/enemy/takkuri.c
+++ b/src/enemy/takkuri.c
@@ -46,7 +46,7 @@ void Takkuri_OnTick(TakkuriEntity* this) {
}
void Takkuri_OnCollision(TakkuriEntity* this) {
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
if ((super->contactFlags & 0x7f) == 0) {
u32 direction;
sub_0803C0AC(super);
diff --git a/src/enemy/tektite.c b/src/enemy/tektite.c
index 0cc625b3..be3e79e4 100644
--- a/src/enemy/tektite.c
+++ b/src/enemy/tektite.c
@@ -63,7 +63,7 @@ void Tektite_OnCollision(TektiteEntity* this) {
EnemyCreateFX(super, FX_STARS);
}
EnemyFunctionHandlerAfterCollision(super, Tektite_Functions);
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
switch (super->contactFlags & 0x3f) {
case 0x14:
super->action = 1;
diff --git a/src/enemy/tektiteGolden.c b/src/enemy/tektiteGolden.c
index c6af233a..61737644 100644
--- a/src/enemy/tektiteGolden.c
+++ b/src/enemy/tektiteGolden.c
@@ -51,7 +51,7 @@ void TektiteGolden_OnCollision(TektiteGoldenEntity* this) {
EnemyCreateFX(super, FX_STARS);
}
EnemyFunctionHandlerAfterCollision(super, TektiteGolden_Functions);
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x14)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x14)) {
super->action = 1;
super->subAction = 0;
super->timer = 20;
diff --git a/src/enemy/vaatiArm.c b/src/enemy/vaatiArm.c
index b94db4e5..facc5527 100644
--- a/src/enemy/vaatiArm.c
+++ b/src/enemy/vaatiArm.c
@@ -1401,7 +1401,7 @@ static void sub_08043C40(VaatiArmEntity* this, VaatiArm_HeapStruct1* heapStruct)
static bool32 sub_08043C98(VaatiArmEntity* this) {
#if defined EU || defined JP
Entity* e1 = &((VaatiArm_HeapStruct*)super->myHeap)->entities[3]->base;
- if ((e1->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d))) {
+ if ((e1->contactFlags == (CONTACT_NOW | 0x1d))) {
sub_08043D08(this);
return TRUE;
} else {
@@ -1410,7 +1410,7 @@ static bool32 sub_08043C98(VaatiArmEntity* this) {
#else
Entity* e1 = &((VaatiArm_HeapStruct*)super->myHeap)->entities[2]->base;
Entity* e2 = &((VaatiArm_HeapStruct*)super->myHeap)->entities[3]->base;
- if ((e1->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) || (e2->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d))) {
+ if ((e1->contactFlags == (CONTACT_NOW | 0x1d)) || (e2->contactFlags == (CONTACT_NOW | 0x1d))) {
sub_08043D08(this);
gRoomTransition.field_0x38 |= 2;
return TRUE;
@@ -1423,7 +1423,7 @@ static bool32 sub_08043C98(VaatiArmEntity* this) {
static void sub_08043CD4(VaatiArmEntity* this) {
u32 i;
for (i = 0; i < 5; i++) {
- if (((VaatiArm_HeapStruct*)super->myHeap)->entities[i]->base.contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
+ if (((VaatiArm_HeapStruct*)super->myHeap)->entities[i]->base.contactFlags == (CONTACT_NOW | 0x1d)) {
this->unk_7c = 0x78;
this->unk_7d = i;
return;
diff --git a/src/enemy/vaatiBall.c b/src/enemy/vaatiBall.c
index a32eb624..94e040be 100644
--- a/src/enemy/vaatiBall.c
+++ b/src/enemy/vaatiBall.c
@@ -58,7 +58,7 @@ void VaatiBall(VaatiBallEntity* this) {
super->health = -1;
}
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
if ((super->contactFlags & 0x3f) == 0 && super->action == 6) {
ModHealth(-2);
}
diff --git a/src/enemy/vaatiProjectile.c b/src/enemy/vaatiProjectile.c
index 3df5abe6..7a27a6eb 100644
--- a/src/enemy/vaatiProjectile.c
+++ b/src/enemy/vaatiProjectile.c
@@ -66,7 +66,7 @@ void VaatiProjectile_OnTick(VaatiProjectileEntity* this) {
void VaatiProjectile_OnCollision(VaatiProjectileEntity* this) {
Entity* entity;
- if (super->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags == CONTACT_NOW) {
#ifndef EU
if (super->health != 0) {
#endif
@@ -118,7 +118,7 @@ void VaatiProjectileFunction0Action0(VaatiProjectileEntity* this) {
} else {
super->action = 9;
super->z.HALF.HI = -0x80;
- super->flags2 = 1;
+ super->collisionMask = 1;
}
InitializeAnimation(super, 0);
}
diff --git a/src/enemy/vaatiRebornEnemy.c b/src/enemy/vaatiRebornEnemy.c
index 28586549..5463b4f0 100644
--- a/src/enemy/vaatiRebornEnemy.c
+++ b/src/enemy/vaatiRebornEnemy.c
@@ -539,7 +539,7 @@ void VaatiRebornEnemyType1Action1(VaatiRebornEnemyEntity* this) {
super->hitType = 0x2f;
InitAnimationForceUpdate(super, this->unk_74);
} else {
- if (((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) && (0 < super->iframes)) {
+ if (((super->contactFlags & CONTACT_NOW) != 0) && (0 < super->iframes)) {
parent->iframes = super->iframes;
parent->contactFlags = super->contactFlags;
}
@@ -665,7 +665,7 @@ void VaatiRebornEnemyType1PreAction(VaatiRebornEnemyEntity* this) {
}
parent = super->parent;
this->unk_77 = 0;
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
if (gUnk_080D04D0[((VaatiRebornEnemyEntity*)parent)->unk_86] > super->health) {
if (2 < ++((VaatiRebornEnemyEntity*)parent)->unk_86) {
COLLISION_OFF(super);
diff --git a/src/enemy/vaatiTransfigured.c b/src/enemy/vaatiTransfigured.c
index 9d8f7158..663133fe 100644
--- a/src/enemy/vaatiTransfigured.c
+++ b/src/enemy/vaatiTransfigured.c
@@ -1097,11 +1097,11 @@ void sub_080409B0(VaatiTransfiguredEntity* this) {
Knockback1(super);
}
} else {
- if (((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) && (0 < super->iframes)) {
+ if (((super->contactFlags & CONTACT_NOW) != 0) && (0 < super->iframes)) {
InitScreenShake(12, 1);
SoundReq(SFX_BOSS_HIT);
}
- if ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xa)) && (gPlayerState.chargeState.action == 5)) {
+ if ((super->contactFlags == (CONTACT_NOW | 0xa)) && (gPlayerState.chargeState.action == 5)) {
super->health = 0xc0;
}
}
diff --git a/src/enemy/vaatiTransfiguredEye.c b/src/enemy/vaatiTransfiguredEye.c
index 74e0a522..c3e33442 100644
--- a/src/enemy/vaatiTransfiguredEye.c
+++ b/src/enemy/vaatiTransfiguredEye.c
@@ -72,7 +72,7 @@ void VaatiTransfiguredEye_OnCollision(VaatiTransfiguredEyeEntity* this) {
if (super->type != 0) {
pEVar4 = super->parent->parent;
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
bVar1 = super->contactFlags & 0x3f;
if ((bVar1 == 0xe) || (bVar1 == 0x15)) {
diff --git a/src/enemy/vaatiWrath.c b/src/enemy/vaatiWrath.c
index cac6435c..21f5c506 100644
--- a/src/enemy/vaatiWrath.c
+++ b/src/enemy/vaatiWrath.c
@@ -101,7 +101,7 @@ const s8 gUnk_080D0EB0[] = { 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x0
0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd, 0xfd };
void VaatiWrath(VaatiWrathEntity* this) {
- if (((super->type == 0) && ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0)) && (super->health == 0)) {
+ if (((super->type == 0) && ((super->contactFlags & CONTACT_NOW) != 0)) && (super->health == 0)) {
COLLISION_ON(super);
super->health = 0xff;
if (--this->unk_84 == 0) {
diff --git a/src/enemy/wisp.c b/src/enemy/wisp.c
index 88125bcf..e5c4c5e5 100644
--- a/src/enemy/wisp.c
+++ b/src/enemy/wisp.c
@@ -57,7 +57,7 @@ void Wisp_OnCollision(WispEntity* this) {
Entity* entity;
bits = super->contactFlags;
- if ((bits & CONTACT_TAKE_DAMAGE) == 0) {
+ if ((bits & CONTACT_NOW) == 0) {
return;
}
diff --git a/src/enemy/wizzrobeIce.c b/src/enemy/wizzrobeIce.c
index ae2dbcfe..364d56bd 100644
--- a/src/enemy/wizzrobeIce.c
+++ b/src/enemy/wizzrobeIce.c
@@ -26,7 +26,7 @@ void WizzrobeIce_OnCollision(WizzrobeEntity* this) {
EnemyCreateFX(super, FX_STARS);
}
EnemyFunctionHandlerAfterCollision(super, WizzrobeIce_Functions);
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x7)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x7)) {
Entity* obj = CreateObject(FLAME, 3, 0);
if (obj != NULL) {
obj->spritePriority.b0 = 3;
diff --git a/src/enemy/wizzrobeWind.c b/src/enemy/wizzrobeWind.c
index 18ee7116..92afac49 100644
--- a/src/enemy/wizzrobeWind.c
+++ b/src/enemy/wizzrobeWind.c
@@ -33,7 +33,7 @@ void WizzrobeWind_OnCollision(WizzrobeEntity* this) {
EnemyCreateFX(super, FX_STARS);
}
EnemyFunctionHandlerAfterCollision(super, WizzrobeWind_Functions);
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x7)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x7)) {
Entity* obj = CreateObject(FLAME, 3, 0);
if (obj != NULL) {
obj->spritePriority.b0 = 3;
diff --git a/src/enemyUtils.c b/src/enemyUtils.c
index ed13377f..35ff738d 100644
--- a/src/enemyUtils.c
+++ b/src/enemyUtils.c
@@ -79,7 +79,7 @@ bool32 EnemyInit(Enemy* this) {
if (super->speed == 0) {
super->speed = definition->speed;
}
- super->flags2 = definition->flags2;
+ super->collisionMask = definition->collisionMask;
super->hitType = definition->damageType;
super->hitbox = (Hitbox*)definition->ptr.hitbox;
super->health = definition->health;
@@ -314,9 +314,9 @@ void EnemyDetachFX(Entity* entity) {
/** Unsets bitfield 0x80 before calling GetNextFunction, so that the enemyFunction 1 is not called. */
void EnemyFunctionHandlerAfterCollision(Entity* entity, void (*const fntable[])()) {
u32 idx;
- entity->contactFlags &= ~CONTACT_TAKE_DAMAGE;
+ entity->contactFlags &= ~CONTACT_NOW;
idx = GetNextFunction(entity);
- entity->contactFlags |= CONTACT_TAKE_DAMAGE;
+ entity->contactFlags |= CONTACT_NOW;
fntable[idx](entity);
}
diff --git a/src/interrupts.c b/src/interrupts.c
index f52a8da3..828a6537 100644
--- a/src/interrupts.c
+++ b/src/interrupts.c
@@ -10,6 +10,7 @@
#include "sound.h"
#include "structures.h"
#include "ui.h"
+#include "collision.h"
extern u8 gUnk_03003DE0;
extern u8 gUnk_03000C30;
@@ -236,7 +237,7 @@ static void HandlePlayerLife(Entity* this) {
gUnk_0200AF00.rActionInteractTile = R_ACTION_NONE;
gUnk_0200AF00.rActionGrabbing = R_ACTION_NONE;
- if ((gPlayerEntity.base.contactFlags & CONTACT_TAKE_DAMAGE) && (gPlayerEntity.base.iframes > 0))
+ if ((gPlayerEntity.base.contactFlags & CONTACT_NOW) && (gPlayerEntity.base.iframes > 0))
SoundReq(SFX_86);
gPlayerState.flags &= ~(PL_FALLING | PL_CONVEYOR_PUSHED);
@@ -323,7 +324,7 @@ static void sub_080171F0(void) {
if (gPlayerEntity.unk_7a != 0)
gPlayerEntity.unk_7a--;
- gPlayerEntity.base.contactFlags &= ~CONTACT_TAKE_DAMAGE;
+ gPlayerEntity.base.contactFlags &= ~CONTACT_NOW;
if (gPlayerEntity.base.action != PLAYER_DROWN)
COPY_FLAG_FROM_TO(gPlayerState.flags, 0x2, 0x10000);
diff --git a/src/npc/cat.c b/src/npc/cat.c
index a3228998..9adf40f1 100644
--- a/src/npc/cat.c
+++ b/src/npc/cat.c
@@ -140,7 +140,7 @@ void sub_080677EC(CatEntity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = -0x58;
- super->flags2 = 1;
+ super->collisionMask = 1;
this->unk_69 = 0xff;
if (super->x.HALF.HI < gPlayerEntity.base.x.HALF.HI) {
super->spriteSettings.flipX = 1;
diff --git a/src/npc/npc5.c b/src/npc/npc5.c
index 1b60767d..b6b17ca6 100644
--- a/src/npc/npc5.c
+++ b/src/npc/npc5.c
@@ -2,7 +2,7 @@
* @file npc5.c
* @ingroup NPCs
*
- * @brief NPC 5
+ * @brief Unused Zelda follower NPC.
*/
#include "collision.h"
#include "functions.h"
@@ -166,7 +166,7 @@ void sub_08060AE0(NPC5Entity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 0x49;
- super->flags2 = 3;
+ super->collisionMask = 3;
super->hitbox = (Hitbox*)&gHitbox_0;
super->followerFlag &= 0xfe;
this->unk_6c = 0xff;
@@ -525,7 +525,7 @@ u32 sub_080611D4(Entity* this) {
u32 sub_08061230(NPC5Entity* this) {
if ((((UnkHeap*)super->myHeap)->unk_0 & 1) == 0) {
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
switch (super->contactFlags & 0x7f) {
case 0:
case 1:
diff --git a/src/object.c b/src/object.c
index 31bbdd63..4f61cd10 100644
--- a/src/object.c
+++ b/src/object.c
@@ -207,7 +207,7 @@ void ObjectUpdate(Entity* this) {
this->iframes++;
if (!EntityDisabled(this)) {
gObjectFunctions[this->id](this);
- this->contactFlags &= ~CONTACT_TAKE_DAMAGE;
+ this->contactFlags &= ~CONTACT_NOW;
}
DrawEntity(this);
}
diff --git a/src/object/barrelSpiderweb.c b/src/object/barrelSpiderweb.c
index d4d821dd..69a1ea77 100644
--- a/src/object/barrelSpiderweb.c
+++ b/src/object/barrelSpiderweb.c
@@ -40,7 +40,7 @@ void BarrelSpiderweb_Init(Entity* this) {
this->hitType = 1;
this->collisionFlags = 7;
this->hurtType = 0x48;
- this->flags2 = 4;
+ this->collisionMask = 4;
this->hitbox = (Hitbox*)&gHitbox_0;
this->frameIndex = 2;
this->collisionLayer = gPlayerEntity.base.collisionLayer;
@@ -64,7 +64,7 @@ void sub_0808BBE0(Entity* this) {
ptr = &gUnk_0812144C[diff * 2];
SetAffineInfo(this, ptr[0], ptr[1], 0);
} else {
- this->contactFlags &= ~CONTACT_TAKE_DAMAGE;
+ this->contactFlags &= ~CONTACT_NOW;
}
}
@@ -74,7 +74,7 @@ void BarrelSpiderweb_Action1(Entity* this) {
tmp = -0x170;
this->y.HALF.HI = gRoomControls.origin_y - ((this->parent)->zVelocity + tmp);
sub_0808BBE0(this);
- if (this->contactFlags == (CONTACT_TAKE_DAMAGE | 0x13)) {
+ if (this->contactFlags == (CONTACT_NOW | 0x13)) {
this->timer--;
this->spriteSettings.draw = 1;
if (this->timer == 0) {
@@ -114,7 +114,7 @@ void BarrelSpiderweb_Action2(Entity* this) {
this->subtimer -= 8;
SetAffineInfo(this, 0x200 - this->subtimer, 0x200 - this->subtimer, 0);
}
- if (this->contactFlags == (CONTACT_TAKE_DAMAGE | 0x13)) {
+ if (this->contactFlags == (CONTACT_NOW | 0x13)) {
this->direction = GetFacingDirection(this, &gPlayerEntity.base);
LinearMoveUpdate(this);
if (EntityWithinDistance(this, gPlayerEntity.base.x.HALF.HI, gPlayerEntity.base.y.HALF.HI - 6, 0x1c)) {
diff --git a/src/object/bigIceBlock.c b/src/object/bigIceBlock.c
index 126b0600..0cc856b9 100644
--- a/src/object/bigIceBlock.c
+++ b/src/object/bigIceBlock.c
@@ -48,7 +48,7 @@ void BigIceBlock_Init(BigIceBlockEntity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 1;
- super->flags2 = 0x80;
+ super->collisionMask = 0x80;
super->hitbox = (Hitbox*)&gUnk_080FD190;
sub_08099910(this);
InitializeAnimation(super, super->type);
diff --git a/src/object/bush.c b/src/object/bush.c
index 4e086347..d0fbc49e 100644
--- a/src/object/bush.c
+++ b/src/object/bush.c
@@ -64,7 +64,7 @@ void Bush_Init(BushEntity* this) {
super->health = 1;
super->collisionFlags = 7;
super->hitType = 0x6e;
- super->flags2 = 4;
+ super->collisionMask = 4;
super->hitbox = (Hitbox*)&gUnk_081205B4;
this->unk_72 = 0;
this->unk_70 = GetTileIndex(COORD_TO_TILE(super), super->collisionLayer);
diff --git a/src/object/dirtParticle.c b/src/object/dirtParticle.c
index ac7e848e..cfd0295a 100644
--- a/src/object/dirtParticle.c
+++ b/src/object/dirtParticle.c
@@ -78,7 +78,7 @@ void DirtParticle_Init(DirtParticleEntity* this) {
super->health = 1;
super->collisionFlags = 7;
super->hitType = 0xaa;
- super->flags2 = 0x0e;
+ super->collisionMask = 0x0e;
super->hitbox = (Hitbox*)&gUnk_08120A8C;
super->gustJarFlags = 0;
case 2:
@@ -101,7 +101,7 @@ void DirtParticle_Init(DirtParticleEntity* this) {
void DirtParticle_Action1(DirtParticleEntity* this) {
DirtParticleEntity* entity;
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) == 0) {
+ if ((super->contactFlags & CONTACT_NOW) == 0) {
return;
}
switch (super->contactFlags & 0x7f) {
@@ -128,7 +128,7 @@ void DirtParticle_Action3(DirtParticleEntity* this) {
sub_08087B9C,
sub_08087B9C,
};
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
gUnk_08120A80[super->subAction](this);
} else {
super->action = 1;
diff --git a/src/object/evilSpirit.c b/src/object/evilSpirit.c
index a09392a4..43dc00ab 100644
--- a/src/object/evilSpirit.c
+++ b/src/object/evilSpirit.c
@@ -55,7 +55,7 @@ void EvilSpirit_Init(EvilSpiritEntity* this) {
COLLISION_ON(super);
super->collisionFlags = 7;
super->hitType = 1;
- super->flags2 = 4;
+ super->collisionMask = 4;
for (index = 0; index < 4; index++) {
evilSpiritEnt = CreateObjectWithParent(super, EVIL_SPIRIT, index + 1, 0);
super->child = evilSpiritEnt;
diff --git a/src/object/eyeSwitch.c b/src/object/eyeSwitch.c
index 60310e5c..0e401a64 100644
--- a/src/object/eyeSwitch.c
+++ b/src/object/eyeSwitch.c
@@ -37,7 +37,7 @@ void EyeSwitch_Init(EyeSwitchEntity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 1;
- super->flags2 = 2;
+ super->collisionMask = 2;
super->hitbox = (Hitbox*)&gHitbox_1;
if (CheckFlags(this->eyeSwitchFlags)) {
super->action = 3;
@@ -50,7 +50,7 @@ void EyeSwitch_Init(EyeSwitchEntity* this) {
}
void EyeSwitch_Action1(EyeSwitchEntity* this) {
- if ((super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x15) || super->contactFlags == (CONTACT_TAKE_DAMAGE | 0xe)) &&
+ if ((super->contactFlags == (CONTACT_NOW | 0x15) || super->contactFlags == (CONTACT_NOW | 0xe)) &&
(DirectionRoundUp(super->contactedEntity->direction) >> 3 == (super->animationState & 3))) {
super->action = 2;
COLLISION_OFF(super);
diff --git a/src/object/fairy.c b/src/object/fairy.c
index 38026906..0f2eb209 100644
--- a/src/object/fairy.c
+++ b/src/object/fairy.c
@@ -40,7 +40,7 @@ void Fairy(FairyEntity* this) {
Fairy_Init, Fairy_Action1, Fairy_Action2, Fairy_Action3, Fairy_Action4,
};
- if (((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0)) {
+ if (((super->contactFlags & CONTACT_NOW) != 0)) {
switch (super->contactFlags & 0x7f) {
case 0x14:
super->action = 3;
@@ -103,7 +103,7 @@ void Fairy_Init(FairyEntity* this) {
super->collisionFlags = 0x17;
super->hurtType = 0x49;
super->hitType = 7;
- super->flags2 = 0x17;
+ super->collisionMask = 0x17;
super->health = 0xff;
super->hitbox = (Hitbox*)&gUnk_080FD1A8;
super->gustJarFlags = 1;
@@ -253,6 +253,6 @@ void sub_0808DB2C(FairyEntity* this) {
super->action = 2;
super->subAction = 0;
super->flags |= ENT_COLLIDE;
- super->flags2 = 1;
+ super->collisionMask = 1;
CopyPosition(&gPlayerEntity.base, super);
}
diff --git a/src/object/gleerokParticle.c b/src/object/gleerokParticle.c
index 23bd5d17..7af41d2f 100644
--- a/src/object/gleerokParticle.c
+++ b/src/object/gleerokParticle.c
@@ -152,7 +152,7 @@ void GleerokParticle_Init(GleerokParticleEntity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 0x7a;
- super->flags2 = 1;
+ super->collisionMask = 1;
}
break;
case 0x80:
diff --git a/src/object/hittableLever.c b/src/object/hittableLever.c
index 0bf530ac..a2d97301 100644
--- a/src/object/hittableLever.c
+++ b/src/object/hittableLever.c
@@ -32,7 +32,7 @@ void HittableLever_Init(HittableLeverEntity* this) {
super->flags |= ENT_COLLIDE;
super->collisionFlags = 7;
super->hitType = 0x8f;
- super->flags2 = 0xa;
+ super->collisionMask = 0xa;
super->hitbox = (Hitbox*)&HittableLever_Hitbox;
if (super->type == 0) {
if (CheckFlags(this->hitFlag)) {
@@ -47,7 +47,7 @@ void HittableLever_Init(HittableLeverEntity* this) {
}
void HittableLever_Idle(HittableLeverEntity* this) {
- if (((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) && (this->wasHit == 0)) {
+ if (((super->contactFlags & CONTACT_NOW) != 0) && (this->wasHit == 0)) {
this->wasHit = 1;
super->type ^= 1;
super->iframes = -0x18;
diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c
index b3f6f045..8080b14c 100644
--- a/src/object/itemOnGround.c
+++ b/src/object/itemOnGround.c
@@ -63,7 +63,7 @@ void ItemOnGround(ItemOnGroundEntity* this) {
static void (*const ItemOnGround_Actions[])(ItemOnGroundEntity*) = {
ItemOnGround_Init, ItemOnGround_Action1, ItemOnGround_Action2, ItemOnGround_Action3, ItemOnGround_Action4,
};
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
switch (super->contactFlags & 0x7F) {
case 20:
super->action = 3;
@@ -130,10 +130,10 @@ void ItemOnGround_Init(ItemOnGroundEntity* this) {
case ITEM_BOMBS5:
case ITEM_ARROWS5:
case ITEM_HEART:
- super->flags2 = 0x17;
+ super->collisionMask = 0x17;
break;
default:
- super->flags2 = 0x11;
+ super->collisionMask = 0x11;
break;
}
@@ -186,7 +186,7 @@ void sub_080810FC(ItemOnGroundEntity* this) {
super->action = 2;
super->subAction = 0;
COLLISION_ON(super);
- super->flags2 = 0x11;
+ super->collisionMask = 0x11;
CopyPosition(&gPlayerEntity.base, super);
}
}
diff --git a/src/object/jarPortal.c b/src/object/jarPortal.c
index cd77b956..83c47a0d 100644
--- a/src/object/jarPortal.c
+++ b/src/object/jarPortal.c
@@ -39,7 +39,7 @@ void JarPortal_Init(JarPortalEntity* this) {
super->hitType = 1;
super->collisionFlags = 0x47;
super->hurtType = 0x44;
- super->flags2 = 0x80;
+ super->collisionMask = 0x80;
this->unk_68 = 0;
if (CheckLocalFlag(super->type)) {
if (this->unk_7c != 0) {
@@ -170,7 +170,7 @@ void JarPortal_Action4(JarPortalEntity* this) {
}
u32 sub_0808C128(JarPortalEntity* this) {
- return super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d);
+ return super->contactFlags == (CONTACT_NOW | 0x1d);
}
void sub_0808C13C(JarPortalEntity* this) {
diff --git a/src/object/lavaPlatform.c b/src/object/lavaPlatform.c
index 619bc685..5e806494 100644
--- a/src/object/lavaPlatform.c
+++ b/src/object/lavaPlatform.c
@@ -112,7 +112,7 @@ void LavaPlatform_Type1Init(LavaPlatformEntity* this) {
super->spritePriority.b0 = 7;
super->hurtType = 0x48;
super->collisionFlags = 7;
- super->flags2 = 0x81;
+ super->collisionMask = 0x81;
super->hitbox = (Hitbox*)&gUnk_080FD280;
sub_0809264C(this);
}
@@ -131,7 +131,7 @@ void LavaPlatform_Type1Action1(LavaPlatformEntity* this) {
}
void LavaPlatform_Type1Action2(LavaPlatformEntity* this) {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x1d)) {
sub_08092620(this);
} else {
if (LavaPlatform_IsPlayerOnPlatform(this)) {
@@ -223,7 +223,7 @@ void LavaPlatform_Type1Action6(LavaPlatformEntity* this) {
}
void LavaPlatform_Type1Action7(LavaPlatformEntity* this) {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x1d)) {
sub_08092620(this);
}
}
diff --git a/src/object/lightableSwitch.c b/src/object/lightableSwitch.c
index 06bb3244..a6f0427f 100644
--- a/src/object/lightableSwitch.c
+++ b/src/object/lightableSwitch.c
@@ -58,7 +58,7 @@ void LightableSwitch_Type0_Init(LightableSwitchEntity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 0x28;
- super->flags2 = 10;
+ super->collisionMask = 10;
super->hitbox = (Hitbox*)&gHitbox_0;
sub_0809EAD8(this);
UpdateSpriteForCollisionLayer(super);
@@ -67,7 +67,7 @@ void LightableSwitch_Type0_Init(LightableSwitchEntity* this) {
void LightableSwitch_Type0_Action1(LightableSwitchEntity* this) {
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
if (CheckFlags(this->unk_86) != 0) {
ClearFlag(this->unk_86);
} else {
@@ -136,7 +136,7 @@ void LightableSwitch_Type1_Init(LightableSwitchEntity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 0x28;
- super->flags2 = 10;
+ super->collisionMask = 10;
super->hitbox = (Hitbox*)&gHitbox_0;
sub_0809EAD8(this);
UpdateSpriteForCollisionLayer(super);
@@ -147,7 +147,7 @@ void LightableSwitch_Type1_Init(LightableSwitchEntity* this) {
}
void LightableSwitch_Type1_Action1(LightableSwitchEntity* this) {
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
super->action = 2;
super->timer = 16;
super->frameIndex = 2;
diff --git a/src/object/lilypadLarge.c b/src/object/lilypadLarge.c
index b4bd9c60..d90c1610 100644
--- a/src/object/lilypadLarge.c
+++ b/src/object/lilypadLarge.c
@@ -76,7 +76,7 @@ void LilypadLarge_Init(LilypadLargeEntity* this) {
super->flags |= ENT_COLLIDE;
super->collisionFlags = 7;
super->hitType = 1;
- super->flags2 = 4;
+ super->collisionMask = 4;
this->unk_78.WORD = 0x1000000;
this->unk_7c.HALF_U.HI = 0x1000;
this->unk_85 = 0;
diff --git a/src/object/minecart.c b/src/object/minecart.c
index b13f2c7e..30594d6d 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -54,7 +54,7 @@ void Minecart_Init(MinecartEntity* this) {
super->hitType = 1;
super->collisionFlags = 0x47;
super->hurtType = 0x44;
- super->flags2 = 0x80;
+ super->collisionMask = 0x80;
super->direction = DirectionFromAnimationState(super->animationState);
super->speed = 0x700;
super->spritePriority.b1 = 3;
@@ -112,7 +112,7 @@ void Minecart_Action2(MinecartEntity* this) {
super->flags |= ENT_PERSIST;
super->hitType = 0x97;
super->collisionFlags = (gPlayerEntity.base.collisionFlags + 1) | 0x20;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
super->hurtType = 0x18;
super->damage = 8;
sub_0801766C(super);
@@ -176,7 +176,7 @@ void Minecart_Action3(MinecartEntity* this) {
super->hitType = 1;
super->collisionFlags = 0x47;
super->hurtType = 0x44;
- super->flags2 = 0x80;
+ super->collisionMask = 0x80;
super->action = 6;
sub_08017744(super);
gPlayerState.jump_status = 0x41;
diff --git a/src/object/mineralWaterSource.c b/src/object/mineralWaterSource.c
index e60006d8..3692821b 100644
--- a/src/object/mineralWaterSource.c
+++ b/src/object/mineralWaterSource.c
@@ -46,7 +46,7 @@ void MineralWaterSource_Init(Entity* this) {
this->collisionFlags = 7;
this->hitType = 145;
- this->flags2 = 2;
+ this->collisionMask = 2;
this->action = 1;
}
diff --git a/src/object/objectA8.c b/src/object/objectA8.c
index 6f47de25..4f602fd0 100644
--- a/src/object/objectA8.c
+++ b/src/object/objectA8.c
@@ -39,7 +39,7 @@ void ObjectA8(ObjectA8Entity* this) {
ObjectA8_Init, ObjectA8_Action1, ObjectA8_Action2, ObjectA8_Action3,
ObjectA8_Action4, ObjectA8_Action5, ObjectA8_Action6,
};
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
switch (super->contactFlags & 0x7f) {
case 0:
case 1:
@@ -77,7 +77,7 @@ void ObjectA8_Init(ObjectA8Entity* this) {
super->collisionFlags = 0x17;
super->hurtType = 0x48;
super->hitType = 7;
- super->flags2 = 0x17;
+ super->collisionMask = 0x17;
super->hitbox = (Hitbox*)&gUnk_080FD1A8;
super->gustJarFlags = 1;
this->unk_74 = super->x.HALF.HI;
diff --git a/src/object/objectOnSpinyBeetle.c b/src/object/objectOnSpinyBeetle.c
index aafecc5b..fda7b417 100644
--- a/src/object/objectOnSpinyBeetle.c
+++ b/src/object/objectOnSpinyBeetle.c
@@ -54,7 +54,7 @@ void ObjectOnSpinyBeetle_Init(ObjectOnSpinyBeetleEntity* this) {
super->spriteRendering.b3 = 2;
super->subtimer = 0;
super->hitType = 0x6e;
- super->flags2 = 0x86;
+ super->collisionMask = 0x86;
super->carryFlags = 0;
if (super->type != 0) {
super->gustJarFlags = 2;
@@ -72,7 +72,7 @@ void ObjectOnSpinyBeetle_Action1(ObjectOnSpinyBeetleEntity* this) {
sub_080989C0(this);
return;
}
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
switch (super->contactFlags & 0x3f) {
case 0x13:
super->action = 3;
@@ -138,7 +138,7 @@ void ObjectOnSpinyBeetle_Action2Subaction0(ObjectOnSpinyBeetleEntity* this) {
super->flags |= ENT_COLLIDE;
super->collisionFlags = 7;
super->hitType = 1;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
super->spriteOffsetY = 0;
(super->parent)->child = NULL;
super->subAction++;
diff --git a/src/object/playerClone.c b/src/object/playerClone.c
index c6e65188..f6767e07 100644
--- a/src/object/playerClone.c
+++ b/src/object/playerClone.c
@@ -163,7 +163,7 @@ void sub_08084B1C(PlayerCloneEntity* this) {
super->spritePriority.b0 = gPlayerEntity.base.spritePriority.b0;
super->spriteOrientation.flipY = gPlayerEntity.base.spriteOrientation.flipY;
super->collisionLayer = gPlayerEntity.base.collisionLayer;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
super->hitType = gPlayerEntity.base.hitType;
super->collisionFlags = gPlayerEntity.base.collisionFlags;
super->hurtType = gPlayerEntity.base.hurtType;
diff --git a/src/object/pot.c b/src/object/pot.c
index 3901820e..444c14bb 100644
--- a/src/object/pot.c
+++ b/src/object/pot.c
@@ -72,7 +72,7 @@ void Pot_Init(PotEntity* this) {
super->health = 1;
super->collisionFlags = 7;
super->hitType = 0x6E;
- super->flags2 = 0x84;
+ super->collisionMask = 0x84;
super->gustJarFlags = 0x12;
if (super->collisionLayer == 0) {
ResolveCollisionLayer(super);
@@ -156,7 +156,7 @@ void sub_08082510(PotEntity* this) {
super->hitbox = (Hitbox*)&gUnk_080FD340;
super->collisionFlags = 7;
super->hitType = 1;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
super->spriteOffsetY = 0;
SetBottomTile((u16)this->unk_70, COORD_TO_TILE(super), super->collisionLayer);
super->subAction++;
diff --git a/src/object/pullableMushroom.c b/src/object/pullableMushroom.c
index b8f6eabc..de90f11d 100644
--- a/src/object/pullableMushroom.c
+++ b/src/object/pullableMushroom.c
@@ -63,7 +63,7 @@ void PullableMushroom_Init(PullableMushroomEntity* this) {
super->health = 1;
super->collisionFlags = 7;
super->hitType = 0x6e;
- super->flags2 = 0x0e;
+ super->collisionMask = 0x0e;
super->gustJarFlags = 1;
super->flags |= 0x80;
super->spriteOffsetY = 4;
@@ -76,7 +76,7 @@ void PullableMushroom_Init(PullableMushroomEntity* this) {
super->health = 1;
super->collisionFlags = 7;
super->hitType = 0x6e;
- super->flags2 = 4;
+ super->collisionMask = 4;
super->gustJarFlags = 1;
super->action = 3;
}
diff --git a/src/object/sanctuaryStoneTablet.c b/src/object/sanctuaryStoneTablet.c
index b612f487..9d943927 100644
--- a/src/object/sanctuaryStoneTablet.c
+++ b/src/object/sanctuaryStoneTablet.c
@@ -37,14 +37,14 @@ void SanctuaryStoneTablet_Init(SanctuaryStoneTabletEntity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 1;
- super->flags2 = 2;
+ super->collisionMask = 2;
super->hitbox = (Hitbox*)&gHitbox_0;
}
void SanctuaryStoneTablet_Action1(SanctuaryStoneTabletEntity* this) {
Entity* fxEnt;
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x21)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x21)) {
fxEnt = CreateFx(super, FX_MAGIC_STORM, 0);
if (fxEnt != NULL) {
fxEnt->spritePriority.b0 = 3;
diff --git a/src/object/smallIceBlock.c b/src/object/smallIceBlock.c
index e7931190..f6e6e7b3 100644
--- a/src/object/smallIceBlock.c
+++ b/src/object/smallIceBlock.c
@@ -60,7 +60,7 @@ void SmallIceBlock_Init(SmallIceBlockEntity* this) {
super->collisionFlags = 7;
super->hurtType = 0x48;
super->hitType = 1;
- super->flags2 = 0x80;
+ super->collisionMask = 0x80;
super->hitbox = (Hitbox*)&gUnk_080FD408;
sub_08099468(this);
InitializeAnimation(super, super->type);
@@ -281,7 +281,7 @@ bool32 sub_0809963C(SmallIceBlockEntity* this) {
}
}
}
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x7)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x7)) {
return TRUE;
}
return FALSE;
diff --git a/src/object/smokeParticle.c b/src/object/smokeParticle.c
index 4c24717a..b6b2305d 100644
--- a/src/object/smokeParticle.c
+++ b/src/object/smokeParticle.c
@@ -36,7 +36,7 @@ void SmokeParticle_Init(Entity* this) {
this->hitType = 0xa9;
this->hurtType = 0x16;
this->hitbox = (Hitbox*)gUnk_08120A54[0];
- this->flags2 = 0x8b;
+ this->collisionMask = 0x8b;
sub_080878CC(this);
InitializeAnimation(this, 1);
sub_0801766C(this);
diff --git a/src/object/treeThorns.c b/src/object/treeThorns.c
index 66f26cc6..1af83621 100644
--- a/src/object/treeThorns.c
+++ b/src/object/treeThorns.c
@@ -26,7 +26,7 @@ void TreeThorns(Entity* this) {
this->collisionFlags = 7;
this->hurtType = 0x48;
this->hitType = 0x7a;
- this->flags2 = 1;
+ this->collisionMask = 1;
this->hitbox = (Hitbox*)&gHitbox_1;
tilePos = COORD_TO_TILE(this);
SetBottomTile(0x4066, tilePos - 1, *layer);
diff --git a/src/object/unusedSkull.c b/src/object/unusedSkull.c
index d594d5c1..038472d2 100644
--- a/src/object/unusedSkull.c
+++ b/src/object/unusedSkull.c
@@ -36,7 +36,7 @@ void UnusedSkull_Init(UnusedSkullEntity* this) {
super->collisionFlags = 7;
super->hitType = 1;
super->hurtType = 0x47;
- super->flags2 = 2;
+ super->collisionMask = 2;
super->hitbox = (Hitbox*)&gHitbox_4;
SetBottomTile(0x4050, COORD_TO_TILE(super), super->collisionLayer);
if (super->type == 1 || CheckFlags(this->unk_86)) {
@@ -49,7 +49,7 @@ void UnusedSkull_Init(UnusedSkullEntity* this) {
}
void UnusedSkull_Action1(UnusedSkullEntity* this) {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1c)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x1c)) {
super->action = 2;
super->flags &= ~0x80;
CreateFx(super, FX_ICE, 0);
diff --git a/src/object/whirlwind.c b/src/object/whirlwind.c
index 979a62a3..add24319 100644
--- a/src/object/whirlwind.c
+++ b/src/object/whirlwind.c
@@ -33,7 +33,7 @@ void Whirlwind_Init(Entity* this) {
this->hitType = 1;
this->collisionFlags = 0x47;
this->hurtType = 0x44;
- this->flags2 = 0x80;
+ this->collisionMask = 0x80;
this->spriteOrientation.flipY = 1;
this->spriteRendering.b3 = 1;
this->animationState = this->type;
@@ -58,7 +58,7 @@ void Whirlwind_Action1(Entity* this) {
}
if (this->spriteSettings.draw != 0) {
GetNextFrame(this);
- if ((((((gPlayerState.flags & PL_MINISH) == 0)) && (gPlayerState.field_0x3c == 0)) &&
+ if ((((((gPlayerState.flags & PL_MINISH) == 0)) && (gPlayerState.killed == 0)) &&
((gPlayerEntity.base.action == PLAYER_JUMP || ((gPlayerEntity.base.flags & ENT_COLLIDE) != 0)))) &&
((gPlayerEntity.base.action != PLAYER_BOUNCE &&
(sub_0800419C(this, &gPlayerEntity.base, 0xc, 0xc) != 0)))) {
diff --git a/src/physics.c b/src/physics.c
index 04eae6c1..421c2474 100644
--- a/src/physics.c
+++ b/src/physics.c
@@ -114,7 +114,7 @@ void sub_0806F4E8(Entity* ent) {
}
bool32 sub_0806F520(Entity* ent) {
- if (ent->contactFlags == (CONTACT_TAKE_DAMAGE | 0x13))
+ if (ent->contactFlags == (CONTACT_NOW | 0x13))
return 1;
ent->gustJarState &= ~4;
ent->spriteOffsetY = 0;
diff --git a/src/player.c b/src/player.c
index 064b47ec..ffb4ca6c 100644
--- a/src/player.c
+++ b/src/player.c
@@ -349,7 +349,7 @@ static void PlayerInit(PlayerEntity* this) {
super->spritePriority.b1 = 1;
super->spriteSettings.shadow = 1;
super->carryFlags = 0x20;
- super->flags2 = 8;
+ super->collisionMask = 8;
super->hitType = 0x79;
super->hitbox = (Hitbox*)&gPlayerHitbox;
super->spriteIndex = 1;
@@ -1561,7 +1561,7 @@ static void sub_08071D04(PlayerEntity* this) {
if (deltaHealth != 0) {
ModHealth(deltaHealth);
super->subAction = 3;
- gPlayerState.field_0x3c = 0;
+ gPlayerState.killed = 0;
super->direction = DIR_NONE;
super->speed = 0;
super->zVelocity = Q_16_16(1.5);
@@ -2068,7 +2068,7 @@ static void PlayerRollInit(PlayerEntity* this) {
static void PlayerRollUpdate(PlayerEntity* this) {
if (((gPlayerState.flags & (PL_ROLLING | PL_MOLDWORM_CAPTURED)) != PL_ROLLING) ||
(!(gPlayerState.flags & PL_MOLDWORM_RELEASED) && (super->iframes != 0) &&
- (super->contactFlags & CONTACT_TAKE_DAMAGE))) {
+ (super->contactFlags & CONTACT_NOW))) {
gPlayerState.flags &= ~PL_ROLLING;
if (CheckQueuedAction())
return;
@@ -2753,7 +2753,7 @@ static void sub_08073504(PlayerEntity* this) {
static void sub_08073584(PlayerEntity* this) {
u32 state, dir, idx;
- if ((gPlayerState.playerInput.newInput & INPUT_ACTION) || super->iframes > 0 || gPlayerState.field_0x3c ||
+ if ((gPlayerState.playerInput.newInput & INPUT_ACTION) || super->iframes > 0 || gPlayerState.killed ||
(gPlayerState.flags & PL_PARACHUTE) == 0) {
gPlayerState.jump_status |= 0x40;
PlayerSetNormalAndCollide();
diff --git a/src/playerItem.c b/src/playerItem.c
index 46fbd023..266d12d0 100644
--- a/src/playerItem.c
+++ b/src/playerItem.c
@@ -74,7 +74,7 @@ void ItemUpdate(Entity* this) {
if (!EntityDisabled(this)) {
gPlayerItemFunctions[this->id](this);
- this->contactFlags &= ~CONTACT_TAKE_DAMAGE;
+ this->contactFlags &= ~CONTACT_NOW;
if (this->iframes != 0) {
if (this->iframes > 0)
this->iframes--;
diff --git a/src/playerItem/playerItemBoomerang.c b/src/playerItem/playerItemBoomerang.c
index 46bc2ca4..bcc151a8 100644
--- a/src/playerItem/playerItemBoomerang.c
+++ b/src/playerItem/playerItemBoomerang.c
@@ -128,7 +128,7 @@ void PlayerItemBoomerang_Action1(PlayerItemBoomerangEntity* this) {
super->spriteVramOffset = 0xd5;
COLLISION_ON(super);
super->collisionFlags |= 1;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
super->spriteIndex = 0xa6;
super->spriteSettings.flipX = 0;
super->spriteSettings.draw = 1;
@@ -184,7 +184,7 @@ void PlayerItemBoomerang_Action2(PlayerItemBoomerangEntity* this) {
if (super->timer == 0) {
uVar6 = TRUE;
}
- if (super->contactFlags & CONTACT_TAKE_DAMAGE) {
+ if (super->contactFlags & CONTACT_NOW) {
uVar6 = TRUE;
}
if (!uVar6) {
diff --git a/src/playerItem/playerItemBottle.c b/src/playerItem/playerItemBottle.c
index 962f8d7a..c8cb3ad7 100644
--- a/src/playerItem/playerItemBottle.c
+++ b/src/playerItem/playerItemBottle.c
@@ -48,7 +48,7 @@ void PlayerItemBottle_Init(PlayerItemBottleEntity* this) {
}
COLLISION_ON(super);
super->collisionFlags = (gPlayerEntity.base.collisionFlags + 1) | 0x20;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
super->hurtType = 0x1f;
super->type = 1;
super->type2 = ITEM_BOTTLE_EMPTY;
diff --git a/src/playerItem/playerItemBow.c b/src/playerItem/playerItemBow.c
index 4495475b..0c3932a8 100644
--- a/src/playerItem/playerItemBow.c
+++ b/src/playerItem/playerItemBow.c
@@ -87,7 +87,7 @@ void PlayerItemBow_Init(PlayerItemBowEntity* this) {
}
super->direction = super->animationState << 2;
super->collisionFlags = gPlayerEntity.base.collisionFlags + 1;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
if (super->collisionLayer == 2) {
super->type2 = 1;
} else {
diff --git a/src/playerItem/playerItemDashSword.c b/src/playerItem/playerItemDashSword.c
index 126d17bb..0256561c 100644
--- a/src/playerItem/playerItemDashSword.c
+++ b/src/playerItem/playerItemDashSword.c
@@ -29,7 +29,7 @@ void PlayerItemDashSword_Init(Entity* this) {
gPlayerState.item = this;
this->flags |= ENT_PERSIST;
this->action = 1;
- this->flags2 = 8;
+ this->collisionMask = 8;
LoadSwapGFX(this, 1, 3);
sub_08079BD8(this);
sub_0801766C(this);
diff --git a/src/playerItem/playerItemGust.c b/src/playerItem/playerItemGust.c
index d77d1747..94fd1bdb 100644
--- a/src/playerItem/playerItemGust.c
+++ b/src/playerItem/playerItemGust.c
@@ -70,7 +70,7 @@ void PlayerItemGust(Entity* this) {
static void PlayerItemGust_Init(PlayerItemGustEntity* this) {
super->action = GUST_UPDATE;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
super->direction = super->animationState << 2;
super->speed = 0x200;
super->flags |= ENT_COLLIDE | ENT_PERSIST;
diff --git a/src/playerItem/playerItemGustBig.c b/src/playerItem/playerItemGustBig.c
index a2e18c99..228ca1a3 100644
--- a/src/playerItem/playerItemGustBig.c
+++ b/src/playerItem/playerItemGustBig.c
@@ -73,7 +73,7 @@ void PlayerItemGustBig_Init(PlayerItemGustBigEntity* this) {
super->speed = 0x400;
super->hitType = 0x96;
super->collisionFlags = (gPlayerEntity.base.collisionFlags + 1) | 0x80;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
pEVar3 = super->child;
if (pEVar3 != NULL) {
super->action = 1;
@@ -141,7 +141,7 @@ void PlayerItemGustBig_Action2(PlayerItemGustBigEntity* this) {
if ((super->child->gustJarState & 4) == 0) {
DeleteThisEntity();
}
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
PlayerItemGustBig_Action3(this);
return;
}
diff --git a/src/playerItem/playerItemHeldObject.c b/src/playerItem/playerItemHeldObject.c
index 669c77ca..520d8359 100644
--- a/src/playerItem/playerItemHeldObject.c
+++ b/src/playerItem/playerItemHeldObject.c
@@ -112,7 +112,7 @@ void PlayerItemHeldObject_SubAction2(PlayerItemHeldObjectEntity* this) {
if ((child->base).action != 2) {
DeleteThisEntity();
}
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
super->z.WORD = 0;
}
if (super->speed != 0) {
diff --git a/src/playerItem/playerItemLantern.c b/src/playerItem/playerItemLantern.c
index 04664464..7c16acbc 100644
--- a/src/playerItem/playerItemLantern.c
+++ b/src/playerItem/playerItemLantern.c
@@ -29,7 +29,7 @@ void PlayerItemLantern_Init(Entity* this) {
this->frameIndex = -1;
this->updatePriority = 6;
this->collisionFlags = 7;
- this->flags2 = -0x80;
+ this->collisionMask = -0x80;
this->animationState = gPlayerEntity.base.animationState & 0xe;
if (AllocMutableHitbox(this) == NULL) {
DeleteThisEntity();
diff --git a/src/playerItem/playerItemPacciCaneProjectile.c b/src/playerItem/playerItemPacciCaneProjectile.c
index 4c4bc005..cb6cdfb5 100644
--- a/src/playerItem/playerItemPacciCaneProjectile.c
+++ b/src/playerItem/playerItemPacciCaneProjectile.c
@@ -74,7 +74,7 @@ void PlayerItemPacciCaneProjectile_Init(PlayerItemPacciCaneProjectileEntity* thi
super->x.HALF.HI = gPlayerEntity.base.x.HALF.HI + gUnk_0811B9A0[super->animationState];
super->y.HALF.HI = gPlayerEntity.base.y.HALF.HI + gUnk_0811B9A0[super->animationState + 1];
super->collisionFlags = 7;
- super->flags2 = 0x8a;
+ super->collisionMask = 0x8a;
super->hitbox = (Hitbox*)&gUnk_0811B9D0;
if (super->collisionLayer == 2) {
super->type = 1;
diff --git a/src/playerItem/playerItemShield.c b/src/playerItem/playerItemShield.c
index 35bd8586..7df31ebd 100644
--- a/src/playerItem/playerItemShield.c
+++ b/src/playerItem/playerItemShield.c
@@ -102,7 +102,7 @@ void PlayerItemShield_Action1(PlayerItemShieldEntity* this) {
gPlayerState.shield_status &= ~0x80;
sub_080176E4(super);
} else {
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
if ((((super->contactFlags & 0x7f) == 0x42) && this->unk_68 == 0xe) &&
((gPlayerState.shield_status & 0x40) == 0)) {
playerItem = CreatePlayerItem(PLAYER_ITEM_FIRE_ROD_PROJECTILE, 0, 0, this->unk_68);
diff --git a/src/playerItem/playerItemSword.c b/src/playerItem/playerItemSword.c
index bed81f9f..13d96c42 100644
--- a/src/playerItem/playerItemSword.c
+++ b/src/playerItem/playerItemSword.c
@@ -59,7 +59,7 @@ void PlayerItemSword_Init(PlayerItemSwordEntity* this) {
}
LoadSwapGFX(super, 1, 3);
super->collisionFlags = (gPlayerEntity.base.collisionFlags + 1) | 0x20;
- super->flags2 = gPlayerEntity.base.flags2;
+ super->collisionMask = gPlayerEntity.base.collisionMask;
super->updatePriority = 6;
super->contactFlags = 0;
super->iframes = 0;
@@ -285,7 +285,7 @@ void sub_080A78B8(PlayerItemSwordEntity* this, Entity* param_2) {
}
super->spriteSettings.flipX = flipX;
}
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
if ((param_2->iframes == 0) || ((u8)param_2->iframes == 0x81)) {
param_2->iframes = super->iframes;
param_2->knockbackDirection = super->knockbackDirection;
diff --git a/src/playerUtils.c b/src/playerUtils.c
index 8ff5a7f9..85656344 100644
--- a/src/playerUtils.c
+++ b/src/playerUtils.c
@@ -1564,7 +1564,7 @@ void ClearPlayerState(void) {
gPlayerState.field_0x39 = 0;
gPlayerState.field_0x3a = 0;
gPlayerState.spriteOffsetY = 0;
- gPlayerState.field_0x3c = 0;
+ gPlayerState.killed = 0;
MemFill32(0xffffffff, gPlayerState.path_memory, 0x40);
MemClear(&gPossibleInteraction, sizeof(gPossibleInteraction));
}
@@ -2029,9 +2029,9 @@ bool32 sub_08079550(void) {
void sub_08079708(Entity* this) {
gPlayerState.framestate = PL_STATE_DIE;
- gPlayerState.field_0x3c = 0xff;
+ gPlayerState.killed = 0xff;
this->flags &= ~ENT_COLLIDE;
- this->action = 0xa;
+ this->action = PLAYER_MINISHDIE;
this->subAction = 0;
sub_080085B0(this);
if (!(gPlayerState.flags & (PL_CAPTURED | PL_DISABLE_ITEMS))) {
@@ -2450,7 +2450,7 @@ bool32 PlayerCanBeMoved(void) {
if ((gPlayerState.flags & (PL_BUSY | PL_DROWNING | PL_CAPTURED | PL_USE_PORTAL | PL_HIDDEN | PL_FROZEN |
PL_FALLING | PL_DISABLE_ITEMS | PL_PIT_IS_EXIT | PL_IN_MINECART | PL_MOLDWORM_CAPTURED |
PL_IN_HOLE | PL_CONVEYOR_PUSHED | PL_CLIMBING)) != 0 ||
- gPlayerState.field_0x3c != 0 || gPlayerEntity.base.action == PLAYER_FALL ||
+ gPlayerState.killed != 0 || gPlayerEntity.base.action == PLAYER_FALL ||
gPlayerEntity.base.action == PLAYER_08071DB8) {
return FALSE;
} else {
diff --git a/src/projectile/arrowProjectile.c b/src/projectile/arrowProjectile.c
index 7acc8003..c47f0414 100644
--- a/src/projectile/arrowProjectile.c
+++ b/src/projectile/arrowProjectile.c
@@ -34,7 +34,7 @@ void ArrowProjectile_OnTick(Entity* this) {
}
void ArrowProjectile_OnCollision(Entity* this) {
- if ((this->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((this->contactFlags & CONTACT_NOW) != 0) {
if ((this->contactFlags & 0x3f) != 0) {
ModHealth(-2);
sub_080A9488(this);
diff --git a/src/projectile/boneProjectile.c b/src/projectile/boneProjectile.c
index d1052df8..336920a2 100644
--- a/src/projectile/boneProjectile.c
+++ b/src/projectile/boneProjectile.c
@@ -23,7 +23,7 @@ void BoneProjectile_OnTick(Entity* this) {
}
void BoneProjectile_OnCollision(Entity* this) {
- if (this->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags == CONTACT_NOW) {
DeleteEntity(this);
} else {
sub_080A82D8(this);
diff --git a/src/projectile/darkNutSwordSlash.c b/src/projectile/darkNutSwordSlash.c
index 838435e5..1b09cf4b 100644
--- a/src/projectile/darkNutSwordSlash.c
+++ b/src/projectile/darkNutSwordSlash.c
@@ -30,7 +30,7 @@ void DarkNutSwordSlash(Entity* this) {
if ((this->parent == NULL) || (this->parent->health == 0)) {
DeleteThisEntity();
}
- if (((this->contactFlags & CONTACT_TAKE_DAMAGE) != 0) && (this->contactedEntity == &gPlayerEntity.base)) {
+ if (((this->contactFlags & CONTACT_NOW) != 0) && (this->contactedEntity == &gPlayerEntity.base)) {
this->iframes = -0x2d;
}
this->contactFlags = 0;
diff --git a/src/projectile/dekuSeedProjectile.c b/src/projectile/dekuSeedProjectile.c
index c086f251..f3b2f5e7 100644
--- a/src/projectile/dekuSeedProjectile.c
+++ b/src/projectile/dekuSeedProjectile.c
@@ -24,7 +24,7 @@ void DekuSeedProjectile_OnTick(Entity* this) {
}
void DekuSeedProjectile_OnCollision(Entity* this) {
- if (this->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags == CONTACT_NOW) {
if (this->hitType == 0x68) {
EnqueueSFX(SFX_86);
}
@@ -75,7 +75,7 @@ void DekuSeedProjectile_Action1(Entity* this) {
if ((parent->next != NULL) && (IsColliding(this, parent) != 0)) {
this->iframes = 0x10;
this->knockbackDirection = -this->direction;
- this->contactFlags = CONTACT_TAKE_DAMAGE;
+ this->contactFlags = CONTACT_NOW;
this->knockbackDuration = 0xc;
this->knockbackSpeed = 0;
parent->iframes = 0x10;
diff --git a/src/projectile/dirtBallProjectile.c b/src/projectile/dirtBallProjectile.c
index 2ef3867e..a03009de 100644
--- a/src/projectile/dirtBallProjectile.c
+++ b/src/projectile/dirtBallProjectile.c
@@ -41,7 +41,7 @@ void DirtBallProjectile_OnCollision(Entity* this) {
this->knockbackSpeed = 0;
if (this->type == 0) {
this->parent->child = NULL;
- if (this->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags == CONTACT_NOW) {
gPlayerState.hurtBlinkSpeed = 0xf0;
ModHealth(-2);
}
diff --git a/src/projectile/gleerokProjectile.c b/src/projectile/gleerokProjectile.c
index d40d2a92..2b01180f 100644
--- a/src/projectile/gleerokProjectile.c
+++ b/src/projectile/gleerokProjectile.c
@@ -28,8 +28,7 @@ void GleerokProjectile(GleerokProjectileEntity* this) {
}
void GleerokProjectile_OnTick(GleerokProjectileEntity* this) {
- if (((super->type != 3) && ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0)) &&
- ((super->contactFlags & 0x7f) != 0x1e)) {
+ if (((super->type != 3) && ((super->contactFlags & CONTACT_NOW) != 0)) && ((super->contactFlags & 0x7f) != 0x1e)) {
super->action = 3;
COLLISION_OFF(super);
InitializeAnimation(super, 0x53);
diff --git a/src/projectile/guardLineOfSight.c b/src/projectile/guardLineOfSight.c
index dfb59237..d117507c 100644
--- a/src/projectile/guardLineOfSight.c
+++ b/src/projectile/guardLineOfSight.c
@@ -26,7 +26,7 @@ void GuardLineOfSight(Entity* this) {
this->timer = Random();
this->spriteSettings.draw = 0;
}
- if (this->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags == CONTACT_NOW) {
if (this->parent != NULL) {
this->parent->type = 0xff;
}
@@ -58,7 +58,7 @@ void GuardLineOfSight(Entity* this) {
this->hitbox = (Hitbox*)&gUnk_080FD1E4;
InitializeAnimation(this, 0);
}
- if (this->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags == CONTACT_NOW) {
if (this->parent != NULL) {
this->parent->type = 0xff;
}
diff --git a/src/projectile/keatonDagger.c b/src/projectile/keatonDagger.c
index 6a4b66c3..cf1fa109 100644
--- a/src/projectile/keatonDagger.c
+++ b/src/projectile/keatonDagger.c
@@ -20,7 +20,7 @@ void KeatonDagger(Entity* this) {
}
parent = this->parent;
if (((parent == NULL) || (parent->health == 0)) || (parent->next == NULL)) {
- if (((this->contactFlags & CONTACT_TAKE_DAMAGE) != 0) && (this->contactedEntity == &gPlayerEntity.base)) {
+ if (((this->contactFlags & CONTACT_NOW) != 0) && (this->contactedEntity == &gPlayerEntity.base)) {
sub_0803C0AC(this);
}
DeleteEntity(this);
diff --git a/src/projectile/lakituLightning.c b/src/projectile/lakituLightning.c
index 47d300a7..279ef9e9 100644
--- a/src/projectile/lakituLightning.c
+++ b/src/projectile/lakituLightning.c
@@ -23,7 +23,7 @@ void LakituLightning_OnTick(Entity* this) {
}
void LakituLightning_OnCollision(Entity* this) {
- if ((this->health == 0) || (this->contactFlags == CONTACT_TAKE_DAMAGE)) {
+ if ((this->health == 0) || (this->contactFlags == CONTACT_NOW)) {
DeleteThisEntity();
}
LakituLightning_OnTick(this);
diff --git a/src/projectile/mandiblesProjectile.c b/src/projectile/mandiblesProjectile.c
index 64142a9c..2b6f67a3 100644
--- a/src/projectile/mandiblesProjectile.c
+++ b/src/projectile/mandiblesProjectile.c
@@ -55,7 +55,7 @@ void MandiblesProjectile_OnTick(MandiblesProjectileEntity* this) {
void MandiblesProjectile_OnCollision(MandiblesProjectileEntity* this) {
Entity* parent;
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
switch (super->action) {
case 4:
super->subtimer = 0;
diff --git a/src/projectile/moblinSpear.c b/src/projectile/moblinSpear.c
index 076477b0..2e58a091 100644
--- a/src/projectile/moblinSpear.c
+++ b/src/projectile/moblinSpear.c
@@ -38,7 +38,7 @@ void MoblinSpear_OnTick(Entity* this) {
void MoblinSpear_OnCollision(Entity* this) {
u8 tmp;
- if (this->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags == CONTACT_NOW) {
this->iframes = 0x10;
this->knockbackDuration = 0xc;
this->knockbackSpeed = 0x180;
diff --git a/src/projectile/octorokBossProjectile.c b/src/projectile/octorokBossProjectile.c
index 43982f37..8ca0d67d 100644
--- a/src/projectile/octorokBossProjectile.c
+++ b/src/projectile/octorokBossProjectile.c
@@ -99,7 +99,7 @@ void OctorokBossProjectile_Action1(OctorokBossProjectileEntity* this) {
if (super->parent->action == 2) {
DeleteThisEntity();
}
- if ((super->type2 == 0) && ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0)) {
+ if ((super->type2 == 0) && ((super->contactFlags & CONTACT_NOW) != 0)) {
if ((super->contactFlags & 0x7f) == 0) {
OctorokBossProjectile_Action2(this);
}
@@ -182,7 +182,7 @@ void OctorokBossProjectile_Action1(OctorokBossProjectileEntity* this) {
if (--*(u32*)&this->unk_78 == -1) {
OctorokBossProjectile_Action2(this);
}
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) == 0) {
+ if ((super->contactFlags & CONTACT_NOW) == 0) {
return;
}
OctorokBossProjectile_Action2(this);
diff --git a/src/projectile/projectile5.c b/src/projectile/projectile5.c
index 379dd97d..4fa9a3d8 100644
--- a/src/projectile/projectile5.c
+++ b/src/projectile/projectile5.c
@@ -41,7 +41,7 @@ void Projectile5_OnCollision(Entity* this) {
if ((((Projectile5Entity*)this->parent)->unk_83 & 0x3f) == 3) {
if (gPlayerState.hurtBlinkSpeed != 0) {
if (sub_080B1B44(TILE(this->x.HALF.HI, this->y.HALF.HI), gPlayerEntity.base.collisionLayer) == 0) {
- if (this->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags == CONTACT_NOW) {
*pbVar2 = *pbVar2 & 0x7f;
DeleteThisEntity();
}
diff --git a/src/projectile/removableDust.c b/src/projectile/removableDust.c
index e89cd3b4..49da5582 100644
--- a/src/projectile/removableDust.c
+++ b/src/projectile/removableDust.c
@@ -51,7 +51,7 @@ void RemovableDust_OnTick(RemovableDustEntity* this) {
}
void RemovableDust_OnCollision(RemovableDustEntity* this) {
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x16)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x16)) {
RemovableDust_OnGrabbed(this);
}
}
diff --git a/src/projectile/rockProjectile.c b/src/projectile/rockProjectile.c
index 7dc35d0c..a2e75f11 100644
--- a/src/projectile/rockProjectile.c
+++ b/src/projectile/rockProjectile.c
@@ -22,7 +22,7 @@ void RockProjectile_OnTick(Entity* this) {
}
void RockProjectile_OnCollision(Entity* this) {
- if (this->contactFlags == CONTACT_TAKE_DAMAGE) {
+ if (this->contactFlags == CONTACT_NOW) {
DeleteEntity(this);
} else {
this->direction = this->knockbackDirection;
diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c
index c1cb7adc..b749caf4 100644
--- a/src/projectile/spiderWeb.c
+++ b/src/projectile/spiderWeb.c
@@ -64,7 +64,7 @@ void SpiderWeb_OnCollision(SpiderWebEntity* this) {
};
Entity* object;
- if (super->contactFlags == (CONTACT_TAKE_DAMAGE | 0x7)) {
+ if (super->contactFlags == (CONTACT_NOW | 0x7)) {
super->action = 3;
super->timer = 90;
COLLISION_OFF(super);
diff --git a/src/projectile/stalfosProjectile.c b/src/projectile/stalfosProjectile.c
index 660b8f5c..bbe7b728 100644
--- a/src/projectile/stalfosProjectile.c
+++ b/src/projectile/stalfosProjectile.c
@@ -35,7 +35,7 @@ void StalfosProjectile_OnTick(Entity* this) {
}
void StalfosProjectile_OnCollision(Entity* this) {
- if (this->contactFlags == (CONTACT_TAKE_DAMAGE | 0x1d)) {
+ if (this->contactFlags == (CONTACT_NOW | 0x1d)) {
this->action = 3;
COLLISION_OFF(this);
this->zVelocity = Q_16_16(2.625);
diff --git a/src/projectile/v1DarkMagicProjectile.c b/src/projectile/v1DarkMagicProjectile.c
index eb5f73cc..dd3d1d0b 100644
--- a/src/projectile/v1DarkMagicProjectile.c
+++ b/src/projectile/v1DarkMagicProjectile.c
@@ -43,7 +43,7 @@ void V1DarkMagicProjectile_OnTick(V1DarkMagicProjectileEntity* this) {
}
void V1DarkMagicProjectile_OnCollision(V1DarkMagicProjectileEntity* this) {
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
if (super->type2 == 0) {
if ((super->contactFlags & 0x3f) == 0) {
super->action = 2;
diff --git a/src/projectile/v1FireProjectile.c b/src/projectile/v1FireProjectile.c
index 661547ba..9fa0260f 100644
--- a/src/projectile/v1FireProjectile.c
+++ b/src/projectile/v1FireProjectile.c
@@ -31,7 +31,7 @@ void V1FireProjectile_OnTick(V1FireProjectileEntity* this) {
}
void V1FireProjectile_OnCollision(V1FireProjectileEntity* this) {
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) != 0) {
+ if ((super->contactFlags & CONTACT_NOW) != 0) {
super->action = 3;
COLLISION_OFF(super);
InitializeAnimation(super, 0x53);
diff --git a/src/projectile/v2Projectile.c b/src/projectile/v2Projectile.c
index 8f7531c4..68759c91 100644
--- a/src/projectile/v2Projectile.c
+++ b/src/projectile/v2Projectile.c
@@ -43,7 +43,7 @@ void V2Projectile_OnTick(V2ProjectileEntity* this) {
}
void V2Projectile_OnCollision(V2ProjectileEntity* this) {
- if ((super->contactFlags & CONTACT_TAKE_DAMAGE) == 0)
+ if ((super->contactFlags & CONTACT_NOW) == 0)
return;
switch (super->type) {
diff --git a/src/projectileUtils.c b/src/projectileUtils.c
index 56dc2a66..e11be579 100644
--- a/src/projectileUtils.c
+++ b/src/projectileUtils.c
@@ -35,7 +35,7 @@ bool32 ProjectileInit(Entity* this) {
this->speed = definition->speed;
}
this->collisionFlags = (definition->field0x3c << 4) | 7;
- this->flags2 = definition->flags2;
+ this->collisionMask = definition->collisionMask;
this->hitType = definition->damageType;
this->hurtType = definition->field0x40;
this->health = 0xff;