Colliders Sync ColliderElement (#1698)

This commit is contained in:
Derek Hensley 2024-09-27 22:00:54 -07:00 committed by GitHub
parent 495b9adeea
commit b4d6c3921f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
68 changed files with 354 additions and 353 deletions

View File

@ -177,7 +177,7 @@ void Actor_Noop(Actor* actor, PlayState* play);
Actor* Actor_FindNearby(PlayState* play, Actor* inActor, s16 actorId, u8 actorCategory, f32 distance);
s32 func_800BE184(PlayState* play, Actor* actor, f32 xzDist, s16 arg3, s16 arg4, s16 arg5);
u8 Actor_ApplyDamage(Actor* actor);
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo);
void Actor_SetDropFlag(Actor* actor, ColliderElement* elem);
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSphere);
void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* dst, s32 arg3);
void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2);

View File

@ -71,7 +71,7 @@ typedef struct {
/* 0x5 */ u8 defense; // Damage Resistance
} ColliderBumpInit; // size = 0x8
typedef struct ColliderInfo {
typedef struct ColliderElement {
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
@ -80,9 +80,9 @@ typedef struct ColliderInfo {
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
} ColliderInfo; // size = 0x28
/* 0x20 */ struct ColliderElement* atHitElem; // element that hit the AT collider
/* 0x24 */ struct ColliderElement* acHitElem; // element that hit the AC collider
} ColliderElement; // size = 0x28
typedef struct {
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
@ -91,7 +91,7 @@ typedef struct {
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
} ColliderInfoInit; // size = 0x18
} ColliderElementInit; // size = 0x18
typedef struct {
/* 0x00 */ Sphere16 modelSphere; // model space sphere
@ -107,12 +107,12 @@ typedef struct {
} ColliderJntSphElementDimInit; // size = 0xC
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x00 */ ColliderElement info;
/* 0x28 */ ColliderJntSphElementDim dim;
} ColliderJntSphElement; // size = 0x40
typedef struct {
/* 0x00 */ ColliderInfoInit info;
/* 0x00 */ ColliderElementInit info;
/* 0x18 */ ColliderJntSphElementDimInit dim;
} ColliderJntSphElementInit; // size = 0x24
@ -142,25 +142,25 @@ typedef struct {
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x18 */ ColliderElement info;
/* 0x40 */ Cylinder16 dim;
} ColliderCylinder; // size = 0x4C
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x08 */ ColliderElementInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInit; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x08 */ ColliderElementInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitType1; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ ColliderInfoInit info;
/* 0x08 */ ColliderElementInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitToActor; // size = 0x2C
@ -169,12 +169,12 @@ typedef struct {
} ColliderTrisElementDimInit; // size = 0x24
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x00 */ ColliderElement info;
/* 0x28 */ TriNorm dim;
} ColliderTrisElement; // size = 0x5C
typedef struct {
/* 0x00 */ ColliderInfoInit info;
/* 0x00 */ ColliderElementInit info;
/* 0x18 */ ColliderTrisElementDimInit dim;
} ColliderTrisElementInit; // size = 0x3C
@ -209,31 +209,31 @@ typedef struct {
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x18 */ ColliderElement info;
/* 0x40 */ ColliderQuadDim dim;
} ColliderQuad; // size = 0x80
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x08 */ ColliderElementInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInit; // size = 0x50
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x08 */ ColliderElementInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInitType1; // size = 0x50
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x18 */ ColliderElement info;
/* 0x40 */ ColliderJntSphElementDim dim;
} ColliderSphere; // size = 0x58
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x08 */ ColliderElementInit info;
/* 0x20 */ ColliderJntSphElementDimInit dim;
} ColliderSphereInit; // size = 0x2C
@ -465,9 +465,9 @@ typedef struct CollisionCheckInfo {
DamageTable* DamageTable_Get(s32 index);
void DamageTable_Clear(DamageTable* damageTable);
f32 CollisionCheck_GetDamageAndEffectOnBumper(Collider* atCol, ColliderInfo* atInfo, Collider* acCol, ColliderInfo* acInfo, u32* effect);
f32 CollisionCheck_ApplyBumperDefense(f32 damage, ColliderInfo* ac);
s32 CollisionCheck_GetToucherDamage(Collider* atCol, ColliderInfo* atInfo, Collider* acCol, ColliderInfo* acInfo);
f32 CollisionCheck_GetDamageAndEffectOnBumper(Collider* atCol, ColliderElement* atElem, Collider* acCol, ColliderElement* acElem, u32* effect);
f32 CollisionCheck_ApplyBumperDefense(f32 damage, ColliderElement* acElem);
s32 CollisionCheck_GetToucherDamage(Collider* atCol, ColliderElement* atElem, Collider* acCol, ColliderElement* acElem);
s32 Collider_InitBase(struct PlayState* play, Collider* col);
s32 Collider_DestroyBase(struct PlayState* play, Collider* collider);
s32 Collider_SetBaseToActor(struct PlayState* play, Collider* col, ColliderInitToActor* src);
@ -479,16 +479,16 @@ void Collider_ResetOCBase(struct PlayState* play, Collider* col);
s32 Collider_InitTouch(struct PlayState* play, ColliderTouch* touch);
s32 Collider_DestroyTouch(struct PlayState* play, ColliderTouch* touch);
s32 Collider_SetTouch(struct PlayState* play, ColliderTouch* touch, ColliderTouchInit* src);
void Collider_ResetATInfoUnk(struct PlayState* play, ColliderInfo* info);
void Collider_ResetATElementUnk(struct PlayState* play, ColliderElement* elem);
s32 Collider_InitBump(struct PlayState* play, ColliderBump* bump);
s32 Collider_DestroyBump(struct PlayState* play, ColliderBump* bump);
s32 Collider_SetBump(struct PlayState* play, ColliderBump* bump, ColliderBumpInit* src);
s32 Collider_InitInfo(struct PlayState* play, ColliderInfo* info);
s32 Collider_DestroyInfo(struct PlayState* play, ColliderInfo* info);
s32 Collider_SetInfo(struct PlayState* play, ColliderInfo* info, ColliderInfoInit* src);
void Collider_ResetATInfo(struct PlayState* play, ColliderInfo* info);
void Collider_ResetACInfo(struct PlayState* play, ColliderInfo* info);
void Collider_ResetOCInfo(struct PlayState* play, ColliderInfo* info);
s32 Collider_InitElement(struct PlayState* play, ColliderElement* elem);
s32 Collider_DestroyElement(struct PlayState* play, ColliderElement* elem);
s32 Collider_SetElement(struct PlayState* play, ColliderElement* elem, ColliderElementInit* elemInit);
void Collider_ResetATElement(struct PlayState* play, ColliderElement* elem);
void Collider_ResetACElement(struct PlayState* play, ColliderElement* elem);
void Collider_ResetOCElement(struct PlayState* play, ColliderElement* elem);
s32 Collider_InitJntSphElementDim(struct PlayState* play, ColliderJntSphElementDim* dim);
s32 Collider_DestroyJntSphElementDim(struct PlayState* play, ColliderJntSphElementDim* dim);
s32 Collider_SetJntSphElementDim(struct PlayState* play, ColliderJntSphElementDim* dest, ColliderJntSphElementDimInit* src);
@ -576,20 +576,20 @@ s32 CollisionCheck_SetAC_SAC(struct PlayState* play, CollisionCheckContext* colC
s32 CollisionCheck_SetOC(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col);
s32 CollisionCheck_SetOC_SAC(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col, s32 index);
s32 CollisionCheck_SetOCLine(struct PlayState* play, CollisionCheckContext* colChkCtx, OcLine* line);
s32 CollisionCheck_SkipTouch(ColliderInfo* info);
s32 CollisionCheck_SkipBump(ColliderInfo* info);
s32 CollisionCheck_NoSharedFlags(ColliderInfo* toucher, ColliderInfo* bumper);
s32 CollisionCheck_SkipTouch(ColliderElement* elem);
s32 CollisionCheck_SkipBump(ColliderElement* elem);
s32 CollisionCheck_NoSharedFlags(ColliderElement* atElem, ColliderElement* acElem);
void CollisionCheck_NoBlood(struct PlayState* play, Collider* collider, Vec3f* v);
void CollisionCheck_BlueBlood(struct PlayState* play, Collider* collider, Vec3f* v);
void CollisionCheck_GreenBlood(struct PlayState* play, Collider* collider, Vec3f* v);
void CollisionCheck_WaterBurst(struct PlayState* play, Collider* collider, Vec3f* v);
void CollisionCheck_RedBlood(struct PlayState* play, Collider* collider, Vec3f* v);
void CollisionCheck_RedBloodUnused(struct PlayState* play, Collider* collider, Vec3f* v);
void CollisionCheck_HitSolid(struct PlayState* play, ColliderInfo* info, Collider* col, Vec3f* hitPos);
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo);
void CollisionCheck_HitEffects(struct PlayState* play, Collider* at, ColliderInfo* atInfo, Collider* ac, ColliderInfo* acInfo, Vec3f* hitPos);
void CollisionCheck_HitSolid(struct PlayState* play, ColliderElement* elem, Collider* col, Vec3f* hitPos);
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderElement* acElem);
void CollisionCheck_HitEffects(struct PlayState* play, Collider* at, ColliderElement* atElem, Collider* ac, ColliderElement* acElem, Vec3f* hitPos);
void CollisionCheck_SetBounce(Collider* at, Collider* ac);
s32 CollisionCheck_SetATvsAC(struct PlayState* play, Collider* atCol, ColliderInfo* atInfo, Vec3f* atPos, Collider* acCol, ColliderInfo* acInfo, Vec3f* acPos, Vec3f* hitPos);
s32 CollisionCheck_SetATvsAC(struct PlayState* play, Collider* atCol, ColliderElement* atElem, Vec3f* atPos, Collider* acCol, ColliderElement* acElem, Vec3f* acPos, Vec3f* hitPos);
void CollisionCheck_TrisAvgPoint(ColliderTrisElement* tri, Vec3f* avg);
void CollisionCheck_QuadAvgPoint(ColliderQuad* quad, Vec3f* avg);
void CollisionCheck_AC_JntSphVsJntSph(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* atCol, Collider* acCol);
@ -626,7 +626,7 @@ void CollisionCheck_SetHitEffects(struct PlayState* play, CollisionCheckContext*
void CollisionCheck_AC(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* atCol);
void CollisionCheck_AT(struct PlayState* play, CollisionCheckContext* colChkCtx);
s32 CollisionCheck_GetMassType(u8 mass);
void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* leftCol, ColliderInfo* leftInfo, Vec3f* leftPos, Collider* rightCol, ColliderInfo* rightInfo, Vec3f* rightPos, f32 overlapSize);
void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* leftCol, ColliderElement* leftElem, Vec3f* leftPos, Collider* rightCol, ColliderElement* rightElem, Vec3f* rightPos, f32 overlapSize);
void CollisionCheck_OC_JntSphVsJntSph(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* leftCol, Collider* rightCol);
void CollisionCheck_OC_JntSphVsCyl(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* leftCol, Collider* rightCol);
void CollisionCheck_OC_JntSphVsSphere(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* leftCol, Collider* rightCol);
@ -645,7 +645,7 @@ void CollisionCheck_SetInfoNoDamageTable(CollisionCheckInfo* info, CollisionChec
void CollisionCheck_SetInfo(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit* init);
void CollisionCheck_SetInfo2(CollisionCheckInfo* info, DamageTable* damageTable, CollisionCheckInfoInit2* init);
void CollisionCheck_SetInfoGetDamageTable(CollisionCheckInfo* info, s32 index, CollisionCheckInfoInit2* init);
void CollisionCheck_ApplyDamage(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* col, ColliderInfo* info);
void CollisionCheck_ApplyDamage(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* col, ColliderElement* elem);
void CollisionCheck_ApplyDamageJntSph(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col);
void CollisionCheck_ApplyDamageCyl(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col);
void CollisionCheck_ApplyDamageTris(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col);

View File

@ -4707,16 +4707,16 @@ u8 Actor_ApplyDamage(Actor* actor) {
return actor->colChkInfo.health;
}
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo) {
ColliderInfo* acHitInfo = colInfo->acHitInfo;
void Actor_SetDropFlag(Actor* actor, ColliderElement* elem) {
ColliderElement* acHitElem = elem->acHitElem;
if (acHitInfo == NULL) {
if (acHitElem == NULL) {
actor->dropFlag = DROPFLAG_NONE;
} else if (acHitInfo->toucher.dmgFlags & DMG_FIRE_ARROW) {
} else if (acHitElem->toucher.dmgFlags & DMG_FIRE_ARROW) {
actor->dropFlag = DROPFLAG_1;
} else if (acHitInfo->toucher.dmgFlags & DMG_ICE_ARROW) {
} else if (acHitElem->toucher.dmgFlags & DMG_ICE_ARROW) {
actor->dropFlag = DROPFLAG_2;
} else if (acHitInfo->toucher.dmgFlags & DMG_LIGHT_ARROW) {
} else if (acHitElem->toucher.dmgFlags & DMG_LIGHT_ARROW) {
actor->dropFlag = DROPFLAG_20;
} else {
actor->dropFlag = DROPFLAG_NONE;
@ -4726,19 +4726,19 @@ void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo) {
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSphere) {
s32 i;
ColliderJntSphElement* jntElement;
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
s32 flag;
actor->dropFlag = DROPFLAG_NONE;
for (i = jntSphere->count - 1; i >= 0; i--) {
jntElement = &jntSphere->elements[i];
acHitInfo = jntElement->info.acHitInfo;
acHitElem = jntElement->info.acHitElem;
if (acHitInfo == NULL) {
if (acHitElem == NULL) {
flag = DROPFLAG_NONE;
} else {
s32 dmgFlags = acHitInfo->toucher.dmgFlags;
s32 dmgFlags = acHitElem->toucher.dmgFlags;
if (dmgFlags & DMG_FIRE_ARROW) {
flag = DROPFLAG_1;
@ -4791,7 +4791,7 @@ void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2) {
void func_800BE504(Actor* actor, ColliderCylinder* collider) {
// Checks if was hit by either DMG_NORMAL_ARROW, DMG_FIRE_ARROW, DMG_ICE_ARROW, DMG_LIGHT_ARROW or DMG_DEKU_BUBBLE
if ((collider->info.acHitInfo->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20))) {
if ((collider->info.acHitElem->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20))) {
actor->world.rot.y = collider->base.ac->shape.rot.y;
} else {
actor->world.rot.y = Actor_WorldYawTowardActor(collider->base.ac, actor);
@ -4799,7 +4799,7 @@ void func_800BE504(Actor* actor, ColliderCylinder* collider) {
}
void func_800BE568(Actor* actor, ColliderSphere* collider) {
if (collider->info.acHitInfo->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20)) {
if (collider->info.acHitElem->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20)) {
actor->world.rot.y = collider->base.ac->shape.rot.y;
} else {
actor->world.rot.y = Actor_WorldYawTowardActor(collider->base.ac, actor);
@ -4807,7 +4807,7 @@ void func_800BE568(Actor* actor, ColliderSphere* collider) {
}
void func_800BE5CC(Actor* actor, ColliderJntSph* collider, s32 colliderIndex) {
if (collider->elements[colliderIndex].info.acHitInfo->toucher.dmgFlags &
if (collider->elements[colliderIndex].info.acHitElem->toucher.dmgFlags &
(0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20)) {
actor->world.rot.y = collider->base.ac->shape.rot.y;
} else {

View File

@ -109,8 +109,8 @@ TriNorm D_801EE188;
* Gets the damage and effect that should be applied for the collision between
* `at` and `ac`, referring to the ac actor's damage chart if applicable.
*/
f32 CollisionCheck_GetDamageAndEffectOnBumper(Collider* atCol, ColliderInfo* atInfo, Collider* acCol,
ColliderInfo* acInfo, u32* effect) {
f32 CollisionCheck_GetDamageAndEffectOnBumper(Collider* atCol, ColliderElement* atElem, Collider* acCol,
ColliderElement* acElem, u32* effect) {
static f32 sDamageMultipliers[] = {
0.0f, 1.0f, 2.0f, 0.5f, 0.25f, 3.0f, 4.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
};
@ -119,10 +119,10 @@ f32 CollisionCheck_GetDamageAndEffectOnBumper(Collider* atCol, ColliderInfo* atI
f32 damage;
*effect = 0;
damage = CollisionCheck_GetToucherDamage(atCol, atInfo, acCol, acInfo);
damage = CollisionCheck_GetToucherDamage(atCol, atElem, acCol, acElem);
if (acCol->actor->colChkInfo.damageTable != NULL) {
dmgFlags = atInfo->toucher.dmgFlags;
dmgFlags = atElem->toucher.dmgFlags;
for (i = 0; i < ARRAY_COUNT(acCol->actor->colChkInfo.damageTable->attack); i++) {
if (dmgFlags == 1) {
@ -140,8 +140,8 @@ f32 CollisionCheck_GetDamageAndEffectOnBumper(Collider* atCol, ColliderInfo* atI
/**
* Calculates damage after factoring in the ac collider's defense
*/
f32 CollisionCheck_ApplyBumperDefense(f32 damage, ColliderInfo* ac) {
f32 finalDamage = damage - ac->bumper.defense;
f32 CollisionCheck_ApplyBumperDefense(f32 damage, ColliderElement* acElem) {
f32 finalDamage = damage - acElem->bumper.defense;
return finalDamage;
}
@ -150,12 +150,13 @@ f32 CollisionCheck_ApplyBumperDefense(f32 damage, ColliderInfo* ac) {
* Gets the damage to be inflicted by `at` on `ac`, before applying other
* factors such as the ac collider's defense.
*/
s32 CollisionCheck_GetToucherDamage(Collider* atCol, ColliderInfo* atInfo, Collider* acCol, ColliderInfo* acInfo) {
s32 CollisionCheck_GetToucherDamage(Collider* atCol, ColliderElement* atElem, Collider* acCol,
ColliderElement* acElem) {
if ((atCol->actor != NULL) && (atCol->actor->id == ACTOR_EN_BOM) && (acCol->actor != NULL) &&
(acCol->actor->id == ACTOR_PLAYER)) {
return 8;
}
return atInfo->toucher.damage;
return atElem->toucher.damage;
}
s32 Collider_InitBase(struct PlayState* play, Collider* col) {
@ -243,7 +244,7 @@ s32 Collider_SetTouch(struct PlayState* play, ColliderTouch* touch, ColliderTouc
return 1;
}
void Collider_ResetATInfoUnk(struct PlayState* play, ColliderInfo* info) {
void Collider_ResetATElementUnk(struct PlayState* play, ColliderElement* elem) {
}
s32 Collider_InitBump(struct PlayState* play, ColliderBump* bump) {
@ -264,8 +265,8 @@ s32 Collider_SetBump(struct PlayState* play, ColliderBump* bump, ColliderBumpIni
return 1;
}
s32 Collider_InitInfo(struct PlayState* play, ColliderInfo* info) {
static ColliderInfo sDefaultColliderInfo = {
s32 Collider_InitElement(struct PlayState* play, ColliderElement* elem) {
static ColliderElement sDefaultColliderElement = {
{ 0, 0, 0 }, { 0xF7CFFFFF, 0, 0, { 0, 0, 0 } },
ELEMTYPE_UNK0, TOUCH_NONE,
BUMP_NONE, OCELEM_NONE,
@ -273,46 +274,46 @@ s32 Collider_InitInfo(struct PlayState* play, ColliderInfo* info) {
NULL, NULL,
};
*info = sDefaultColliderInfo;
Collider_InitTouch(play, &info->toucher);
Collider_InitBump(play, &info->bumper);
*elem = sDefaultColliderElement;
Collider_InitTouch(play, &elem->toucher);
Collider_InitBump(play, &elem->bumper);
return 1;
}
s32 Collider_DestroyInfo(struct PlayState* play, ColliderInfo* info) {
Collider_DestroyTouch(play, &info->toucher);
Collider_DestroyBump(play, &info->bumper);
s32 Collider_DestroyElement(struct PlayState* play, ColliderElement* elem) {
Collider_DestroyTouch(play, &elem->toucher);
Collider_DestroyBump(play, &elem->bumper);
return 1;
}
s32 Collider_SetInfo(struct PlayState* play, ColliderInfo* info, ColliderInfoInit* src) {
info->elemType = src->elemType;
Collider_SetTouch(play, &info->toucher, &src->toucher);
Collider_SetBump(play, &info->bumper, &src->bumper);
info->toucherFlags = src->toucherFlags;
info->bumperFlags = src->bumperFlags;
info->ocElemFlags = src->ocElemFlags;
s32 Collider_SetElement(struct PlayState* play, ColliderElement* elem, ColliderElementInit* elemInit) {
elem->elemType = elemInit->elemType;
Collider_SetTouch(play, &elem->toucher, &elemInit->toucher);
Collider_SetBump(play, &elem->bumper, &elemInit->bumper);
elem->toucherFlags = elemInit->toucherFlags;
elem->bumperFlags = elemInit->bumperFlags;
elem->ocElemFlags = elemInit->ocElemFlags;
return 1;
}
void Collider_ResetATInfo(struct PlayState* play, ColliderInfo* info) {
info->atHit = NULL;
info->atHitInfo = NULL;
info->toucherFlags &= ~TOUCH_HIT;
info->toucherFlags &= ~TOUCH_DREW_HITMARK;
Collider_ResetATInfoUnk(play, info);
void Collider_ResetATElement(struct PlayState* play, ColliderElement* elem) {
elem->atHit = NULL;
elem->atHitElem = NULL;
elem->toucherFlags &= ~TOUCH_HIT;
elem->toucherFlags &= ~TOUCH_DREW_HITMARK;
Collider_ResetATElementUnk(play, elem);
}
void Collider_ResetACInfo(struct PlayState* play, ColliderInfo* info) {
info->bumper.hitPos.x = info->bumper.hitPos.y = info->bumper.hitPos.z = 0;
info->bumperFlags &= ~BUMP_HIT;
info->bumperFlags &= ~BUMP_DRAW_HITMARK;
info->acHit = NULL;
info->acHitInfo = NULL;
void Collider_ResetACElement(struct PlayState* play, ColliderElement* elem) {
elem->bumper.hitPos.x = elem->bumper.hitPos.y = elem->bumper.hitPos.z = 0;
elem->bumperFlags &= ~BUMP_HIT;
elem->bumperFlags &= ~BUMP_DRAW_HITMARK;
elem->acHit = NULL;
elem->acHitElem = NULL;
}
void Collider_ResetOCInfo(struct PlayState* play, ColliderInfo* info) {
info->ocElemFlags &= ~OCELEM_HIT;
void Collider_ResetOCElement(struct PlayState* play, ColliderElement* elem) {
elem->ocElemFlags &= ~OCELEM_HIT;
}
s32 Collider_InitJntSphElementDim(struct PlayState* play, ColliderJntSphElementDim* dim) {
@ -340,35 +341,35 @@ s32 Collider_SetJntSphElementDim(struct PlayState* play, ColliderJntSphElementDi
}
s32 Collider_InitJntSphElement(struct PlayState* play, ColliderJntSphElement* element) {
Collider_InitInfo(play, &element->info);
Collider_InitElement(play, &element->info);
Collider_InitJntSphElementDim(play, &element->dim);
return 1;
}
s32 Collider_DestroyJntSphElement(struct PlayState* play, ColliderJntSphElement* element) {
Collider_DestroyInfo(play, &element->info);
Collider_DestroyElement(play, &element->info);
Collider_DestroyJntSphElementDim(play, &element->dim);
return 1;
}
s32 Collider_SetJntSphElement(struct PlayState* play, ColliderJntSphElement* dest, ColliderJntSphElementInit* src) {
Collider_SetInfo(play, &dest->info, &src->info);
Collider_SetElement(play, &dest->info, &src->info);
Collider_SetJntSphElementDim(play, &dest->dim, &src->dim);
return 1;
}
s32 Collider_ResetJntSphElementAT(struct PlayState* play, ColliderJntSphElement* collider) {
Collider_ResetATInfo(play, &collider->info);
Collider_ResetATElement(play, &collider->info);
return 1;
}
s32 Collider_ResetJntSphElementAC(struct PlayState* play, ColliderJntSphElement* collider) {
Collider_ResetACInfo(play, &collider->info);
Collider_ResetACElement(play, &collider->info);
return 1;
}
s32 Collider_ResetJntSphElementOC(struct PlayState* play, ColliderJntSphElement* collider) {
Collider_ResetOCInfo(play, &collider->info);
Collider_ResetOCElement(play, &collider->info);
return 1;
}
@ -565,7 +566,7 @@ s32 Collider_SetCylinderDim(struct PlayState* play, Cylinder16* dim, Cylinder16*
*/
s32 Collider_InitCylinder(struct PlayState* play, ColliderCylinder* collider) {
Collider_InitBase(play, &collider->base);
Collider_InitInfo(play, &collider->info);
Collider_InitElement(play, &collider->info);
Collider_InitCylinderDim(play, &collider->dim);
return 1;
}
@ -575,7 +576,7 @@ s32 Collider_InitCylinder(struct PlayState* play, ColliderCylinder* collider) {
*/
s32 Collider_DestroyCylinder(struct PlayState* play, ColliderCylinder* collider) {
Collider_DestroyBase(play, &collider->base);
Collider_DestroyInfo(play, &collider->info);
Collider_DestroyElement(play, &collider->info);
Collider_DestroyCylinderDim(play, &collider->dim);
return 1;
}
@ -586,7 +587,7 @@ s32 Collider_DestroyCylinder(struct PlayState* play, ColliderCylinder* collider)
*/
s32 Collider_SetCylinderToActor(struct PlayState* play, ColliderCylinder* collider, ColliderCylinderInitToActor* src) {
Collider_SetBaseToActor(play, &collider->base, &src->base);
Collider_SetInfo(play, &collider->info, &src->info);
Collider_SetElement(play, &collider->info, &src->info);
Collider_SetCylinderDim(play, &collider->dim, &src->dim);
return 1;
}
@ -597,7 +598,7 @@ s32 Collider_SetCylinderToActor(struct PlayState* play, ColliderCylinder* collid
s32 Collider_SetCylinderType1(struct PlayState* play, ColliderCylinder* collider, Actor* actor,
ColliderCylinderInitType1* src) {
Collider_SetBaseType1(play, &collider->base, actor, &src->base);
Collider_SetInfo(play, &collider->info, &src->info);
Collider_SetElement(play, &collider->info, &src->info);
Collider_SetCylinderDim(play, &collider->dim, &src->dim);
return 1;
}
@ -607,7 +608,7 @@ s32 Collider_SetCylinderType1(struct PlayState* play, ColliderCylinder* collider
*/
s32 Collider_SetCylinder(struct PlayState* play, ColliderCylinder* collider, Actor* actor, ColliderCylinderInit* src) {
Collider_SetBase(play, &collider->base, actor, &src->base);
Collider_SetInfo(play, &collider->info, &src->info);
Collider_SetElement(play, &collider->info, &src->info);
Collider_SetCylinderDim(play, &collider->dim, &src->dim);
return 1;
}
@ -629,7 +630,7 @@ s32 Collider_ResetCylinderAT(struct PlayState* play, Collider* col) {
ColliderCylinder* cylinder = (ColliderCylinder*)col;
Collider_ResetATBase(play, &cylinder->base);
Collider_ResetATInfo(play, &cylinder->info);
Collider_ResetATElement(play, &cylinder->info);
return 1;
}
@ -640,7 +641,7 @@ s32 Collider_ResetCylinderAC(struct PlayState* play, Collider* col) {
ColliderCylinder* cylinder = (ColliderCylinder*)col;
Collider_ResetACBase(play, &cylinder->base);
Collider_ResetACInfo(play, &cylinder->info);
Collider_ResetACElement(play, &cylinder->info);
return 1;
}
@ -651,7 +652,7 @@ s32 Collider_ResetCylinderOC(struct PlayState* play, Collider* col) {
ColliderCylinder* cylinder = (ColliderCylinder*)col;
Collider_ResetOCBase(play, &cylinder->base);
Collider_ResetOCInfo(play, &cylinder->info);
Collider_ResetOCElement(play, &cylinder->info);
return 1;
}
@ -691,35 +692,35 @@ s32 Collider_SetTrisElementDim(struct PlayState* play, TriNorm* dim, ColliderTri
}
s32 Collider_InitTrisElement(struct PlayState* play, ColliderTrisElement* element) {
Collider_InitInfo(play, &element->info);
Collider_InitElement(play, &element->info);
Collider_InitTrisElementDim(play, &element->dim);
return 1;
}
s32 Collider_DestroyTrisElement(struct PlayState* play, ColliderTrisElement* element) {
Collider_DestroyInfo(play, &element->info);
Collider_DestroyElement(play, &element->info);
Collider_DestroyTrisElementDim(play, &element->dim);
return 1;
}
s32 Collider_SetTrisElement(struct PlayState* play, ColliderTrisElement* element, ColliderTrisElementInit* src) {
Collider_SetInfo(play, &element->info, &src->info);
Collider_SetElement(play, &element->info, &src->info);
Collider_SetTrisElementDim(play, &element->dim, &src->dim);
return 1;
}
s32 Collider_ResetTrisElementAT(struct PlayState* play, ColliderTrisElement* element) {
Collider_ResetATInfo(play, &element->info);
Collider_ResetATElement(play, &element->info);
return 1;
}
s32 Collider_ResetTrisElementAC(struct PlayState* play, ColliderTrisElement* element) {
Collider_ResetACInfo(play, &element->info);
Collider_ResetACElement(play, &element->info);
return 1;
}
s32 Collider_ResetTrisElementOC(struct PlayState* play, ColliderTrisElement* element) {
Collider_ResetOCInfo(play, &element->info);
Collider_ResetOCElement(play, &element->info);
return 1;
}
@ -917,7 +918,7 @@ s32 Collider_SetQuadDim(struct PlayState* play, ColliderQuadDim* dim, ColliderQu
*/
s32 Collider_InitQuad(struct PlayState* play, ColliderQuad* collider) {
Collider_InitBase(play, &collider->base);
Collider_InitInfo(play, &collider->info);
Collider_InitElement(play, &collider->info);
Collider_InitQuadDim(play, &collider->dim);
return 1;
}
@ -927,7 +928,7 @@ s32 Collider_InitQuad(struct PlayState* play, ColliderQuad* collider) {
*/
s32 Collider_DestroyQuad(struct PlayState* play, ColliderQuad* collider) {
Collider_DestroyBase(play, &collider->base);
Collider_DestroyInfo(play, &collider->info);
Collider_DestroyElement(play, &collider->info);
Collider_DestroyQuadDim(play, &collider->dim);
return 1;
}
@ -937,7 +938,7 @@ s32 Collider_DestroyQuad(struct PlayState* play, ColliderQuad* collider) {
*/
s32 Collider_SetQuadType1(struct PlayState* play, ColliderQuad* collider, Actor* actor, ColliderQuadInitType1* src) {
Collider_SetBaseType1(play, &collider->base, actor, &src->base);
Collider_SetInfo(play, &collider->info, &src->info);
Collider_SetElement(play, &collider->info, &src->info);
Collider_SetQuadDim(play, &collider->dim, &src->dim);
return 1;
}
@ -947,7 +948,7 @@ s32 Collider_SetQuadType1(struct PlayState* play, ColliderQuad* collider, Actor*
*/
s32 Collider_SetQuad(struct PlayState* play, ColliderQuad* collider, Actor* actor, ColliderQuadInit* src) {
Collider_SetBase(play, &collider->base, actor, &src->base);
Collider_SetInfo(play, &collider->info, &src->info);
Collider_SetElement(play, &collider->info, &src->info);
Collider_SetQuadDim(play, &collider->dim, &src->dim);
return 1;
}
@ -968,7 +969,7 @@ s32 Collider_ResetQuadAT(struct PlayState* play, Collider* col) {
ColliderQuad* quad = (ColliderQuad*)col;
Collider_ResetATBase(play, &quad->base);
Collider_ResetATInfo(play, &quad->info);
Collider_ResetATElement(play, &quad->info);
Collider_ResetQuadACDist(play, &quad->dim);
return 1;
}
@ -980,7 +981,7 @@ s32 Collider_ResetQuadAC(struct PlayState* play, Collider* col) {
ColliderQuad* quad = (ColliderQuad*)col;
Collider_ResetACBase(play, &quad->base);
Collider_ResetACInfo(play, &quad->info);
Collider_ResetACElement(play, &quad->info);
return 1;
}
@ -991,7 +992,7 @@ s32 Collider_ResetQuadOC(struct PlayState* play, Collider* col) {
ColliderQuad* quad = (ColliderQuad*)col;
Collider_ResetOCBase(play, &quad->base);
Collider_ResetOCInfo(play, &quad->info);
Collider_ResetOCElement(play, &quad->info);
return 1;
}
@ -1015,8 +1016,8 @@ s32 Collider_QuadSetNearestAC(struct PlayState* play, ColliderQuad* quad, Vec3f*
if (quad->info.atHit != NULL) {
Collider_ResetACBase(play, quad->info.atHit);
}
if (quad->info.atHitInfo != NULL) {
Collider_ResetACInfo(play, quad->info.atHitInfo);
if (quad->info.atHitElem != NULL) {
Collider_ResetACElement(play, quad->info.atHitElem);
}
return 1;
} else {
@ -1029,7 +1030,7 @@ s32 Collider_QuadSetNearestAC(struct PlayState* play, ColliderQuad* quad, Vec3f*
*/
s32 Collider_InitSphere(struct PlayState* play, ColliderSphere* collider) {
Collider_InitBase(play, &collider->base);
Collider_InitInfo(play, &collider->info);
Collider_InitElement(play, &collider->info);
Collider_InitJntSphElementDim(play, &collider->dim);
return 1;
}
@ -1039,7 +1040,7 @@ s32 Collider_InitSphere(struct PlayState* play, ColliderSphere* collider) {
*/
s32 Collider_DestroySphere(struct PlayState* play, ColliderSphere* collider) {
Collider_DestroyBase(play, &collider->base);
Collider_DestroyInfo(play, &collider->info);
Collider_DestroyElement(play, &collider->info);
Collider_DestroyJntSphElementDim(play, &collider->dim);
return 1;
}
@ -1049,7 +1050,7 @@ s32 Collider_DestroySphere(struct PlayState* play, ColliderSphere* collider) {
*/
s32 Collider_SetSphere(struct PlayState* play, ColliderSphere* collider, Actor* actor, ColliderSphereInit* src) {
Collider_SetBase(play, &collider->base, actor, &src->base);
Collider_SetInfo(play, &collider->info, &src->info);
Collider_SetElement(play, &collider->info, &src->info);
Collider_SetJntSphElementDim(play, &collider->dim, &src->dim);
return 1;
}
@ -1070,7 +1071,7 @@ s32 Collider_ResetSphereAT(struct PlayState* play, Collider* col) {
ColliderSphere* sphere = (ColliderSphere*)col;
Collider_ResetATBase(play, &sphere->base);
Collider_ResetATInfo(play, &sphere->info);
Collider_ResetATElement(play, &sphere->info);
return 1;
}
@ -1081,7 +1082,7 @@ s32 Collider_ResetSphereAC(struct PlayState* play, Collider* col) {
ColliderSphere* sphere = (ColliderSphere*)col;
Collider_ResetACBase(play, &sphere->base);
Collider_ResetACInfo(play, &sphere->info);
Collider_ResetACElement(play, &sphere->info);
return 1;
}
@ -1092,7 +1093,7 @@ s32 Collider_ResetSphereOC(struct PlayState* play, Collider* col) {
ColliderSphere* sphere = (ColliderSphere*)col;
Collider_ResetOCBase(play, &sphere->base);
Collider_ResetOCInfo(play, &sphere->info);
Collider_ResetOCElement(play, &sphere->info);
return 1;
}
@ -1418,8 +1419,8 @@ s32 CollisionCheck_SetOCLine(struct PlayState* play, CollisionCheckContext* colC
/**
* Skips AT elements that are off.
*/
s32 CollisionCheck_SkipTouch(ColliderInfo* info) {
if (!(info->toucherFlags & TOUCH_ON)) {
s32 CollisionCheck_SkipTouch(ColliderElement* elem) {
if (!(elem->toucherFlags & TOUCH_ON)) {
return 1;
}
return 0;
@ -1428,8 +1429,8 @@ s32 CollisionCheck_SkipTouch(ColliderInfo* info) {
/**
* Skips AC elements that are off.
*/
s32 CollisionCheck_SkipBump(ColliderInfo* info) {
if (!(info->bumperFlags & BUMP_ON)) {
s32 CollisionCheck_SkipBump(ColliderElement* elem) {
if (!(elem->bumperFlags & BUMP_ON)) {
return 1;
}
return 0;
@ -1438,8 +1439,8 @@ s32 CollisionCheck_SkipBump(ColliderInfo* info) {
/**
* If the AT element has no dmgFlags in common with the AC element, no collision happens.
*/
s32 CollisionCheck_NoSharedFlags(ColliderInfo* toucher, ColliderInfo* bumper) {
if (!(toucher->toucher.dmgFlags & bumper->bumper.dmgFlags)) {
s32 CollisionCheck_NoSharedFlags(ColliderElement* atElem, ColliderElement* acElem) {
if (!(atElem->toucher.dmgFlags & acElem->bumper.dmgFlags)) {
return true;
}
return false;
@ -1587,8 +1588,8 @@ void CollisionCheck_RedBloodUnused(struct PlayState* play, Collider* col, Vec3f*
/**
* Plays sound effects and displays hitmarks for solid-type AC colliders (METAL, WOOD, HARD, and TREE)
*/
void CollisionCheck_HitSolid(struct PlayState* play, ColliderInfo* info, Collider* col, Vec3f* hitPos) {
s32 flags = info->toucherFlags & TOUCH_SFX_NONE;
void CollisionCheck_HitSolid(struct PlayState* play, ColliderElement* elem, Collider* col, Vec3f* hitPos) {
s32 flags = elem->toucherFlags & TOUCH_SFX_NONE;
if ((flags == TOUCH_SFX_NORMAL) && (col->colType != COLTYPE_METAL)) {
EffectSsHitmark_SpawnFixedScale(play, 0, hitPos);
@ -1624,15 +1625,15 @@ void CollisionCheck_HitSolid(struct PlayState* play, ColliderInfo* info, Collide
/**
* Plays a hit sound effect for AT colliders attached to Player based on the AC element's elemType.
*/
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderInfo* acInfo) {
s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderElement* acElem) {
if ((at->actor != NULL) && (at->actor->category == ACTORCAT_PLAYER)) {
if (acInfo->elemType == ELEMTYPE_UNK0) {
if (acElem->elemType == ELEMTYPE_UNK0) {
Audio_PlaySfx_AtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE);
} else if (acInfo->elemType == ELEMTYPE_UNK1) {
} else if (acElem->elemType == ELEMTYPE_UNK1) {
Audio_PlaySfx_AtPos(&at->actor->projectedPos, NA_SE_IT_SWORD_STRIKE_HARD);
} else if (acInfo->elemType == ELEMTYPE_UNK2) {
} else if (acElem->elemType == ELEMTYPE_UNK2) {
Audio_PlaySfx_AtPos(&at->actor->projectedPos, 0);
} else if (acInfo->elemType == ELEMTYPE_UNK3) {
} else if (acElem->elemType == ELEMTYPE_UNK3) {
Audio_PlaySfx_AtPos(&at->actor->projectedPos, 0);
}
}
@ -1654,13 +1655,13 @@ HitInfo sHitInfo[] = {
/**
* Handles hitmarks, blood, and sound effects for each AC collision, determined by the AC collider's colType
*/
void CollisionCheck_HitEffects(struct PlayState* play, Collider* at, ColliderInfo* atInfo, Collider* ac,
ColliderInfo* acInfo, Vec3f* hitPos) {
if (acInfo->bumperFlags & BUMP_NO_HITMARK) {
void CollisionCheck_HitEffects(struct PlayState* play, Collider* at, ColliderElement* atElem, Collider* ac,
ColliderElement* acElem, Vec3f* hitPos) {
if (acElem->bumperFlags & BUMP_NO_HITMARK) {
return;
}
if (!(atInfo->toucherFlags & TOUCH_AT_HITMARK) && (atInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
if (!(atElem->toucherFlags & TOUCH_AT_HITMARK) && (atElem->toucherFlags & TOUCH_DREW_HITMARK)) {
return;
}
@ -1669,7 +1670,7 @@ void CollisionCheck_HitEffects(struct PlayState* play, Collider* at, ColliderInf
}
if (ac->actor != NULL) {
if (sHitInfo[ac->colType].effect == HIT_SOLID) {
CollisionCheck_HitSolid(play, atInfo, ac, hitPos);
CollisionCheck_HitSolid(play, atElem, ac, hitPos);
} else if (sHitInfo[ac->colType].effect == HIT_WOOD) {
if (at->actor == NULL) {
CollisionCheck_SpawnShieldParticles(play, hitPos);
@ -1679,8 +1680,8 @@ void CollisionCheck_HitEffects(struct PlayState* play, Collider* at, ColliderInf
}
} else if (sHitInfo[ac->colType].effect != HIT_NONE) {
EffectSsHitmark_SpawnFixedScale(play, sHitInfo[ac->colType].effect, hitPos);
if (!(acInfo->bumperFlags & BUMP_NO_SWORD_SFX)) {
CollisionCheck_SwordHitAudio(at, acInfo);
if (!(acElem->bumperFlags & BUMP_NO_SWORD_SFX)) {
CollisionCheck_SwordHitAudio(at, acElem);
}
}
} else {
@ -1704,58 +1705,58 @@ void CollisionCheck_SetBounce(Collider* at, Collider* ac) {
/**
* Performs the AC collision between the AT element and AC element that collided.
*/
s32 CollisionCheck_SetATvsAC(struct PlayState* play, Collider* atCol, ColliderInfo* atInfo, Vec3f* atPos,
Collider* acCol, ColliderInfo* acInfo, Vec3f* acPos, Vec3f* hitPos) {
s32 CollisionCheck_SetATvsAC(struct PlayState* play, Collider* atCol, ColliderElement* atElem, Vec3f* atPos,
Collider* acCol, ColliderElement* acElem, Vec3f* acPos, Vec3f* hitPos) {
f32 damage;
u32 effect;
if (CollisionCheck_GetToucherDamage(atCol, atInfo, acCol, acInfo) != 0) {
damage = CollisionCheck_GetDamageAndEffectOnBumper(atCol, atInfo, acCol, acInfo, &effect);
if (CollisionCheck_GetToucherDamage(atCol, atElem, acCol, acElem) != 0) {
damage = CollisionCheck_GetDamageAndEffectOnBumper(atCol, atElem, acCol, acElem, &effect);
if (damage < 1.0f) {
if (effect == 0) {
return 0;
}
} else if ((CollisionCheck_ApplyBumperDefense(damage, acInfo) < 1.0f) && (effect == 0)) {
} else if ((CollisionCheck_ApplyBumperDefense(damage, acElem) < 1.0f) && (effect == 0)) {
return 0;
}
}
if ((acCol->acFlags & AC_HARD) && (atCol->actor != NULL) && (acCol->actor != NULL)) {
CollisionCheck_SetBounce(atCol, acCol);
}
if (!(acInfo->bumperFlags & BUMP_NO_AT_INFO)) {
if (!(acElem->bumperFlags & BUMP_NO_AT_INFO)) {
atCol->atFlags |= AT_HIT;
atCol->at = acCol->actor;
atInfo->atHit = acCol;
atInfo->toucherFlags |= TOUCH_HIT;
atInfo->atHitInfo = acInfo;
if (!(atInfo->bumperFlags & BUMP_HIT)) {
atInfo->bumper.hitPos.x = hitPos->x;
atInfo->bumper.hitPos.y = hitPos->y;
atInfo->bumper.hitPos.z = hitPos->z;
atElem->atHit = acCol;
atElem->toucherFlags |= TOUCH_HIT;
atElem->atHitElem = acElem;
if (!(atElem->bumperFlags & BUMP_HIT)) {
atElem->bumper.hitPos.x = hitPos->x;
atElem->bumper.hitPos.y = hitPos->y;
atElem->bumper.hitPos.z = hitPos->z;
}
if (atCol->actor != NULL) {
atCol->actor->colChkInfo.atHitEffect = acInfo->bumper.effect;
atCol->actor->colChkInfo.atHitEffect = acElem->bumper.effect;
}
}
if (!(atInfo->ocElemFlags & OCELEM_UNK2)) {
if (!(atElem->ocElemFlags & OCELEM_UNK2)) {
acCol->acFlags |= AC_HIT;
acCol->ac = atCol->actor;
acInfo->acHit = atCol;
acInfo->acHitInfo = atInfo;
acInfo->bumperFlags |= BUMP_HIT;
acElem->acHit = atCol;
acElem->acHitElem = atElem;
acElem->bumperFlags |= BUMP_HIT;
if (acCol->actor != NULL) {
acCol->actor->colChkInfo.acHitEffect = atInfo->toucher.effect;
acCol->actor->colChkInfo.acHitEffect = atElem->toucher.effect;
}
acInfo->bumper.hitPos.x = hitPos->x;
acInfo->bumper.hitPos.y = hitPos->y;
acInfo->bumper.hitPos.z = hitPos->z;
acElem->bumper.hitPos.x = hitPos->x;
acElem->bumper.hitPos.y = hitPos->y;
acElem->bumper.hitPos.z = hitPos->z;
}
if (!(atInfo->toucherFlags & TOUCH_AT_HITMARK) && (acCol->colType != COLTYPE_METAL) &&
if (!(atElem->toucherFlags & TOUCH_AT_HITMARK) && (acCol->colType != COLTYPE_METAL) &&
(acCol->colType != COLTYPE_WOOD) && (acCol->colType != COLTYPE_HARD)) {
acInfo->bumperFlags |= BUMP_DRAW_HITMARK;
acElem->bumperFlags |= BUMP_DRAW_HITMARK;
} else {
CollisionCheck_HitEffects(play, atCol, atInfo, acCol, acInfo, hitPos);
atInfo->toucherFlags |= TOUCH_DREW_HITMARK;
CollisionCheck_HitEffects(play, atCol, atElem, acCol, acElem, hitPos);
atElem->toucherFlags |= TOUCH_DREW_HITMARK;
}
return 1;
}
@ -2826,14 +2827,14 @@ void CollisionCheck_SetJntSphHitFX(struct PlayState* play, CollisionCheckContext
ColliderJntSphElement* element;
for (element = jntSph->elements; element < &jntSph->elements[jntSph->count]; element++) {
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && (element->info.acHitInfo != NULL) &&
!(element->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && (element->info.acHitElem != NULL) &&
!(element->info.acHitElem->toucherFlags & TOUCH_DREW_HITMARK)) {
Vec3f hitPos;
Math_Vec3s_ToVec3f(&hitPos, &element->info.bumper.hitPos);
CollisionCheck_HitEffects(play, element->info.acHit, element->info.acHitInfo, &jntSph->base, &element->info,
CollisionCheck_HitEffects(play, element->info.acHit, element->info.acHitElem, &jntSph->base, &element->info,
&hitPos);
element->info.acHitInfo->toucherFlags |= TOUCH_DREW_HITMARK;
element->info.acHitElem->toucherFlags |= TOUCH_DREW_HITMARK;
return;
}
}
@ -2845,14 +2846,14 @@ void CollisionCheck_SetJntSphHitFX(struct PlayState* play, CollisionCheckContext
void CollisionCheck_SetCylHitFX(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) {
ColliderCylinder* cylinder = (ColliderCylinder*)col;
if ((cylinder->info.bumperFlags & BUMP_DRAW_HITMARK) && (cylinder->info.acHitInfo != NULL) &&
!(cylinder->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
if ((cylinder->info.bumperFlags & BUMP_DRAW_HITMARK) && (cylinder->info.acHitElem != NULL) &&
!(cylinder->info.acHitElem->toucherFlags & TOUCH_DREW_HITMARK)) {
Vec3f hitPos;
Math_Vec3s_ToVec3f(&hitPos, &cylinder->info.bumper.hitPos);
CollisionCheck_HitEffects(play, cylinder->info.acHit, cylinder->info.acHitInfo, &cylinder->base,
CollisionCheck_HitEffects(play, cylinder->info.acHit, cylinder->info.acHitElem, &cylinder->base,
&cylinder->info, &hitPos);
cylinder->info.acHitInfo->toucherFlags |= TOUCH_DREW_HITMARK;
cylinder->info.acHitElem->toucherFlags |= TOUCH_DREW_HITMARK;
}
}
@ -2864,14 +2865,14 @@ void CollisionCheck_SetTrisHitFX(struct PlayState* play, CollisionCheckContext*
ColliderTrisElement* element;
for (element = tris->elements; element < &tris->elements[tris->count]; element++) {
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && (element->info.acHitInfo != NULL) &&
!(element->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
if ((element->info.bumperFlags & BUMP_DRAW_HITMARK) && (element->info.acHitElem != NULL) &&
!(element->info.acHitElem->toucherFlags & TOUCH_DREW_HITMARK)) {
Vec3f hitPos;
Math_Vec3s_ToVec3f(&hitPos, &element->info.bumper.hitPos);
CollisionCheck_HitEffects(play, element->info.acHit, element->info.acHitInfo, &tris->base, &element->info,
CollisionCheck_HitEffects(play, element->info.acHit, element->info.acHitElem, &tris->base, &element->info,
&hitPos);
element->info.acHitInfo->toucherFlags |= TOUCH_DREW_HITMARK;
element->info.acHitElem->toucherFlags |= TOUCH_DREW_HITMARK;
return;
}
}
@ -2883,13 +2884,13 @@ void CollisionCheck_SetTrisHitFX(struct PlayState* play, CollisionCheckContext*
void CollisionCheck_SetQuadHitFX(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) {
ColliderQuad* quad = (ColliderQuad*)col;
if ((quad->info.bumperFlags & BUMP_DRAW_HITMARK) && (quad->info.acHitInfo != NULL) &&
!(quad->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
if ((quad->info.bumperFlags & BUMP_DRAW_HITMARK) && (quad->info.acHitElem != NULL) &&
!(quad->info.acHitElem->toucherFlags & TOUCH_DREW_HITMARK)) {
Vec3f hitPos;
Math_Vec3s_ToVec3f(&hitPos, &quad->info.bumper.hitPos);
CollisionCheck_HitEffects(play, quad->info.acHit, quad->info.acHitInfo, &quad->base, &quad->info, &hitPos);
quad->info.acHitInfo->toucherFlags |= TOUCH_DREW_HITMARK;
CollisionCheck_HitEffects(play, quad->info.acHit, quad->info.acHitElem, &quad->base, &quad->info, &hitPos);
quad->info.acHitElem->toucherFlags |= TOUCH_DREW_HITMARK;
}
}
@ -2899,14 +2900,14 @@ void CollisionCheck_SetQuadHitFX(struct PlayState* play, CollisionCheckContext*
void CollisionCheck_SetSphereHitFX(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col) {
ColliderSphere* sphere = (ColliderSphere*)col;
if ((sphere->info.bumperFlags & BUMP_DRAW_HITMARK) && (sphere->info.acHitInfo != NULL) &&
!(sphere->info.acHitInfo->toucherFlags & TOUCH_DREW_HITMARK)) {
if ((sphere->info.bumperFlags & BUMP_DRAW_HITMARK) && (sphere->info.acHitElem != NULL) &&
!(sphere->info.acHitElem->toucherFlags & TOUCH_DREW_HITMARK)) {
Vec3f hitPos;
Math_Vec3s_ToVec3f(&hitPos, &sphere->info.bumper.hitPos);
CollisionCheck_HitEffects(play, sphere->info.acHit, sphere->info.acHitInfo, &sphere->base, &sphere->info,
CollisionCheck_HitEffects(play, sphere->info.acHit, sphere->info.acHitElem, &sphere->base, &sphere->info,
&hitPos);
sphere->info.acHitInfo->toucherFlags |= TOUCH_DREW_HITMARK;
sphere->info.acHitElem->toucherFlags |= TOUCH_DREW_HITMARK;
}
}
@ -3047,8 +3048,8 @@ s32 CollisionCheck_GetMassType(u8 mass) {
* Sets OC collision flags for OC collider overlaps. If both colliders are attached to actors and can push,
* also performs an elastic collision where both colliders are moved apart in proportion to their masses.
*/
void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* leftCol, ColliderInfo* leftInfo, Vec3f* leftPos,
Collider* rightCol, ColliderInfo* rightInfo, Vec3f* rightPos, f32 overlapSize) {
void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* leftCol, ColliderElement* leftElem, Vec3f* leftPos,
Collider* rightCol, ColliderElement* rightElem, Vec3f* rightPos, f32 overlapSize) {
f32 pad;
f32 leftDispRatio;
f32 rightDispRatio;
@ -3066,14 +3067,14 @@ void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* leftCol, Collide
leftCol->ocFlags1 |= OC1_HIT;
leftCol->oc = rightActor;
leftInfo->ocElemFlags |= OCELEM_HIT;
leftElem->ocElemFlags |= OCELEM_HIT;
if (rightCol->ocFlags2 & OC2_TYPE_PLAYER) {
leftCol->ocFlags2 |= OC2_HIT_PLAYER;
}
rightCol->ocFlags1 |= OC1_HIT;
rightCol->oc = leftActor;
rightInfo->ocElemFlags |= OCELEM_HIT;
rightElem->ocElemFlags |= OCELEM_HIT;
if (leftCol->ocFlags2 & OC2_TYPE_PLAYER) {
rightCol->ocFlags2 |= OC2_HIT_PLAYER;
}
@ -3500,36 +3501,36 @@ void CollisionCheck_SetInfoGetDamageTable(CollisionCheckInfo* info, s32 index, C
* Apply AC damage effect
*/
void CollisionCheck_ApplyDamage(struct PlayState* play, CollisionCheckContext* colChkCtx, Collider* col,
ColliderInfo* info) {
ColliderElement* elem) {
f32 damage;
f32 finalDamage = 0.0f;
s32 pad;
Collider* atCol;
ColliderInfo* atInfo;
ColliderElement* atElem;
s32 pad1;
u32 effect;
if ((col->actor == NULL) || !(col->acFlags & AC_HIT)) {
return;
}
if (!(info->bumperFlags & BUMP_HIT) || (info->bumperFlags & BUMP_NO_DAMAGE)) {
if (!(elem->bumperFlags & BUMP_HIT) || (elem->bumperFlags & BUMP_NO_DAMAGE)) {
return;
}
atCol = info->acHit;
atInfo = info->acHitInfo;
atCol = elem->acHit;
atElem = elem->acHitElem;
if ((atCol != NULL) && (atInfo != NULL) && (col != NULL) && (info != NULL)) {
damage = CollisionCheck_GetDamageAndEffectOnBumper(atCol, atInfo, col, info, &effect);
if ((atCol != NULL) && (atElem != NULL) && (col != NULL) && (elem != NULL)) {
damage = CollisionCheck_GetDamageAndEffectOnBumper(atCol, atElem, col, elem, &effect);
if (CollisionCheck_GetToucherDamage(atCol, atInfo, col, info) != 0) {
if (CollisionCheck_GetToucherDamage(atCol, atElem, col, elem) != 0) {
if (damage < 1.0f) {
finalDamage = 0.0f;
if (effect == 0) {
return;
}
} else {
finalDamage = CollisionCheck_ApplyBumperDefense(damage, info);
finalDamage = CollisionCheck_ApplyBumperDefense(damage, elem);
if ((finalDamage < 1.0f) && (effect == 0)) {
return;
}
@ -3538,7 +3539,7 @@ void CollisionCheck_ApplyDamage(struct PlayState* play, CollisionCheckContext* c
if (col->actor->colChkInfo.damageTable != NULL) {
col->actor->colChkInfo.damageEffect = effect;
}
if (!(col->acFlags & AC_HARD) || ((col->acFlags & AC_HARD) && (atInfo->toucher.dmgFlags == 0x20000000))) {
if (!(col->acFlags & AC_HARD) || ((col->acFlags & AC_HARD) && (atElem->toucher.dmgFlags == 0x20000000))) {
if (col->actor->colChkInfo.damage < finalDamage) {
col->actor->colChkInfo.damage = finalDamage;
}

View File

@ -223,7 +223,7 @@ void FireObj_Update(PlayState* play, FireObj* fire, Actor* actor) {
FireObj_UpdateStateTransitions(play, fire);
if (fire->state == FIRE_STATE_NOT_LIT) {
if ((fire->collision.base.acFlags & AC_HIT) &&
(fire->collision.info.acHitInfo->toucher.dmgFlags & DMG_FIRE_ARROW)) {
(fire->collision.info.acHitElem->toucher.dmgFlags & DMG_FIRE_ARROW)) {
FireObj_SetState(fire, fire->dynamicSizeStep, FIRE_STATE_GROWING);
}
} else if ((fire->collision.base.acFlags & AC_HIT) && (arrow->actor.update != NULL) &&

View File

@ -139,11 +139,11 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
ArmsHook_CheckForCancel(this);
if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
(this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
(this->collider.info.atHitElem->elemType != ELEMTYPE_UNK4)) {
Actor* touchedActor = this->collider.base.at;
if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_200 | ACTOR_FLAG_400))) {
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
if (this->collider.info.atHitElem->bumperFlags & BUMP_HOOKABLE) {
ArmsHook_AttachHookToActor(this, touchedActor);
if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_400)) {
func_808C1154(this);

View File

@ -419,13 +419,13 @@ void func_80B84928(BgDblueWaterfall* this, PlayState* play) {
if (sp2C) {
if (sp30 != 0) {
func_80B83EA4(this, play);
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x800) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x800) {
this->csId = this->actor.csId;
func_80B84AD4(this, play);
}
} else {
func_80B841A0(this, play);
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1000) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x1000) {
this->csId = CutsceneManager_GetAdditionalCsId(this->actor.csId);
func_80B84AD4(this, play);
}

View File

@ -359,7 +359,7 @@ s32 func_80ABCB5C(BgHakuginBombwall* this, PlayState* play) {
s32 func_80ABCC00(BgHakuginBombwall* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
if (this->collider.info.acHitInfo->toucher.dmgFlags & 8) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 8) {
if (this->collider.base.ac != NULL) {
Actor* thisx = &this->dyna.actor;

View File

@ -104,7 +104,7 @@ void func_80C072D0(BgIkninside* this, PlayState* play) {
s32 i;
if (this->collider.base.acFlags & AC_HIT) {
if ((this->collider.info.acHitInfo != NULL) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x80000000)) {
if ((this->collider.info.acHitElem != NULL) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000)) {
for (i = 0; i < 20; i++) {
altitude = Rand_S16Offset(0x1800, 0x2800);
azimuth = Rand_Next() >> 0x10;

View File

@ -291,7 +291,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
for (i = 0; i < 2; i++) {
element = &this->collider.elements[i];
if (element->info.bumperFlags & BUMP_HIT) {
if (this->collider.elements[i].info.acHitInfo->toucher.dmgFlags & 0x800) {
if (this->collider.elements[i].info.acHitElem->toucher.dmgFlags & 0x800) {
Math_Vec3s_ToVec3f(&this->dyna.actor.home.pos, &element->info.bumper.hitPos);
func_809CEE74(this);
return;

View File

@ -1954,9 +1954,9 @@ void Boss01_UpdateDamage(Boss01* this, PlayState* play) {
if (this->shieldCollider.elements[ODOLWA_SHIELD_COLLIDER_SHIELD].info.bumperFlags & BUMP_HIT) {
this->bodyInvincibilityTimer = 5;
if (this->damagedTimer == 0) {
ColliderInfo* acHitInfo = this->shieldCollider.elements[ODOLWA_SHIELD_COLLIDER_SHIELD].info.acHitInfo;
ColliderElement* acHitElem = this->shieldCollider.elements[ODOLWA_SHIELD_COLLIDER_SHIELD].info.acHitElem;
if (acHitInfo->toucher.dmgFlags == DMG_SWORD_BEAM) {
if (acHitElem->toucher.dmgFlags == DMG_SWORD_BEAM) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.focus.pos.x, this->actor.focus.pos.y,
this->actor.focus.pos.z, 0, 0, 3, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS));
Actor_PlaySfx(&this->actor, NA_SE_IT_SHIELD_BOUND);
@ -3246,16 +3246,16 @@ void Boss01_Bug_UpdateDamage(Boss01* this, PlayState* play) {
Vec3f additionalVelocity;
s32 pad[2];
u8 damage;
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
OdolwaEffect* effect = play->specialEffects;
if (this->bugACCollider.base.acFlags & AC_HIT) {
this->bugACCollider.base.acFlags &= ~AC_HIT;
acHitInfo = this->bugACCollider.info.acHitInfo;
acHitElem = this->bugACCollider.info.acHitElem;
if (this->damagedTimer == 0) {
Matrix_RotateYS(this->actor.yawTowardsPlayer, MTXMODE_NEW);
if (acHitInfo->toucher.dmgFlags & 0x300000) {
if (acHitElem->toucher.dmgFlags & 0x300000) {
this->damagedTimer = 10;
Matrix_MultVecZ(-10.0f, &additionalVelocity);
this->additionalVelocityX = additionalVelocity.x;

View File

@ -1828,7 +1828,7 @@ void Boss03_Damaged(Boss03* this, PlayState* play) {
/* End of ActionFuncs section */
void Boss03_UpdateCollision(Boss03* this, PlayState* play) {
ColliderInfo* hitbox;
ColliderElement* acHitElem;
u8 sp4B = true;
Player* player = GET_PLAYER(play);
s32 i;
@ -1863,15 +1863,15 @@ void Boss03_UpdateCollision(Boss03* this, PlayState* play) {
if ((this->actionFunc == stunnedActionFunc) && sp4B) {
for (i = 0; i < ARRAY_COUNT(sBodyJntSphElementsInit); i++) {
if (this->bodyCollider.elements[i].info.bumperFlags & BUMP_HIT) {
hitbox = this->bodyCollider.elements[i].info.acHitInfo;
acHitElem = this->bodyCollider.elements[i].info.acHitElem;
this->bodyCollider.elements[i].info.bumperFlags &= ~BUMP_HIT;
this->unk_25C = 15;
this->unk_25E = 15;
// (DMG_SWORD_BEAM | DMG_SPIN_ATTACK | DMG_ZORA_PUNCH | DMG_ZORA_BARRIER | DMG_DEKU_LAUNCH |
// DMG_DEKU_SPIN | DMG_GORON_SPIKES | DMG_SWORD | DMG_GORON_PUNCH | DMG_DEKU_STICK)
phi_v0 = (hitbox->toucher.dmgFlags & 0x038AC302)
? this->bodyCollider.elements[i].info.acHitInfo->toucher.damage
phi_v0 = (acHitElem->toucher.dmgFlags & 0x038AC302)
? this->bodyCollider.elements[i].info.acHitElem->toucher.damage
: 0;
phi_v1 = phi_v0;
@ -1896,7 +1896,7 @@ void Boss03_UpdateCollision(Boss03* this, PlayState* play) {
for (i = 0; i < ARRAY_COUNT(sHeadJntSphElementsInit); i++) {
if (this->headCollider.elements[i].info.bumperFlags & BUMP_HIT) {
hitbox = this->headCollider.elements[i].info.acHitInfo;
acHitElem = this->headCollider.elements[i].info.acHitElem;
this->headCollider.elements[i].info.bumperFlags &= ~BUMP_HIT;
this->unk_25C = 15;
@ -1919,8 +1919,8 @@ void Boss03_UpdateCollision(Boss03* this, PlayState* play) {
// (DMG_SWORD_BEAM | DMG_SPIN_ATTACK | DMG_ZORA_PUNCH | DMG_ZORA_BARRIER | DMG_DEKU_LAUNCH |
// DMG_DEKU_SPIN | DMG_GORON_SPIKES | DMG_SWORD | DMG_GORON_PUNCH | DMG_DEKU_STICK)
phi_v0 = (hitbox->toucher.dmgFlags & 0x038AC302)
? (this->headCollider.elements[i].info.acHitInfo->toucher.damage)
phi_v0 = (acHitElem->toucher.dmgFlags & 0x038AC302)
? (this->headCollider.elements[i].info.acHitElem->toucher.damage)
: 0;
phi_v1 = phi_v0;

View File

@ -947,13 +947,13 @@ void Boss05_FallingHead_Fall(Boss05* this, PlayState* play) {
void Boss05_WalkingHead_UpdateDamage(Boss05* this, PlayState* play) {
s32 pad[2];
u8 attackDealsDamage = false;
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
if ((this->damagedTimer == 0) &&
(this->headCollider.elements[BIO_BABA_HEAD_COLLIDER_HEAD].info.bumperFlags & BUMP_HIT)) {
this->headCollider.elements[BIO_BABA_HEAD_COLLIDER_HEAD].info.bumperFlags &= ~BUMP_HIT;
acHitInfo = this->headCollider.elements[BIO_BABA_HEAD_COLLIDER_HEAD].info.acHitInfo;
if (acHitInfo->toucher.dmgFlags & 0x300000) { // (DMG_NORMAL_SHIELD | DMG_LIGHT_RAY)
acHitElem = this->headCollider.elements[BIO_BABA_HEAD_COLLIDER_HEAD].info.acHitElem;
if (acHitElem->toucher.dmgFlags & 0x300000) { // (DMG_NORMAL_SHIELD | DMG_LIGHT_RAY)
this->knockbackMagnitude = -12.0f;
this->knockbackAngle = this->dyna.actor.yawTowardsPlayer;
this->damagedTimer = 6;

View File

@ -1617,7 +1617,7 @@ void BossHakugin_FrozenBeforeFight(BossHakugin* this, PlayState* play) {
}
if ((this->iceCollider.base.acFlags & AC_HIT) &&
(this->iceCollider.info.acHitInfo->toucher.dmgFlags == DMG_FIRE_ARROW)) {
(this->iceCollider.info.acHitElem->toucher.dmgFlags == DMG_FIRE_ARROW)) {
this->iceCollider.base.atFlags &= ~AT_HIT;
this->iceCollider.base.acFlags &= ~AC_HIT;
this->iceCollider.base.ocFlags1 &= ~OC1_HIT;
@ -2668,7 +2668,7 @@ s32 BossHakugin_UpdateDamage(BossHakugin* this, PlayState* play) {
// DMG_DEKU_NUT | DMG_DEKU_STICK | DMG_ZORA_BOOMERANG | DMG_NORMAL_ARROW | DMG_HOOKSHOT | DMG_ICE_ARROW
// | DMG_LIGHT_ARROW | DMG_DEKU_SPIN | DMG_DEKU_BUBBLE | DMG_DEKU_LAUNCH | DMG_ZORA_BARRIER
if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) &&
(this->bodyCollider.elements[i].info.acHitInfo->toucher.dmgFlags & 0x000DB0B3)) {
(this->bodyCollider.elements[i].info.acHitElem->toucher.dmgFlags & 0x000DB0B3)) {
return false;
}
@ -2714,7 +2714,7 @@ s32 BossHakugin_UpdateDamage(BossHakugin* this, PlayState* play) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 15);
this->damagedSpeedUpCounter += 35;
BossHakugin_UpdateDrawDmgEffect(this, play, i);
this->actor.colChkInfo.damage = this->bodyCollider.elements[i].info.acHitInfo->toucher.damage;
this->actor.colChkInfo.damage = this->bodyCollider.elements[i].info.acHitElem->toucher.damage;
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);
@ -2757,11 +2757,11 @@ s32 BossHakugin_UpdateDamage(BossHakugin* this, PlayState* play) {
this->disableBodyCollidersTimer = 20;
for (j = 0; j < ARRAY_COUNT(this->bodyColliderElements); j++) {
Vec3f hitPos;
ColliderInfo* colliderInfo = &this->bodyCollider.elements[j].info;
ColliderElement* elem = &this->bodyCollider.elements[j].info;
if ((colliderInfo->bumperFlags & BUMP_HIT) && (colliderInfo->acHitInfo != NULL) &&
!(colliderInfo->acHitInfo->toucherFlags & TOUCH_SFX_NONE)) {
Math_Vec3s_ToVec3f(&hitPos, &colliderInfo->bumper.hitPos);
if ((elem->bumperFlags & BUMP_HIT) && (elem->acHitElem != NULL) &&
!(elem->acHitElem->toucherFlags & TOUCH_SFX_NONE)) {
Math_Vec3s_ToVec3f(&hitPos, &elem->bumper.hitPos);
EffectSsHitmark_SpawnFixedScale(play, EFFECT_HITMARK_METAL, &hitPos);
CollisionCheck_SpawnShieldParticlesMetalSound(play, &hitPos, &this->actor.projectedPos);
break;

View File

@ -380,7 +380,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
((this->actor.params == ARROW_TYPE_DEKU_BUBBLE) &&
((this->unk_262 != 0) || (phi_a2 = (this->collider.base.atFlags & AT_HIT) != 0)))) {
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
if (phi_a2 && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4) &&
if (phi_a2 && (this->collider.info.atHitElem->elemType != ELEMTYPE_UNK4) &&
(this->collider.base.atFlags & AT_BOUNCED)) {
if ((this->collider.base.at != NULL) && (this->collider.base.at->id != ACTOR_OBJ_SYOKUDAI)) {
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.prevPos);
@ -434,7 +434,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
} else {
EffectSsHitmark_SpawnCustomScale(play, EFFECT_HITMARK_WHITE, 150, &this->actor.world.pos);
if (sp50 && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
if (sp50 && (this->collider.info.atHitElem->elemType != ELEMTYPE_UNK4)) {
sp7C = this->collider.base.at;
if ((sp7C->update != NULL) && !(this->collider.base.atFlags & AT_BOUNCED) &&

View File

@ -505,7 +505,7 @@ void EnBb_UpdateDamage(EnBb* this, PlayState* play) {
this->collider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
this->collider.base.atFlags &= ~AT_ON;
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
Actor_SetDropFlag(&this->actor, &this->collider.info);
this->flameScaleY = 0.0f;
this->flameScaleX = 0.0f;

View File

@ -524,7 +524,7 @@ void EnBbfall_UpdateDamage(EnBbfall* this, PlayState* play) {
this->collider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
this->collider.base.atFlags &= ~AT_ON;
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider.elements[0].info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->collider.elements[0].info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
Actor_SetDropFlagJntSph(&this->actor, &this->collider);
this->flameOpacity = 0;
this->flameScaleY = 0.0f;

View File

@ -490,12 +490,12 @@ void EnBigokuta_CheckOneHitKill(EnBigokuta* this, PlayState* play) {
Enemy_StartFinishingBlow(play, &this->picto.actor);
if (this->bodyCollider.base.acFlags & AC_HIT) {
if (this->bodyCollider.info.acHitInfo->toucher.dmgFlags & 0x1000) { // Ice Arrow
if (this->bodyCollider.info.acHitElem->toucher.dmgFlags & 0x1000) { // Ice Arrow
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX;
this->drawDmgEffScale = 1.2f;
this->drawDmgEffFrozenSteamScale = 1800.0f * 0.001f;
this->drawDmgEffAlpha = 1.0f;
} else if (this->bodyCollider.info.acHitInfo->toucher.dmgFlags & 0x2000) { // Light Arrow
} else if (this->bodyCollider.info.acHitElem->toucher.dmgFlags & 0x2000) { // Light Arrow
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
this->drawDmgEffScale = 1.2f;
this->drawDmgEffAlpha = 4.0f;

View File

@ -2620,7 +2620,7 @@ void EnBigslime_ApplyDamageEffectGekko(EnBigslime* this, PlayState* play) {
if (this->gekkoCollider.base.acFlags & AC_HIT) {
this->gekkoCollider.base.acFlags &= ~AC_HIT;
if ((this->gekkoDrawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->gekkoCollider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->gekkoCollider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
EnBigslime_EndThrowMinislime(this);
if (this->actor.colChkInfo.damageEffect != BIGSLIME_DMGEFF_HOOKSHOT) {
if (Actor_ApplyDamage(&this->actor) == 0) {

View File

@ -167,8 +167,8 @@ void func_808AEAE0(EnBombf* this, PlayState* play) {
player->stateFlags1 &= ~PLAYER_STATE1_CARRYING_ACTOR;
}
} else if ((this->colliderCylinder.base.acFlags & AC_HIT) &&
((this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0x13828) ||
((this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0x200) &&
((this->colliderCylinder.info.acHitElem->toucher.dmgFlags & 0x13828) ||
((this->colliderCylinder.info.acHitElem->toucher.dmgFlags & 0x200) &&
(player->transformation == PLAYER_FORM_GORON) && (player->actor.speed > 15.0f)))) {
this->colliderCylinder.base.acFlags &= ~AC_HIT;
if (this->colliderCylinder.base.ac->category != ACTORCAT_BOSS) {

View File

@ -96,12 +96,12 @@ void EnBubble_SetDimensions(EnBubble* this, f32 dim) {
}
s32 func_8089F59C(EnBubble* this) {
ColliderInfo* info = &this->colliderSphere.elements[0].info;
ColliderElement* elem = &this->colliderSphere.elements[0].info;
info->toucher.dmgFlags = DMG_EXPLOSIVES;
info->toucher.effect = 0;
info->toucher.damage = 4;
info->toucherFlags = TOUCH_ON;
elem->toucher.dmgFlags = DMG_EXPLOSIVES;
elem->toucher.effect = 0;
elem->toucher.damage = 4;
elem->toucherFlags = TOUCH_ON;
this->actor.velocity.y = 0.0f;
return 6;
}

View File

@ -1085,7 +1085,7 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, PlayState* play) {
if ((i != ARRAY_COUNT(this->colliderElements)) &&
((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(sphElement->info.acHitInfo->toucher.dmgFlags & 0xDB0B3))) {
!(sphElement->info.acHitElem->toucher.dmgFlags & 0xDB0B3))) {
EnDekubaba_SpawnIceEffects(this, play);
newHealth = this->actor.colChkInfo.health - this->actor.colChkInfo.damage;

View File

@ -571,7 +571,7 @@ void func_808BE73C(EnDekunuts* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info);
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
func_808BD3B4(this, play);
if ((this->actor.colChkInfo.mass == 50) || (this->actor.params != ENDEKUNUTS_GET_FF00_0)) {
if ((this->actor.params != ENDEKUNUTS_GET_FF00_1) && !Actor_ApplyDamage(&this->actor)) {

View File

@ -1306,7 +1306,7 @@ s32 EnDinofos_UpdateDamage(EnDinofos* this, PlayState* play) {
}
if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) &&
(this->bodyAndFireCollider.elements[i].info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
(this->bodyAndFireCollider.elements[i].info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
return false;
}

View File

@ -970,7 +970,7 @@ void EnDodongo_UpdateDamage(EnDodongo* this, PlayState* play) {
if ((i != ARRAY_COUNT(this->collider2Elements)) &&
((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider2.elements[i].info.acHitInfo->toucher.dmgFlags & 0xDB0B3))) {
!(this->collider2.elements[i].info.acHitElem->toucher.dmgFlags & 0xDB0B3))) {
func_80876D28(this, play);
Math_Vec3s_ToVec3f(&sp3C, &this->collider2.elements[i].info.bumper.hitPos);
if (this->actor.colChkInfo.damageEffect == 0xF) {
@ -994,7 +994,7 @@ void EnDodongo_UpdateDamage(EnDodongo* this, PlayState* play) {
if ((i != ARRAY_COUNT(this->collider1Elements)) &&
((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider1.elements[i].info.acHitInfo->toucher.dmgFlags & 0xDB0B3))) {
!(this->collider1.elements[i].info.acHitElem->toucher.dmgFlags & 0xDB0B3))) {
func_80876D28(this, play);
if (this->actor.colChkInfo.damageEffect != 0xF) {
if (!Actor_ApplyDamage(&this->actor)) {

View File

@ -1005,7 +1005,7 @@ void func_808D2E34(EnFloormas* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
Actor_SetDropFlag(&this->actor, &this->collider.info);
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
if (this->actor.colChkInfo.damageEffect == 0xE) {
func_808D0908(this);
this->actor.colorFilterTimer = 0;

View File

@ -502,8 +502,8 @@ void EnGe2_PatrolDuties(EnGe2* this, PlayState* play) {
Animation_GetLastFrame(&gGerudoPurpleLookingAboutAnim), ANIMMODE_LOOP, -8.0f);
}
} else if (this->collider.base.acFlags & AC_HIT) {
if ((this->collider.info.acHitInfo != NULL) &&
(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_DEKU_NUT)) {
if ((this->collider.info.acHitElem != NULL) &&
(this->collider.info.acHitElem->toucher.dmgFlags & DMG_DEKU_NUT)) {
Actor_SetColorFilter(&this->picto.actor, COLORFILTER_COLORFLAG_BLUE, 120, COLORFILTER_BUFFLAG_OPA, 400);
this->picto.actor.speed = 0.0f;
this->actionFunc = EnGe2_Stunned;

View File

@ -1028,7 +1028,7 @@ s32 func_8094156C(EnGoroiwa* this, PlayState* play) {
Vec3f sp80;
if ((this->collider.base.acFlags & AC_HIT) && ((params == ENGOROIWA_C000_1) || (params == ENGOROIWA_C000_2))) {
if (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x4000) {
if (this->collider.elements->info.acHitElem->toucher.dmgFlags & 0x4000) {
s16 sp7E = BINANG_SUB(actor->yawTowardsPlayer, this->actor.world.rot.y);
f32 temp;
f32 temp2;
@ -1082,11 +1082,11 @@ s32 func_8094156C(EnGoroiwa* this, PlayState* play) {
func_80941274(this, play);
phi_s0_2 = true;
} else if (((params == ENGOROIWA_C000_1) &&
(this->collider.elements->info.acHitInfo->toucher.dmgFlags & (0x400 | 0x100))) ||
((params == ENGOROIWA_C000_2) && (this->collider.elements->info.acHitInfo->toucher.dmgFlags &
(this->collider.elements->info.acHitElem->toucher.dmgFlags & (0x400 | 0x100))) ||
((params == ENGOROIWA_C000_2) && (this->collider.elements->info.acHitElem->toucher.dmgFlags &
(0x80000000 | 0x800 | 0x400 | 0x100 | 0x8)))) {
this->unk_1CC = 50;
if ((params == ENGOROIWA_C000_2) && (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x800)) {
if ((params == ENGOROIWA_C000_2) && (this->collider.elements->info.acHitElem->toucher.dmgFlags & 0x800)) {
this->unk_1E6 = true;
}
func_80940090(this, play);

View File

@ -786,7 +786,7 @@ void EnIk_UpdateDamage(EnIk* this, PlayState* play) {
this->colliderCylinder.base.acFlags &= ~AC_HIT;
if ((this->actor.colChkInfo.damageEffect != DMG_EFF_IMMUNE) &&
((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0xDB0B3))) {
!(this->colliderCylinder.info.acHitElem->toucher.dmgFlags & 0xDB0B3))) {
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_RED, 255, COLORFILTER_BUFFLAG_OPA, 12);
this->invincibilityFrames = 12;
EnIk_Thaw(this, play);

View File

@ -482,7 +482,7 @@ void func_8095E660(EnIshi* this, PlayState* play) {
return;
}
if (sp34 && (sp38 == 0) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x508)) {
if (sp34 && (sp38 == 0) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x508)) {
if (sp30 != 0) {
func_8095DFF0(this, play);
func_8095F060(this);

View File

@ -764,7 +764,7 @@ void EnKame_UpdateDamage(EnKame* this, PlayState* play) {
Actor_SetDropFlag(&this->actor, &this->collider.info);
if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) &&
(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
return;
}

View File

@ -246,13 +246,13 @@ void EnKanban_Update(Actor* thisx, PlayState* play) {
this->actor.world.pos.y, this->actor.world.pos.z, this->actor.shape.rot.x,
this->actor.shape.rot.y, this->actor.shape.rot.z, ENKANBAN_PIECE);
if (piece != NULL) {
ColliderInfo* hitItem = this->collider.info.acHitInfo;
ColliderElement* acHitElem = this->collider.info.acHitElem;
s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
u8 i;
if (hitItem->toucher.dmgFlags & 0x200) {
if (acHitElem->toucher.dmgFlags & 0x200) {
this->cutType = sCutTypes[player->meleeWeaponAnimation];
} else if (hitItem->toucher.dmgFlags & 0x10) {
} else if (acHitElem->toucher.dmgFlags & 0x10) {
this->invincibilityTimer = 0;
this->cutType = this->unk_19A + 3;
this->unk_19A = 1 - this->unk_19A;
@ -264,7 +264,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play) {
this->cutType = 0;
}
if ((ABS_ALT(yawDiff) > 0x4000) && !(hitItem->toucher.dmgFlags & 0x10)) {
if ((ABS_ALT(yawDiff) > 0x4000) && !(acHitElem->toucher.dmgFlags & 0x10)) {
if (this->cutType == 4) {
this->cutType = 3;
} else if (this->cutType == 1) {
@ -361,8 +361,8 @@ void EnKanban_Update(Actor* thisx, PlayState* play) {
piece->actor.world.rot.y =
BINANG_ROT180((s32)Rand_CenteredFloat(0x4000) + this->actor.yawTowardsPlayer);
if ((hitItem->toucher.dmgFlags & 0x10) || (hitItem->toucher.dmgFlags & 8) ||
(hitItem->toucher.dmgFlags & 0x80000000)) {
if ((acHitElem->toucher.dmgFlags & 0x10) || (acHitElem->toucher.dmgFlags & 8) ||
(acHitElem->toucher.dmgFlags & 0x80000000)) {
piece->actor.velocity.y = Rand_ZeroFloat(3.0f) + 6.0f;
piece->actor.speed = Rand_ZeroFloat(4.0f) + 6.0f;
} else {

View File

@ -3160,15 +3160,15 @@ void EnKnight_UpdateDamageFallenOver(EnKnight* this, PlayState* play) {
for (i = 0; i < ARRAY_COUNT(this->bodyColliderElements); i++) {
ColliderJntSphElement* colliderElem = &this->bodyCollider.elements[i];
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
if (colliderElem->info.bumperFlags & BUMP_HIT) {
colliderElem->info.bumperFlags &= ~BUMP_HIT;
acHitInfo = colliderElem->info.acHitInfo;
acHitElem = colliderElem->info.acHitElem;
this->invincibilityTimer = 10;
if (acHitInfo->toucher.dmgFlags & DMG_LIGHT_RAY) {
if (acHitElem->toucher.dmgFlags & DMG_LIGHT_RAY) {
this->damageFlashTimer = 15;
this->invincibilityTimer = 1000;
EnKnight_SetupDie(this, play);

View File

@ -378,7 +378,7 @@ s32 func_80A5BFD8(EnKusa2* this, PlayState* play) {
s32 pad;
func_80A5CF44(this);
func_80A5BD14(this, play, (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1000000) ? 1 : 0);
func_80A5BD14(this, play, (this->collider.info.acHitElem->toucher.dmgFlags & 0x1000000) ? 1 : 0);
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EV_PLANT_BROKEN);
func_80A5BD94(this);
Actor_Kill(&this->actor);

View File

@ -855,7 +855,7 @@ void EnOkuta_UpdateDamage(EnOkuta* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX ||
!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
Actor_SetDropFlag(&this->actor, &this->collider.info);
EnOkuta_Thaw(this, play);

View File

@ -1273,7 +1273,7 @@ void EnPametfrog_ApplyDamageEffect(EnPametfrog* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->collider.elements->info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
if (this->actor.params == GEKKO_PRE_SNAPPER) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Audio_RestorePrevBgm();

View File

@ -690,7 +690,7 @@ void func_8089874C(EnPeehat* this, PlayState* play) {
if (this->colliderSphere.base.acFlags & AC_HIT) {
this->colliderSphere.base.acFlags &= ~AC_HIT;
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->colliderSphere.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->colliderSphere.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
if (!Actor_ApplyDamage(&this->actor)) {
Enemy_StartFinishingBlow(play, &this->actor);
}
@ -739,7 +739,7 @@ void func_8089874C(EnPeehat* this, PlayState* play) {
} else if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) &&
(this->colliderCylinder.base.acFlags & AC_HIT) &&
((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & 0xDB0B3))) {
!(this->colliderCylinder.info.acHitElem->toucher.dmgFlags & 0xDB0B3))) {
func_808971DC(this, play);
this->actor.colorFilterTimer = 0;
func_80897648(this);

View File

@ -459,7 +459,7 @@ s32 func_808FAA94(EnRr* this, PlayState* play) {
this->collider2.base.acFlags &= ~AC_HIT;
if ((this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) &&
(sp2C->info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
(sp2C->info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
return false;
}

View File

@ -1027,7 +1027,7 @@ void EnSlime_UpdateDamage(EnSlime* this, PlayState* play) {
this->collider.base.acFlags &= ~AC_HIT;
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
EnSlime_Thaw(this, play);
if ((this->actor.params == EN_SLIME_TYPE_BLUE) &&

View File

@ -470,14 +470,14 @@ void EnSsh_Sway(EnSsh* this) {
void EnSsh_CheckBodyStickHit(EnSsh* this, PlayState* play) {
Player* player = GET_PLAYER(play);
ColliderInfo* colliderInfo = &this->collider1[0].info;
ColliderElement* elem = &this->collider1[0].info;
if (player->unk_B28 != 0) {
colliderInfo->bumper.dmgFlags |= 2;
elem->bumper.dmgFlags |= 2;
this->collider1[1].info.bumper.dmgFlags &= ~2;
this->collider1[2].info.bumper.dmgFlags &= ~2;
} else {
colliderInfo->bumper.dmgFlags &= ~2;
elem->bumper.dmgFlags &= ~2;
this->collider1[1].info.bumper.dmgFlags |= 2;
this->collider1[2].info.bumper.dmgFlags |= 2;
}

View File

@ -415,7 +415,7 @@ void func_80BB7408(EnTanron2* this, PlayState* play) {
}
void func_80BB7578(EnTanron2* this, PlayState* play) {
ColliderInfo* acHitInfo;
ColliderElement* acHitElem;
s32 pad;
Player* player = GET_PLAYER(play);
s32 pad2[2];
@ -424,8 +424,8 @@ void func_80BB7578(EnTanron2* this, PlayState* play) {
if (this->unk_154 == 0) {
if (this->collider1.base.acFlags & AC_HIT) {
this->collider1.base.acFlags &= ~AC_HIT;
acHitInfo = this->collider1.info.acHitInfo;
if (acHitInfo->toucher.dmgFlags & 0x80) {
acHitElem = this->collider1.info.acHitElem;
if (acHitElem->toucher.dmgFlags & 0x80) {
func_80BB6B80(this);
this->unk_158 = 1;
Actor_PlaySfx(&this->actor, NA_SE_EN_IKURA_DAMAGE);
@ -438,7 +438,7 @@ void func_80BB7578(EnTanron2* this, PlayState* play) {
this->unk_154 = 15;
if (this->actionFunc != func_80BB69FC) {
Matrix_RotateYS(this->actor.yawTowardsPlayer, MTXMODE_NEW);
if ((acHitInfo->toucher.dmgFlags & 0x300000) != 0) {
if ((acHitElem->toucher.dmgFlags & 0x300000) != 0) {
this->unk_154 = 10;
Matrix_MultVecZ(-10.0f, &this->actor.velocity);
} else {

View File

@ -354,7 +354,7 @@ void EnTanron5_Update(Actor* thisx, PlayState* play2) {
if (this->timer == 0) {
if (this->collider.base.acFlags & AC_HIT) {
ColliderInfo* acHitInfo = this->collider.info.acHitInfo;
ColliderElement* acHitElem = this->collider.info.acHitElem;
Actor* ac = this->collider.base.ac;
this->collider.base.acFlags &= ~AC_HIT;
@ -370,7 +370,7 @@ void EnTanron5_Update(Actor* thisx, PlayState* play2) {
fragmentAndItemCount = (s32)Rand_ZeroFloat(2.99f) + 10;
}
if ((KREG(19) != 0) || ((acHitInfo->toucher.dmgFlags & 0x05000202) && (sGiantModeScaleFactor < 0.5f)) ||
if ((KREG(19) != 0) || ((acHitElem->toucher.dmgFlags & 0x05000202) && (sGiantModeScaleFactor < 0.5f)) ||
(ac->id == ACTOR_BOSS_02)) {
if (this->dList == gTwinmoldRuinPillarDL) {
// To create the appearance of the pillar shrinking after being hit, push it further into the floor,
@ -460,11 +460,11 @@ void EnTanron5_Update(Actor* thisx, PlayState* play2) {
// Something hit the ruin, but it wasn't Twinmold, and it wasn't the player while in giant
// mode. Play the reflect sound effect and spawn some sparks instead of breaking.
Vec3f hitPos;
ColliderInfo* info = this->collider.info.acHitInfo;
ColliderElement* acHitElem = this->collider.info.acHitElem;
hitPos.x = info->bumper.hitPos.x;
hitPos.y = info->bumper.hitPos.y;
hitPos.z = info->bumper.hitPos.z;
hitPos.x = acHitElem->bumper.hitPos.x;
hitPos.y = acHitElem->bumper.hitPos.y;
hitPos.z = acHitElem->bumper.hitPos.z;
Actor_PlaySfx(&this->actor, NA_SE_IT_SHIELD_REFLECT_SW);
CollisionCheck_SpawnShieldParticlesMetal(play, &hitPos);

View File

@ -947,7 +947,7 @@ void func_80895FF8(EnTite* this, PlayState* play) {
Actor_SetDropFlag(&this->actor, &this->collider.info);
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3)) {
!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
func_80893E54(this, play);
if (this->actor.shape.yOffset < 0.0f) {
func_80895DE8(this);

View File

@ -561,7 +561,7 @@ void EnWallmas_UpdateDamage(EnWallmas* this, PlayState* play) {
Actor_SetDropFlag(&this->actor, &this->collider.info);
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
(!(this->collider.info.acHitInfo->toucher.dmgFlags & 0xDB0B3))) {
(!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3))) {
if (Actor_ApplyDamage(&this->actor) == 0) {
Enemy_StartFinishingBlow(play, &this->actor);
Actor_PlaySfx(&this->actor, NA_SE_EN_DAIOCTA_REVERSE);

View File

@ -1419,7 +1419,7 @@ void func_8099386C(EnWf* this, PlayState* play) {
this->collider1.base.atFlags &= ~AT_ON;
if (((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
!(collider->info.acHitInfo->toucher.dmgFlags &
!(collider->info.acHitElem->toucher.dmgFlags &
(0x80000 | 0x40000 | 0x10000 | 0x8000 | 0x2000 | 0x1000 | 0x80 | 0x20 | 0x10 | 0x2 | 0x1))) &&
(this->actor.colChkInfo.damageEffect != 0xF)) {
if (!Actor_ApplyDamage(&this->actor)) {

View File

@ -283,7 +283,7 @@ void EnWiz_MoveMagicProjectile(EnWizFire* this, PlayState* play) {
if ((this->type != EN_WIZ_FIRE_TYPE_REFLECTED_MAGIC_PROJECTILE) && (this->timer != 0)) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
if (this->collider.info.acHitInfo->toucher.dmgFlags == 0x1000) {
if (this->collider.info.acHitElem->toucher.dmgFlags == 0x1000) {
this->timer = 0;
this->hitByIceArrow = true;
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT);
@ -342,7 +342,7 @@ void EnWiz_SmallFlame(EnWizFire* this, PlayState* play) {
this->timer -= 10;
}
if (this->collider.info.acHitInfo->toucher.dmgFlags == 0x1000) {
if (this->collider.info.acHitElem->toucher.dmgFlags == 0x1000) {
this->timer = 0;
this->hitByIceArrow = true;
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EV_ICE_MELT);
@ -409,7 +409,7 @@ void EnWiz_Pool(EnWizFire* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
if (!sPoolHitByIceArrow && (this->collider.info.acHitInfo->toucher.dmgFlags == 0x1000)) {
if (!sPoolHitByIceArrow && (this->collider.info.acHitElem->toucher.dmgFlags == 0x1000)) {
sPoolHitByIceArrow = true;
this->hitByIceArrow = true;
this->poolTimer = 0;

View File

@ -180,7 +180,7 @@ void func_80AE8DE4(ObjBigicicle* this, PlayState* play) {
void func_80AE8FD4(ObjBigicicle* this, PlayState* play) {
if ((this->collider1.base.acFlags & AC_HIT) ||
((this->collider2.base.acFlags & AC_HIT) && (this->collider2.info.acHitInfo->toucher.dmgFlags & 0x3820))) {
((this->collider2.base.acFlags & AC_HIT) && (this->collider2.info.acHitElem->toucher.dmgFlags & 0x3820))) {
if ((this->unk_148 == 0) || (this->unk_149 == 1)) {
CutsceneManager_Queue(this->actor.csId);
this->actionFunc = func_80AE9090;

View File

@ -111,15 +111,15 @@ s32 func_809393B0(Actor* thisx) {
if (this->collider.base.acFlags & AC_HIT) {
Actor* ac = this->collider.base.ac;
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x80000000) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000) {
if ((ac != NULL) && (Math3D_Vec3fDistSq(&this->actor.world.pos, &ac->world.pos) < SQ(150.0f))) {
return true;
}
} else if (this->collider.info.acHitInfo->toucher.dmgFlags & 8) {
} else if (this->collider.info.acHitElem->toucher.dmgFlags & 8) {
if ((ac != NULL) && (Math3D_Vec3fDistSq(&this->actor.world.pos, &ac->world.pos) < SQ(95.0f))) {
return true;
}
} else if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x500) {
} else if (this->collider.info.acHitElem->toucher.dmgFlags & 0x500) {
return true;
}
}
@ -133,11 +133,11 @@ s32 func_80939470(Actor* thisx) {
Actor* temp_v0 = this->collider.base.ac;
if (temp_v0 != NULL) {
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x80000000) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000) {
if (Math3D_Vec3fDistSq(&this->actor.world.pos, &temp_v0->world.pos) < SQ(175.0f)) {
return true;
}
} else if ((this->collider.info.acHitInfo->toucher.dmgFlags & 8) &&
} else if ((this->collider.info.acHitElem->toucher.dmgFlags & 8) &&
(Math3D_Vec3fDistSq(&this->actor.world.pos, &temp_v0->world.pos) < SQ(115.0f))) {
return true;
}

View File

@ -260,7 +260,7 @@ void ObjChan_ChandelierAction(ObjChan* this, PlayState* play) {
Math_Vec3f_ToVec3s(&pot->collider.dim.pos, &pot->actor.world.pos);
}
}
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x800)) {
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x800)) {
Flags_SetSwitch(play, OBJCHAN_GET_SWITCH_FLAG(thisx));
}
if (Flags_GetSwitch(play, OBJCHAN_GET_SWITCH_FLAG(thisx))) {
@ -296,7 +296,7 @@ void ObjChan_PotAction(ObjChan* this, PlayState* play) {
s32 phi_v1;
potBreaks = false;
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x4004000)) {
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x4004000)) {
potBreaks = true;
}
if (this->stateFlags & OBJCHAN_STATE_ON_FIRE) {

View File

@ -380,12 +380,12 @@ void func_8098DC60(ObjComb* this, PlayState* play) {
}
if (this->unk_1B3) {
if (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x0182C29C) {
if (this->collider.elements->info.acHitElem->toucher.dmgFlags & 0x0182C29C) {
func_8098CEAC(this, play);
func_8098DA74(this, play);
Actor_Kill(&this->actor);
} else {
s32 dmgFlags = this->collider.elements->info.acHitInfo->toucher.dmgFlags;
s32 dmgFlags = this->collider.elements->info.acHitElem->toucher.dmgFlags;
if (dmgFlags & 0x13820) {
this->unk_1A8 = 0xDAC;

View File

@ -466,7 +466,7 @@ void func_80A1C838(ObjFlowerpot* this, PlayState* play) {
func_80A1B994(this, play);
Actor_Kill(&this->actor);
} else if ((this->collider.elements[0].info.bumperFlags & BUMP_HIT) &&
(this->collider.elements[0].info.acHitInfo->toucher.dmgFlags & 0x058BFFBC)) {
(this->collider.elements[0].info.acHitElem->toucher.dmgFlags & 0x058BFFBC)) {
if (!(this->unk_1EA & 2)) {
func_80A1B914(this, play);
func_80A1C0FC(this, play);

View File

@ -212,14 +212,14 @@ void ObjHamishi_Update(Actor* thisx, PlayState* play) {
}
if (sp24) {
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x80000500) {
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x400) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000500) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x400) {
this->unk_1A0 = 26;
} else {
this->unk_1A0 = 11;
}
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x80000000) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000) {
this->unk_19E = 2;
} else {
this->unk_19E++;

View File

@ -311,7 +311,7 @@ s32 func_80A54A0C(ObjHugebombiwa* this) {
s32 params;
Vec3f sp20;
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x80000000)) {
if ((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000)) {
ac = this->collider.base.ac;
params = ENHUGEBOMBIWA_GET_100(&this->actor);

View File

@ -191,13 +191,13 @@ void func_80931A38(ObjIcePoly* this, PlayState* play) {
if (((this->colliders2[0].base.acFlags & AC_HIT) &&
((this->colliders2[0].base.ac == NULL) ||
((this->colliders2[0].base.ac->id != ACTOR_OBJ_AQUA) &&
(this->colliders2[0].info.acHitInfo->toucher.dmgFlags == 0x800)) ||
(this->colliders2[0].info.acHitElem->toucher.dmgFlags == 0x800)) ||
((this->colliders2[0].base.ac->id == ACTOR_OBJ_AQUA) &&
(this->colliders2[0].base.ac->params == AQUA_TYPE_HOT)))) ||
((this->colliders2[1].base.acFlags & AC_HIT) &&
((this->colliders2[1].base.ac == NULL) ||
((this->colliders2[1].base.ac->id != ACTOR_OBJ_AQUA) &&
(this->colliders2[1].info.acHitInfo->toucher.dmgFlags == 0x800)) ||
(this->colliders2[1].info.acHitElem->toucher.dmgFlags == 0x800)) ||
((this->colliders2[1].base.ac->id == ACTOR_OBJ_AQUA) &&
(this->colliders2[1].base.ac->params == AQUA_TYPE_HOT))))) {
CutsceneManager_Queue(this->actor.csId);

View File

@ -1448,7 +1448,7 @@ void ObjIceblock_Update(Actor* thisx, PlayState* play) {
}
}
if (((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitInfo->toucher.dmgFlags & 0x800)) ||
if (((this->collider.base.acFlags & AC_HIT) && (this->collider.info.acHitElem->toucher.dmgFlags & 0x800)) ||
(this->meltTimer == 0)) {
this->meltTimer = -1;
this->unk_2B0 = 4;

View File

@ -185,17 +185,17 @@ s32 ObjKibako2_ShouldBreak(ObjKibako2* this) {
Actor* ac = this->collider.base.ac;
this->collider.base.acFlags = acFlags & ~AC_HIT;
if (ac != NULL) {
if (this->collider.info.acHitInfo->toucher.dmgFlags & (1 << 31)) {
if (this->collider.info.acHitElem->toucher.dmgFlags & (1 << 31)) {
// Powder Keg
if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &ac->world.pos) < SQ(160.0f)) {
shouldBreak = true;
}
} else if (this->collider.info.acHitInfo->toucher.dmgFlags & (1 << 3)) {
} else if (this->collider.info.acHitElem->toucher.dmgFlags & (1 << 3)) {
// Explosives
if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &ac->world.pos) < SQ(100.0f)) {
shouldBreak = true;
}
} else if (this->collider.info.acHitInfo->toucher.dmgFlags & (1 << 8 | 1 << 10)) {
} else if (this->collider.info.acHitElem->toucher.dmgFlags & (1 << 8 | 1 << 10)) {
// Goron Punch/Pound
shouldBreak = true;
}

View File

@ -123,7 +123,7 @@ void ObjLightblock_Wait(ObjLightblock* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
this->collider.base.acFlags &= ~AC_HIT;
// light arrows
if (this->collider.info.acHitInfo->toucher.dmgFlags & (1 << 13)) {
if (this->collider.info.acHitElem->toucher.dmgFlags & (1 << 13)) {
this->collisionCounter = 8;
}
// light ray

View File

@ -328,7 +328,7 @@ void ObjLightswitch_Update(Actor* thisx, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
// dmgFlags enum doesn't exist yet, 0x2000 is light arrows
if ((this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x2000) != 0) {
if ((this->collider.elements->info.acHitElem->toucher.dmgFlags & 0x2000) != 0) {
this->hitState = 10;
} else if (LIGHTSWITCH_GET_TYPE(&this->actor) == LIGHTSWITCH_TYPE_FLIP) {
if (this->hitState == 0) {

View File

@ -182,7 +182,7 @@ void ObjMine_Air_CheckAC(ObjMine* this, s16* hitAngle, s16* torqueAngle) {
yawToAttack = Math_Vec3f_Yaw(&attackActor->world.pos, &centerPos);
// dmgFlag check is (DMG_DEKU_BUBBLE | DMG_FIRE_ARROW | DMG_ICE_ARROW | DMG_FIRE_ARROW | DMG_NORMAL_ARROW)
if (this->collider.elements[0].info.acHitInfo->toucher.dmgFlags & 0x13820) {
if (this->collider.elements[0].info.acHitElem->toucher.dmgFlags & 0x13820) {
*hitAngle = attackActor->shape.rot.y;
*torqueAngle = attackActor->shape.rot.y - yawToAttack;
} else {
@ -199,7 +199,7 @@ void ObjMine_Water_CheckAC(ObjMine* this, Vec3f* knockbackDir) {
Actor* attackActor = this->collider.base.ac;
// dmgFlag check is (DMG_DEKU_BUBBLE | DMG_LIGHT_ARROW | DMG_ICE_ARROW | DMG_FIRE_ARROW | DMG_NORMAL_ARROW)
if (this->collider.elements[0].info.acHitInfo->toucher.dmgFlags & 0x13820) {
if (this->collider.elements[0].info.acHitElem->toucher.dmgFlags & 0x13820) {
Matrix_Push();
Matrix_RotateYS(attackActor->shape.rot.y, MTXMODE_NEW);
Matrix_RotateXS(attackActor->shape.rot.x, MTXMODE_APPLY);

View File

@ -533,17 +533,17 @@ void func_80B04350(ObjSnowball* this, PlayState* play) {
}
if (flag && (this->unk_211 == 0) &&
(this->collider.elements->info.acHitInfo->toucher.dmgFlags &
(this->collider.elements->info.acHitElem->toucher.dmgFlags &
(0x80000000 | 0x4000 | 0x800 | 0x400 | 0x100 | 0x8))) {
this->actor.flags |= ACTOR_FLAG_10;
if (this->actor.home.rot.y == 1) {
this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY);
}
if (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x4000) {
if (this->collider.elements->info.acHitElem->toucher.dmgFlags & 0x4000) {
this->unk_20A = 1;
} else {
if (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x800) {
if (this->collider.elements->info.acHitElem->toucher.dmgFlags & 0x800) {
this->unk_210 = 1;
}
this->unk_20A = 0;
@ -563,10 +563,10 @@ void func_80B04350(ObjSnowball* this, PlayState* play) {
}
if (flag &&
!(this->collider.elements->info.acHitInfo->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20))) {
!(this->collider.elements->info.acHitElem->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20))) {
if (this->unk_209 <= 0) {
func_80B02EE4(this, play);
if (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x1000000) {
if (this->collider.elements->info.acHitElem->toucher.dmgFlags & 0x1000000) {
this->unk_209 = 25;
} else {
this->unk_209 = 10;

View File

@ -361,14 +361,14 @@ void func_80B39C9C(ObjSnowball2* this, PlayState* play) {
} else if ((this->actor.bgCheckFlags & BGCHECKFLAG_WATER) &&
((this->actor.shape.yOffset * this->actor.scale.y) < this->actor.depthInWater)) {
func_80B3A498(this);
} else if (sp38 && (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 0x0583FFBC)) {
} else if (sp38 && (this->collider.elements->info.acHitElem->toucher.dmgFlags & 0x0583FFBC)) {
func_80B38E88(this, play);
func_80B39108(this, play);
func_80B39B5C(this, play);
Actor_Kill(&this->actor);
return;
} else {
if (sp38 && (this->collider.elements->info.acHitInfo->toucher.dmgFlags & 2)) {
if (sp38 && (this->collider.elements->info.acHitElem->toucher.dmgFlags & 2)) {
func_80B39908(this, play);
}

View File

@ -193,8 +193,8 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
}
}
if (this->flameCollider.base.acFlags & AC_HIT) {
flameColliderHurtboxDmgFlags = this->flameCollider.info.acHitInfo->toucher.dmgFlags;
if (this->flameCollider.info.acHitInfo->toucher.dmgFlags & 0x820) {
flameColliderHurtboxDmgFlags = this->flameCollider.info.acHitElem->toucher.dmgFlags;
if (this->flameCollider.info.acHitElem->toucher.dmgFlags & 0x820) {
interaction = OBJ_SYOKUDAI_INTERACTION_ARROW_FA;
}
} else if (player->heldItemAction == PLAYER_IA_DEKU_STICK) {

View File

@ -248,16 +248,16 @@ s32 func_80B9BF7C(ObjTaru* this) {
this->collider.base.acFlags &= ~AC_HIT;
if (ac != NULL) {
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x80000000) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x80000000) {
phi_a3 = false;
if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &ac->world.pos) < SQ(160.0f)) {
phi_a3 = true;
}
} else if (this->collider.info.acHitInfo->toucher.dmgFlags & 8) {
} else if (this->collider.info.acHitElem->toucher.dmgFlags & 8) {
if (Math3D_Vec3fDistSq(&this->dyna.actor.world.pos, &ac->world.pos) < SQ(100.0f)) {
phi_a3 = true;
}
} else if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x500) {
} else if (this->collider.info.acHitElem->toucher.dmgFlags & 0x500) {
phi_a3 = true;
}
}

View File

@ -278,7 +278,7 @@ void ObjToge_Update(Actor* thisx, PlayState* play) {
ColliderCylinder* collider = &this->collider;
if (this->collider.base.acFlags & AC_HIT) {
if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1000) {
if (this->collider.info.acHitElem->toucher.dmgFlags & 0x1000) {
func_809A43A8(this, play);
Actor_SetColorFilter(&this->actor, COLORFILTER_COLORFLAG_BLUE, 250, COLORFILTER_BUFFLAG_OPA, 250);
}

View File

@ -474,7 +474,7 @@ void func_809289E4(ObjTsubo* this, PlayState* play) {
Player_PlaySfx((Player*)&this->actor, NA_SE_PL_PULL_UP_POT);
func_80928D6C(this);
} else if ((this->unk_19B != 0) ||
(acHit && (this->cylinderCollider.info.acHitInfo->toucher.dmgFlags & 0x058BFFBC))) {
(acHit && (this->cylinderCollider.info.acHitElem->toucher.dmgFlags & 0x058BFFBC))) {
typeData = &sPotTypeData[type];
this->unk_19B = 0;
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WATER) && (this->actor.depthInWater > 15.0f)) {

View File

@ -5796,8 +5796,8 @@ s32 func_80834600(Player* this, PlayState* play) {
}
} else if ((this->shieldQuad.base.acFlags & AC_BOUNCED) || (this->shieldCylinder.base.acFlags & AC_BOUNCED) ||
((this->invincibilityTimer < 0) && (this->cylinder.base.acFlags & AC_HIT) &&
(this->cylinder.info.acHitInfo != NULL) &&
(this->cylinder.info.acHitInfo->toucher.dmgFlags != DMG_UNBLOCKABLE))) {
(this->cylinder.info.acHitElem != NULL) &&
(this->cylinder.info.acHitElem->toucher.dmgFlags != DMG_UNBLOCKABLE))) {
PlayerAnimationHeader* var_a2;
s32 sp64;

View File

@ -1314,16 +1314,16 @@
0x800E06BC:("Collider_InitTouch",),
0x800E06E4:("Collider_DestroyTouch",),
0x800E06F8:("Collider_SetTouch",),
0x800E0720:("Collider_ResetATInfoUnk",),
0x800E0720:("Collider_ResetATElementUnk",),
0x800E0730:("Collider_InitBump",),
0x800E0760:("Collider_DestroyBump",),
0x800E0774:("Collider_SetBump",),
0x800E079C:("Collider_InitInfo",),
0x800E081C:("Collider_DestroyInfo",),
0x800E085C:("Collider_SetInfo",),
0x800E08D4:("Collider_ResetATInfo",),
0x800E090C:("Collider_ResetACInfo",),
0x800E0944:("Collider_ResetOCInfo",),
0x800E079C:("Collider_InitElement",),
0x800E081C:("Collider_DestroyElement",),
0x800E085C:("Collider_SetElement",),
0x800E08D4:("Collider_ResetATElement",),
0x800E090C:("Collider_ResetACElement",),
0x800E0944:("Collider_ResetOCElement",),
0x800E095C:("Collider_InitJntSphElementDim",),
0x800E09A4:("Collider_DestroyJntSphElementDim",),
0x800E09B8:("Collider_SetJntSphElementDim",),

View File

@ -828,16 +828,16 @@ asm/non_matchings/code/z_collision_check/Collider_ResetOCBase.s,Collider_ResetOC
asm/non_matchings/code/z_collision_check/Collider_InitTouch.s,Collider_InitTouch,0x800E06BC,0xA
asm/non_matchings/code/z_collision_check/Collider_DestroyTouch.s,Collider_DestroyTouch,0x800E06E4,0x5
asm/non_matchings/code/z_collision_check/Collider_SetTouch.s,Collider_SetTouch,0x800E06F8,0xA
asm/non_matchings/code/z_collision_check/Collider_ResetATInfoUnk.s,Collider_ResetATInfoUnk,0x800E0720,0x4
asm/non_matchings/code/z_collision_check/Collider_ResetATElementUnk.s,Collider_ResetATElementUnk,0x800E0720,0x4
asm/non_matchings/code/z_collision_check/Collider_InitBump.s,Collider_InitBump,0x800E0730,0xC
asm/non_matchings/code/z_collision_check/Collider_DestroyBump.s,Collider_DestroyBump,0x800E0760,0x5
asm/non_matchings/code/z_collision_check/Collider_SetBump.s,Collider_SetBump,0x800E0774,0xA
asm/non_matchings/code/z_collision_check/Collider_InitInfo.s,Collider_InitInfo,0x800E079C,0x20
asm/non_matchings/code/z_collision_check/Collider_DestroyInfo.s,Collider_DestroyInfo,0x800E081C,0x10
asm/non_matchings/code/z_collision_check/Collider_SetInfo.s,Collider_SetInfo,0x800E085C,0x1E
asm/non_matchings/code/z_collision_check/Collider_ResetATInfo.s,Collider_ResetATInfo,0x800E08D4,0xE
asm/non_matchings/code/z_collision_check/Collider_ResetACInfo.s,Collider_ResetACInfo,0x800E090C,0xE
asm/non_matchings/code/z_collision_check/Collider_ResetOCInfo.s,Collider_ResetOCInfo,0x800E0944,0x6
asm/non_matchings/code/z_collision_check/Collider_InitElement.s,Collider_InitElement,0x800E079C,0x20
asm/non_matchings/code/z_collision_check/Collider_DestroyElement.s,Collider_DestroyElement,0x800E081C,0x10
asm/non_matchings/code/z_collision_check/Collider_SetElement.s,Collider_SetElement,0x800E085C,0x1E
asm/non_matchings/code/z_collision_check/Collider_ResetATElement.s,Collider_ResetATElement,0x800E08D4,0xE
asm/non_matchings/code/z_collision_check/Collider_ResetACElement.s,Collider_ResetACElement,0x800E090C,0xE
asm/non_matchings/code/z_collision_check/Collider_ResetOCElement.s,Collider_ResetOCElement,0x800E0944,0x6
asm/non_matchings/code/z_collision_check/Collider_InitJntSphElementDim.s,Collider_InitJntSphElementDim,0x800E095C,0x12
asm/non_matchings/code/z_collision_check/Collider_DestroyJntSphElementDim.s,Collider_DestroyJntSphElementDim,0x800E09A4,0x5
asm/non_matchings/code/z_collision_check/Collider_SetJntSphElementDim.s,Collider_SetJntSphElementDim,0x800E09B8,0x16

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
828 asm/non_matchings/code/z_collision_check/Collider_InitTouch.s Collider_InitTouch 0x800E06BC 0xA
829 asm/non_matchings/code/z_collision_check/Collider_DestroyTouch.s Collider_DestroyTouch 0x800E06E4 0x5
830 asm/non_matchings/code/z_collision_check/Collider_SetTouch.s Collider_SetTouch 0x800E06F8 0xA
831 asm/non_matchings/code/z_collision_check/Collider_ResetATInfoUnk.s asm/non_matchings/code/z_collision_check/Collider_ResetATElementUnk.s Collider_ResetATInfoUnk Collider_ResetATElementUnk 0x800E0720 0x4
832 asm/non_matchings/code/z_collision_check/Collider_InitBump.s Collider_InitBump 0x800E0730 0xC
833 asm/non_matchings/code/z_collision_check/Collider_DestroyBump.s Collider_DestroyBump 0x800E0760 0x5
834 asm/non_matchings/code/z_collision_check/Collider_SetBump.s Collider_SetBump 0x800E0774 0xA
835 asm/non_matchings/code/z_collision_check/Collider_InitInfo.s asm/non_matchings/code/z_collision_check/Collider_InitElement.s Collider_InitInfo Collider_InitElement 0x800E079C 0x20
836 asm/non_matchings/code/z_collision_check/Collider_DestroyInfo.s asm/non_matchings/code/z_collision_check/Collider_DestroyElement.s Collider_DestroyInfo Collider_DestroyElement 0x800E081C 0x10
837 asm/non_matchings/code/z_collision_check/Collider_SetInfo.s asm/non_matchings/code/z_collision_check/Collider_SetElement.s Collider_SetInfo Collider_SetElement 0x800E085C 0x1E
838 asm/non_matchings/code/z_collision_check/Collider_ResetATInfo.s asm/non_matchings/code/z_collision_check/Collider_ResetATElement.s Collider_ResetATInfo Collider_ResetATElement 0x800E08D4 0xE
839 asm/non_matchings/code/z_collision_check/Collider_ResetACInfo.s asm/non_matchings/code/z_collision_check/Collider_ResetACElement.s Collider_ResetACInfo Collider_ResetACElement 0x800E090C 0xE
840 asm/non_matchings/code/z_collision_check/Collider_ResetOCInfo.s asm/non_matchings/code/z_collision_check/Collider_ResetOCElement.s Collider_ResetOCInfo Collider_ResetOCElement 0x800E0944 0x6
841 asm/non_matchings/code/z_collision_check/Collider_InitJntSphElementDim.s Collider_InitJntSphElementDim 0x800E095C 0x12
842 asm/non_matchings/code/z_collision_check/Collider_DestroyJntSphElementDim.s Collider_DestroyJntSphElementDim 0x800E09A4 0x5
843 asm/non_matchings/code/z_collision_check/Collider_SetJntSphElementDim.s Collider_SetJntSphElementDim 0x800E09B8 0x16