diff --git a/include/z64collision_check.h b/include/z64collision_check.h index 0607987832..b59bed787e 100644 --- a/include/z64collision_check.h +++ b/include/z64collision_check.h @@ -39,10 +39,10 @@ typedef enum { } ColliderShape; typedef struct { - /* 0x00 */ struct Actor* self; // Actor owning this collider. - /* 0x04 */ struct Actor* otherAC; // Other actor owning the AC collider that collided with this AT collider. - /* 0x08 */ struct Actor* otherAT; // Other actor owning the AT collider that collided with this AC collider. - /* 0x0C */ struct Actor* otherOC; // Other actor owning the OC collider that collided with this OC collider. + /* 0x00 */ struct Actor* actor; // Attached actor + /* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider. + /* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider. + /* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider. /* 0x10 */ u8 atFlags; /* 0x11 */ u8 acFlags; /* 0x12 */ u8 ocFlags1; @@ -119,8 +119,8 @@ typedef struct ColliderElement { /* 0x15 */ u8 toucherFlags; // Information flags for AT collisions /* 0x16 */ u8 bumperFlags; // Information flags for AC collisions /* 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 + /* 0x18 */ Collider* atHit; // object touching this element's AT collider + /* 0x1C */ Collider* acHit; // object touching this element's AC collider /* 0x20 */ struct ColliderElement* atHitInfo; // element that hit the AT collider /* 0x24 */ struct ColliderElement* acHitInfo; // element that hit the AC collider } ColliderElement; // size = 0x28 diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 126a5ccf57..0c8fe1a27a 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -3235,9 +3235,9 @@ void func_80033480(PlayState* play, Vec3f* posBase, f32 randRangeDiameter, s32 a } Actor* Actor_GetCollidedExplosive(PlayState* play, Collider* collider) { - if ((collider->acFlags & AC_HIT) && (collider->otherAT->category == ACTORCAT_EXPLOSIVE)) { + if ((collider->acFlags & AC_HIT) && (collider->ac->category == ACTORCAT_EXPLOSIVE)) { collider->acFlags &= ~AC_HIT; - return collider->otherAT; + return collider->ac; } return NULL; diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 1735b58842..22128c2d64 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -87,7 +87,7 @@ s32 Collider_DestroyBase(PlayState* play, Collider* col) { * Uses default OC2_TYPE_1 and COLTYPE_HIT0 */ s32 Collider_SetBaseToActor(PlayState* play, Collider* col, ColliderInitToActor* src) { - col->self = src->actor; + col->actor = src->actor; col->atFlags = src->atFlags; col->acFlags = src->acFlags; col->ocFlags1 = src->ocFlags1; @@ -100,7 +100,7 @@ s32 Collider_SetBaseToActor(PlayState* play, Collider* col, ColliderInitToActor* * Uses default OC2_TYPE_1 */ s32 Collider_SetBaseType1(PlayState* play, Collider* col, Actor* actor, ColliderInitType1* src) { - col->self = actor; + col->actor = actor; col->colType = src->colType; col->atFlags = src->atFlags; col->acFlags = src->acFlags; @@ -111,7 +111,7 @@ s32 Collider_SetBaseType1(PlayState* play, Collider* col, Actor* actor, Collider } s32 Collider_SetBase(PlayState* play, Collider* col, Actor* actor, ColliderInit* src) { - col->self = actor; + col->actor = actor; col->colType = src->colType; col->atFlags = src->atFlags; col->acFlags = src->acFlags; @@ -122,17 +122,17 @@ s32 Collider_SetBase(PlayState* play, Collider* col, Actor* actor, ColliderInit* } void Collider_ResetATBase(PlayState* play, Collider* col) { - col->otherAC = NULL; + col->at = NULL; col->atFlags &= ~(AT_HIT | AT_BOUNCED); } void Collider_ResetACBase(PlayState* play, Collider* col) { - col->otherAT = NULL; + col->ac = NULL; col->acFlags &= ~(AC_HIT | AC_BOUNCED); } void Collider_ResetOCBase(PlayState* play, Collider* col) { - col->otherOC = NULL; + col->oc = NULL; col->ocFlags1 &= ~OC1_HIT; col->ocFlags2 &= ~OC2_HIT_PLAYER; } @@ -1150,7 +1150,7 @@ s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Coll } ASSERT(collider->shape < COLSHAPE_MAX, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", "../z_collision_check.c", 2997); sATResetFuncs[collider->shape](play, collider); - if (collider->self != NULL && collider->self->update == NULL) { + if (collider->actor != NULL && collider->actor->update == NULL) { return -1; } if (colChkCtx->colATCount >= COLLISION_CHECK_AT_MAX) { @@ -1177,7 +1177,7 @@ s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colChkCtx, return -1; } sATResetFuncs[collider->shape](play, collider); - if (collider->self != NULL && collider->self->update == NULL) { + if (collider->actor != NULL && collider->actor->update == NULL) { return -1; } if (colChkCtx->sacFlags & SAC_ENABLE) { @@ -1218,7 +1218,7 @@ s32 CollisionCheck_SetAC(PlayState* play, CollisionCheckContext* colChkCtx, Coll } ASSERT(collider->shape < COLSHAPE_MAX, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", "../z_collision_check.c", 3114); sACResetFuncs[collider->shape](play, collider); - if (collider->self != NULL && collider->self->update == NULL) { + if (collider->actor != NULL && collider->actor->update == NULL) { return -1; } if (colChkCtx->colACCount >= COLLISION_CHECK_AC_MAX) { @@ -1245,7 +1245,7 @@ s32 CollisionCheck_SetAC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, return -1; } sACResetFuncs[collider->shape](play, collider); - if (collider->self != NULL && collider->self->update == NULL) { + if (collider->actor != NULL && collider->actor->update == NULL) { return -1; } if (colChkCtx->sacFlags & SAC_ENABLE) { @@ -1288,7 +1288,7 @@ s32 CollisionCheck_SetOC(PlayState* play, CollisionCheckContext* colChkCtx, Coll ASSERT(collider->shape < COLSHAPE_MAX, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", "../z_collision_check.c", 3229); sOCResetFuncs[collider->shape](play, collider); - if (collider->self != NULL && collider->self->update == NULL) { + if (collider->actor != NULL && collider->actor->update == NULL) { return -1; } if (colChkCtx->colOCCount >= COLLISION_CHECK_OC_MAX) { @@ -1315,7 +1315,7 @@ s32 CollisionCheck_SetOC_SAC(PlayState* play, CollisionCheckContext* colChkCtx, } ASSERT(collider->shape < COLSHAPE_MAX, "pcl_obj->data_type <= CL_DATA_LBL_SWRD", "../z_collision_check.c", 3274); sOCResetFuncs[collider->shape](play, collider); - if (collider->self != NULL && collider->self->update == NULL) { + if (collider->actor != NULL && collider->actor->update == NULL) { return -1; } if (colChkCtx->sacFlags & SAC_ENABLE) { @@ -1535,36 +1535,36 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c if (flags == TOUCH_SFX_NORMAL && collider->colType != COLTYPE_METAL) { EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos); - if (collider->self == NULL) { + if (collider->actor == NULL) { Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->self->projectedPos, 4, &gSfxDefaultFreqAndVolScale, + Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else if (flags == TOUCH_SFX_NORMAL) { // collider->colType == COLTYPE_METAL EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_METAL, hitPos); - if (collider->self == NULL) { + if (collider->actor == NULL) { CollisionCheck_SpawnShieldParticlesMetal(play, hitPos); } else { - CollisionCheck_SpawnShieldParticlesMetalSfx(play, hitPos, &collider->self->projectedPos); + CollisionCheck_SpawnShieldParticlesMetalSfx(play, hitPos, &collider->actor->projectedPos); } } else if (flags == TOUCH_SFX_HARD) { EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos); - if (collider->self == NULL) { + if (collider->actor == NULL) { Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->self->projectedPos, 4, &gSfxDefaultFreqAndVolScale, + Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } else if (flags == TOUCH_SFX_WOOD) { EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_DUST, hitPos); - if (collider->self == NULL) { + if (collider->actor == NULL) { Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->self->projectedPos, 4, + Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &collider->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } @@ -1574,18 +1574,18 @@ void CollisionCheck_HitSolid(PlayState* play, ColliderElement* elem, Collider* c * Plays a hit sound effect for AT colliders attached to Player based on the AC element's elemType. */ s32 CollisionCheck_SwordHitAudio(Collider* atCol, ColliderElement* acElem) { - if (atCol->self != NULL && atCol->self->category == ACTORCAT_PLAYER) { + if (atCol->actor != NULL && atCol->actor->category == ACTORCAT_PLAYER) { if (acElem->elemType == ELEMTYPE_UNK0) { - Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE, &atCol->self->projectedPos, 4, &gSfxDefaultFreqAndVolScale, + Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if (acElem->elemType == ELEMTYPE_UNK1) { - Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &atCol->self->projectedPos, 4, &gSfxDefaultFreqAndVolScale, - &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); + Audio_PlaySfxGeneral(NA_SE_IT_SWORD_STRIKE_HARD, &atCol->actor->projectedPos, 4, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if (acElem->elemType == ELEMTYPE_UNK2) { - Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &atCol->self->projectedPos, 4, + Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else if (acElem->elemType == ELEMTYPE_UNK3) { - Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &atCol->self->projectedPos, 4, + Audio_PlaySfxGeneral(NA_SE_PL_WALK_GROUND - SFX_FLAG, &atCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } @@ -1654,19 +1654,19 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* atCol, ColliderElement if (!(atElem->toucherFlags & TOUCH_AT_HITMARK) && atElem->toucherFlags & TOUCH_DREW_HITMARK) { return; } - if (acCol->self != NULL) { + if (acCol->actor != NULL) { sBloodFuncs[sHitInfo[acCol->colType].blood](play, acCol, hitPos); } - if (acCol->self != NULL) { + if (acCol->actor != NULL) { if (sHitInfo[acCol->colType].effect == HIT_SOLID) { CollisionCheck_HitSolid(play, atElem, acCol, hitPos); } else if (sHitInfo[acCol->colType].effect == HIT_WOOD) { - if (atCol->self == NULL) { + if (atCol->actor == NULL) { CollisionCheck_SpawnShieldParticles(play, hitPos); Audio_PlaySfxGeneral(NA_SE_IT_REFLECTION_WOOD, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &atCol->self->projectedPos); + CollisionCheck_SpawnShieldParticlesWood(play, hitPos, &atCol->actor->projectedPos); } } else if (sHitInfo[acCol->colType].effect != HIT_NONE) { EffectSsHitMark_SpawnFixedScale(play, sHitInfo[acCol->colType].effect, hitPos); @@ -1676,11 +1676,11 @@ void CollisionCheck_HitEffects(PlayState* play, Collider* atCol, ColliderElement } } else { EffectSsHitMark_SpawnFixedScale(play, EFFECT_HITMARK_WHITE, hitPos); - if (acCol->self == NULL) { + if (acCol->actor == NULL) { Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } else { - Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &acCol->self->projectedPos, 4, &gSfxDefaultFreqAndVolScale, + Audio_PlaySfxGeneral(NA_SE_IT_SHIELD_BOUND, &acCol->actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } @@ -1699,26 +1699,26 @@ void CollisionCheck_SetBounce(Collider* atCol, Collider* acCol) { */ s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* atCol, ColliderElement* atElem, Vec3f* atPos, Collider* acCol, ColliderElement* acElem, Vec3f* acPos, Vec3f* hitPos) { - if (acCol->acFlags & AC_HARD && atCol->self != NULL && acCol->self != NULL) { + if (acCol->acFlags & AC_HARD && atCol->actor != NULL && acCol->actor != NULL) { CollisionCheck_SetBounce(atCol, acCol); } if (!(acElem->bumperFlags & BUMP_NO_AT_INFO)) { atCol->atFlags |= AT_HIT; - atCol->otherAC = acCol->self; + atCol->at = acCol->actor; atElem->atHit = acCol; atElem->atHitInfo = acElem; atElem->toucherFlags |= TOUCH_HIT; - if (atCol->self != NULL) { - atCol->self->colChkInfo.atHitEffect = acElem->bumper.effect; + if (atCol->actor != NULL) { + atCol->actor->colChkInfo.atHitEffect = acElem->bumper.effect; } } acCol->acFlags |= AC_HIT; - acCol->otherAT = atCol->self; + acCol->ac = atCol->actor; acElem->acHit = atCol; acElem->acHitInfo = atElem; acElem->bumperFlags |= BUMP_HIT; - if (acCol->self != NULL) { - acCol->self->colChkInfo.acHitEffect = atElem->toucher.effect; + if (acCol->actor != NULL) { + acCol->actor->colChkInfo.acHitEffect = atElem->toucher.effect; } acElem->bumper.hitPos.x = hitPos->x; acElem->bumper.hitPos.y = hitPos->y; @@ -2584,7 +2584,7 @@ void CollisionCheck_SetHitEffects(PlayState* play, CollisionCheckContext* colChk Collider* acCol = *acColP; if (acCol != NULL && acCol->acFlags & AC_ON) { - if (acCol->self != NULL && acCol->self->update == NULL) { + if (acCol->actor != NULL && acCol->actor->update == NULL) { continue; } sColChkApplyFuncs[acCol->shape](play, colChkCtx, acCol); @@ -2633,11 +2633,11 @@ void CollisionCheck_AC(PlayState* play, CollisionCheckContext* colChkCtx, Collid Collider* acCol = *acColP; if (acCol != NULL && acCol->acFlags & AC_ON) { - if (acCol->self != NULL && acCol->self->update == NULL) { + if (acCol->actor != NULL && acCol->actor->update == NULL) { continue; } if ((acCol->acFlags & atCol->atFlags & AC_TYPE_ALL) && (atCol != acCol)) { - if (!(atCol->atFlags & AT_SELF) && atCol->self != NULL && acCol->self == atCol->self) { + if (!(atCol->atFlags & AT_SELF) && atCol->actor != NULL && acCol->actor == atCol->actor) { continue; } sACVsFuncs[atCol->shape][acCol->shape](play, colChkCtx, atCol, acCol); @@ -2662,7 +2662,7 @@ void CollisionCheck_AT(PlayState* play, CollisionCheckContext* colChkCtx) { Collider* atCol = *atColP; if (atCol != NULL && atCol->atFlags & AT_ON) { - if (atCol->self != NULL && atCol->self->update == NULL) { + if (atCol->actor != NULL && atCol->actor->update == NULL) { continue; } CollisionCheck_AC(play, colChkCtx, atCol); @@ -2707,18 +2707,18 @@ void CollisionCheck_SetOCvsOC(Collider* leftCol, ColliderElement* leftElem, Vec3 f32 inverseTotalMass; f32 xDelta; f32 zDelta; - Actor* leftActor = leftCol->self; - Actor* rightActor = rightCol->self; + Actor* leftActor = leftCol->actor; + Actor* rightActor = rightCol->actor; s32 rightMassType; s32 leftMassType; leftCol->ocFlags1 |= OC1_HIT; - leftCol->otherOC = rightActor; + leftCol->oc = rightActor; leftElem->ocElemFlags |= OCELEM_HIT; if (rightCol->ocFlags2 & OC2_TYPE_PLAYER) { leftCol->ocFlags2 |= OC2_HIT_PLAYER; } - rightCol->otherOC = leftActor; + rightCol->oc = leftActor; rightCol->ocFlags1 |= OC1_HIT; rightElem->ocElemFlags |= OCELEM_HIT; if (leftCol->ocFlags2 & OC2_TYPE_PLAYER) { @@ -2897,7 +2897,7 @@ s32 CollisionCheck_Incompatible(Collider* left, Collider* right) { ((right->ocFlags2 & OC2_UNK1) && (left->ocFlags2 & OC2_UNK2))) { return true; } - if (left->self == right->self) { + if (left->actor == right->actor) { return true; } return false; @@ -3038,7 +3038,7 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colChkCt DamageTable* tbl; f32 damage; - if (col->self == NULL || !(col->acFlags & AC_HIT)) { + if (col->actor == NULL || !(col->acFlags & AC_HIT)) { return; } if (!(elem->bumperFlags & BUMP_HIT) || elem->bumperFlags & BUMP_NO_DAMAGE) { @@ -3046,7 +3046,7 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colChkCt } ASSERT(elem->acHitInfo != NULL, "pclobj_elem->ac_hit_elem != NULL", "../z_collision_check.c", 6493); - tbl = col->self->colChkInfo.damageTable; + tbl = col->actor->colChkInfo.damageTable; if (tbl == NULL) { damage = (f32)elem->acHitInfo->toucher.damage - elem->bumper.defense; if (damage < 0) { @@ -3063,10 +3063,10 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colChkCt } damage = tbl->table[i] & 0xF; - col->self->colChkInfo.damageEffect = tbl->table[i] >> 4 & 0xF; + col->actor->colChkInfo.damageEffect = tbl->table[i] >> 4 & 0xF; } if (!(col->acFlags & AC_HARD)) { - col->self->colChkInfo.damage += damage; + col->actor->colChkInfo.damage += damage; } } @@ -3208,7 +3208,7 @@ s32 CollisionCheck_LineOC(PlayState* play, CollisionCheckContext* colChkCtx, Vec } exclude = false; for (i = 0; i < numExclusions; i++) { - if ((*col)->self == exclusions[i]) { + if ((*col)->actor == exclusions[i]) { exclude = true; break; } diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 0dd3c88b58..3668517d76 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -170,7 +170,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) && (this->collider.elem.atHitInfo->elemType != ELEMTYPE_UNK4)) { - touchedActor = this->collider.base.otherAC; + touchedActor = this->collider.base.at; if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_9 | ACTOR_FLAG_10))) { if (this->collider.elem.atHitInfo->bumperFlags & BUMP_HOOKABLE) { ArmsHook_AttachHookToActor(this, touchedActor); diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index eee08dfa0b..87ae49e12b 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -278,9 +278,9 @@ void BgDodoago_Update(Actor* thisx, PlayState* play) { if ((this->colliderLeft.base.ocFlags1 & OC1_HIT) || (this->colliderRight.base.ocFlags1 & OC1_HIT)) { if (this->colliderLeft.base.ocFlags1 & OC1_HIT) { - actor = this->colliderLeft.base.otherOC; + actor = this->colliderLeft.base.oc; } else { - actor = this->colliderRight.base.otherOC; + actor = this->colliderRight.base.oc; } this->colliderLeft.base.ocFlags1 &= ~OC1_HIT; this->colliderRight.base.ocFlags1 &= ~OC1_HIT; diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index fec2f2f29d..2b0af27b10 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -121,8 +121,8 @@ void BgHakaTubo_Idle(BgHakaTubo* this, PlayState* play) { this->potCollider.base.acFlags &= ~AC_HIT; // If the colliding actor is within a 50 unit radius and 50 unit height cylinder centered // on the actor's position, break the pot - if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->potCollider.base.otherAT->world.pos) < 50.0f && - (this->potCollider.base.otherAT->world.pos.y - this->dyna.actor.world.pos.y) < 50.0f) { + if (Actor_WorldDistXZToPoint(&this->dyna.actor, &this->potCollider.base.ac->world.pos) < 50.0f && + (this->potCollider.base.ac->world.pos.y - this->dyna.actor.world.pos.y) < 50.0f) { pos.x = this->dyna.actor.world.pos.x; pos.z = this->dyna.actor.world.pos.z; pos.y = this->dyna.actor.world.pos.y + 80.0f; diff --git a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c index 8cf1c78b93..1d87b953f6 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c +++ b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c @@ -341,7 +341,7 @@ void BgIceShelter_Idle(BgIceShelter* this, PlayState* play) { if (this->cylinder1.base.acFlags & AC_HIT) { this->cylinder1.base.acFlags &= ~AC_HIT; - if ((this->cylinder1.base.otherAT != NULL) && (this->cylinder1.base.otherAT->id == ACTOR_EN_ICE_HONO)) { + if ((this->cylinder1.base.ac != NULL) && (this->cylinder1.base.ac->id == ACTOR_EN_ICE_HONO)) { if (type == RED_ICE_KING_ZORA) { if (this->dyna.actor.parent != NULL) { this->dyna.actor.parent->freezeTimer = 50; diff --git a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c index d1b3d4ce6f..a6bf3d20da 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c +++ b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c @@ -152,8 +152,8 @@ void BgJyaHaheniron_ChairCrumble(BgJyaHaheniron* this, PlayState* play) { Actor_UpdateBgCheckInfo(play, &this->actor, 5.0f, 8.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_7); if ((this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_WALL)) || - ((this->collider.base.atFlags & AT_HIT) && (this->collider.base.otherAC != NULL) && - (this->collider.base.otherAC->category == ACTORCAT_PLAYER))) { + ((this->collider.base.atFlags & AT_HIT) && (this->collider.base.at != NULL) && + (this->collider.base.at->category == ACTORCAT_PLAYER))) { vec.x = -Rand_ZeroOne() * this->actor.velocity.x; vec.y = -Rand_ZeroOne() * this->actor.velocity.y; vec.z = -Rand_ZeroOne() * this->actor.velocity.z; diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c index c02729d412..fb97835f9b 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c +++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c @@ -244,7 +244,7 @@ void func_808992E8(BgJyaIronobj* this, PlayState* play) { s32 i; if (this->colCylinder.base.acFlags & AC_HIT) { - actor = this->colCylinder.base.otherAT; + actor = this->colCylinder.base.ac; this->colCylinder.base.acFlags &= ~AC_HIT; if (actor != NULL && actor->id == ACTOR_EN_IK) { particleFunc[this->dyna.actor.params & 1](this, play, (EnIk*)actor); diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index fce8fd2997..9f321470a9 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -98,7 +98,7 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) { } } if ((this->collider.base.acFlags & AC_HIT) && - (ABS((s16)(this->collider.base.otherAT->world.rot.y - this->actor.shape.rot.y)) > 0x5000)) { + (ABS((s16)(this->collider.base.ac->world.rot.y - this->actor.shape.rot.y)) > 0x5000)) { this->collider.base.acFlags &= ~AC_HIT; if (this->framesUntilDisable == -1) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_AMOS_DAMAGE); diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index e42ec470b8..099754054c 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -215,13 +215,13 @@ void func_808B7BCC(BgSpot18Basket* this, PlayState* play) { this->dyna.actor.world.pos.z = (Math_CosS(this->unk_20E) * this->unk_208) + this->dyna.actor.home.pos.z; if (this->colliderJntSph.base.acFlags & AC_HIT) { - colliderBaseAc = this->colliderJntSph.base.otherAT; + colliderBaseAc = this->colliderJntSph.base.ac; if (colliderBaseAc != NULL) { positionDiff = colliderBaseAc->world.pos.y - this->dyna.actor.world.pos.y; if (positionDiff > 120.0f && positionDiff < 200.0f) { - if (Math3D_Dist2DSq(colliderBaseAc->world.pos.z, this->colliderJntSph.base.otherAT->world.pos.x, + if (Math3D_Dist2DSq(colliderBaseAc->world.pos.z, this->colliderJntSph.base.ac->world.pos.x, this->dyna.actor.world.pos.z, this->dyna.actor.world.pos.x) < SQ(32.0f)) { OnePointCutscene_Init(play, 4210, 240, &this->dyna.actor, CAM_ID_MAIN); func_808B7D38(this); diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 2009a27ea2..a550568369 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -1068,7 +1068,7 @@ void BossVa_BodyPhase1(BossVa* this, PlayState* play) { if (this->colliderBody.base.atFlags & AT_HIT) { this->colliderBody.base.atFlags &= ~AT_HIT; - if (this->colliderBody.base.otherAC == &player->actor) { + if (this->colliderBody.base.at == &player->actor) { func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); } } @@ -1136,7 +1136,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { if (this->colliderBody.base.acFlags & AC_HIT) { this->colliderBody.base.acFlags &= ~AC_HIT; - if (this->colliderBody.base.otherAT->id == ACTOR_EN_BOOM) { + if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) { sPhase2Timer &= 0xFE00; Actor_SetColorFilter(&this->actor, 0, 255, 0, 160); this->colliderBody.elem.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK; @@ -1159,7 +1159,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) { this->colliderBody.base.atFlags &= ~AT_HIT; sPhase2Timer = (sPhase2Timer + 0x18) & 0xFFF0; - if (this->colliderBody.base.otherAC == &player->actor) { + if (this->colliderBody.base.at == &player->actor) { func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); } @@ -1234,7 +1234,7 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) { this->bodyGlow = (s16)(Math_SinS(this->unk_1B0) * 50.0f) + 150; if (this->colliderBody.base.atFlags & AT_HIT) { this->colliderBody.base.atFlags &= ~AT_HIT; - if (this->colliderBody.base.otherAC == &player->actor) { + if (this->colliderBody.base.at == &player->actor) { func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); this->actor.world.rot.y += (s16)Rand_CenteredFloat(0x2EE0) + 0x8000; Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); @@ -1355,7 +1355,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { this->bodyGlow = (s16)(Math_SinS(this->unk_1B0) * 50.0f) + 150; if (this->colliderBody.base.atFlags & AT_HIT) { this->colliderBody.base.atFlags &= ~AT_HIT; - if (this->colliderBody.base.otherAC == &player->actor) { + if (this->colliderBody.base.at == &player->actor) { func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); this->actor.world.rot.y += (s16)Rand_CenteredFloat(0x2EE0) + 0x8000; Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); @@ -1396,8 +1396,8 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_BALINADE_FAINT); } } - } else if (this->colliderBody.base.otherAT->id == ACTOR_EN_BOOM) { - boomerang = (EnBoom*)this->colliderBody.base.otherAT; + } else if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) { + boomerang = (EnBoom*)this->colliderBody.base.ac; boomerang->returnTimer = 0; boomerang->moveTo = &player->actor; boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer; @@ -2541,12 +2541,11 @@ void BossVa_BariPhase3Attack(BossVa* this, PlayState* play) { Math_SmoothStepToS(&this->vaBariUnused.z, this->vaBariUnused.x, 1, 0x1E, 0); this->vaBariUnused.y += this->vaBariUnused.z; if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderSph.base.atFlags & AT_HIT)) { - if ((this->colliderLightning.base.otherAC == &player->actor) || - (this->colliderSph.base.otherAC == &player->actor)) { + if ((this->colliderLightning.base.at == &player->actor) || (this->colliderSph.base.at == &player->actor)) { func_8002F71C(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer, 8.0f); Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); - this->colliderSph.base.otherAC = NULL; - this->colliderLightning.base.otherAC = NULL; + this->colliderSph.base.at = NULL; + this->colliderLightning.base.at = NULL; } this->colliderLightning.base.atFlags &= ~AT_HIT; @@ -2555,8 +2554,8 @@ void BossVa_BariPhase3Attack(BossVa* this, PlayState* play) { if (this->colliderSph.base.acFlags & AC_HIT) { this->colliderSph.base.acFlags &= ~AC_HIT; - if ((this->colliderSph.base.otherAT->id == ACTOR_EN_BOOM) && (sp52 >= 128)) { - boomerang = (EnBoom*)this->colliderSph.base.otherAT; + if ((this->colliderSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 128)) { + boomerang = (EnBoom*)this->colliderSph.base.ac; boomerang->returnTimer = 0; boomerang->moveTo = &player->actor; boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer; @@ -2637,12 +2636,11 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { } if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderSph.base.atFlags & AT_HIT)) { - if ((this->colliderLightning.base.otherAC == &player->actor) || - (this->colliderSph.base.otherAC == &player->actor)) { + if ((this->colliderLightning.base.at == &player->actor) || (this->colliderSph.base.at == &player->actor)) { func_8002F71C(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer, 8.0f); Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); - this->colliderSph.base.otherAC = NULL; - this->colliderLightning.base.otherAC = NULL; + this->colliderSph.base.at = NULL; + this->colliderLightning.base.at = NULL; } this->colliderLightning.base.atFlags &= ~AT_HIT; @@ -2670,8 +2668,8 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) { if (this->colliderSph.base.acFlags & AC_HIT) { this->colliderSph.base.acFlags &= ~AC_HIT; - if ((this->colliderSph.base.otherAT->id == ACTOR_EN_BOOM) && (sp52 >= 64)) { - boomerang = (EnBoom*)this->colliderSph.base.otherAT; + if ((this->colliderSph.base.ac->id == ACTOR_EN_BOOM) && (sp52 >= 64)) { + boomerang = (EnBoom*)this->colliderSph.base.ac; boomerang->returnTimer = 0; boomerang->moveTo = &player->actor; boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer; @@ -2812,8 +2810,8 @@ void BossVa_Update(Actor* thisx, PlayState* play2) { case BOSSVA_BODY: if (this->colliderBody.base.acFlags & AC_HIT) { this->colliderBody.base.acFlags &= ~AC_HIT; - if (this->colliderBody.base.otherAT->id == ACTOR_EN_BOOM) { - boomerang = (EnBoom*)this->colliderBody.base.otherAT; + if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) { + boomerang = (EnBoom*)this->colliderBody.base.ac; boomerang->returnTimer = 0; } } diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index 93e8962427..205a5b33a3 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -372,7 +372,7 @@ void EnAm_Sleep(EnAm* this, PlayState* play) { Player* player = GET_PLAYER(play); if ((this->unk_258 != 0) || - ((this->hurtCollider.base.ocFlags1 & OC1_HIT) && (this->hurtCollider.base.otherOC == &player->actor)) || + ((this->hurtCollider.base.ocFlags1 & OC1_HIT) && (this->hurtCollider.base.oc == &player->actor)) || (this->hurtCollider.base.acFlags & AC_HIT)) { this->hurtCollider.base.acFlags &= ~AC_HIT; @@ -679,8 +679,7 @@ void EnAm_Statue(EnAm* this, PlayState* play) { } if (this->hurtCollider.base.ocFlags1 & OC1_HIT) { - moveDir = - Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &this->hurtCollider.base.otherOC->world.pos) - temp158f; + moveDir = Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &this->hurtCollider.base.oc->world.pos) - temp158f; } if ((this->dyna.unk_150 == 0.0f) || (this->unk_258 == 0) || @@ -910,14 +909,14 @@ void EnAm_Update(Actor* thisx, PlayState* play) { if (this->hitCollider.base.atFlags & AT_HIT) { Player* player = GET_PLAYER(play); - if (this->hitCollider.base.otherAC == &player->actor) { + if (this->hitCollider.base.at == &player->actor) { Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); } } CollisionCheck_SetAT(play, &play->colChkCtx, &this->hitCollider.base); } else { this->hitCollider.base.atFlags &= ~(AT_HIT | AT_BOUNCED); - this->hitCollider.base.otherAC = NULL; + this->hitCollider.base.at = NULL; EnAm_SetupRicochet(this, play); } } diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 3cbe36784a..e94cf17476 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -285,7 +285,7 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) { EffectSsHitMark_SpawnCustomScale(play, 0, 150, &this->actor.world.pos); if (atTouched && (this->collider.elem.atHitInfo->elemType != ELEMTYPE_UNK4)) { - hitActor = this->collider.base.otherAC; + hitActor = this->collider.base.at; if ((hitActor->update != NULL) && !(this->collider.base.atFlags & AT_BOUNCED) && (hitActor->flags & ACTOR_FLAG_14)) { diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index 9bcdfd6b0f..7baaefe9b1 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -302,7 +302,7 @@ void EnBa_SwingAtPlayer(EnBa* this, PlayState* play) { this->unk_2A8[13].y = this->unk_2A8[12].y; if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - if (this->collider.base.otherAC == &player->actor) { + if (this->collider.base.at == &player->actor) { func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f); } } diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/src/overlays/actors/ovl_En_Bili/z_en_bili.c index c2fc58a4cd..a46b3e505e 100644 --- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -202,8 +202,8 @@ void EnBili_SetupRecoil(EnBili* this) { Animation_PlayLoop(&this->skelAnime, &gBiriDefaultAnim); } - this->actor.world.rot.y = Actor_WorldYawTowardPoint(&this->actor, &this->collider.base.otherAT->prevPos) + 0x8000; - this->actor.world.rot.x = Actor_WorldPitchTowardPoint(&this->actor, &this->collider.base.otherAT->prevPos); + this->actor.world.rot.y = Actor_WorldYawTowardPoint(&this->actor, &this->collider.base.ac->prevPos) + 0x8000; + this->actor.world.rot.x = Actor_WorldPitchTowardPoint(&this->actor, &this->collider.base.ac->prevPos); this->actionFunc = EnBili_Recoil; this->actor.speedXZ = 5.0f; } diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index ead83508a7..7237c43472 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -266,9 +266,8 @@ void EnBom_Update(Actor* thisx, PlayState* play2) { func_8002829C(play, &effPos, &effVelocity, &dustAccel, &dustColor, &dustColor, 50, 5); } - if ((this->bombCollider.base.acFlags & AC_HIT) || - ((this->bombCollider.base.ocFlags1 & OC1_HIT) && - (this->bombCollider.base.otherOC->category == ACTORCAT_ENEMY))) { + if ((this->bombCollider.base.acFlags & AC_HIT) || ((this->bombCollider.base.ocFlags1 & OC1_HIT) && + (this->bombCollider.base.oc->category == ACTORCAT_ENEMY))) { this->timer = 0; thisx->shape.rot.z = 0; } else { diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 318dbb66d5..cdfb215c5f 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -260,7 +260,7 @@ void EnBomChu_Move(EnBomChu* this, PlayState* play) { } if ((this->timer == 0) || (this->collider.base.acFlags & AC_HIT) || - ((this->collider.base.ocFlags1 & OC1_HIT) && (this->collider.base.otherOC->category != ACTORCAT_PLAYER))) { + ((this->collider.base.ocFlags1 & OC1_HIT) && (this->collider.base.oc->category != ACTORCAT_PLAYER))) { EnBomChu_Explode(this, play); return; } diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 0594f7979b..0a23ef7ca0 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -168,7 +168,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) { } else if (this->bombCollider.base.acFlags & AC_HIT) { this->bombCollider.base.acFlags &= ~AC_HIT; - if (this->bombCollider.base.otherAT->category != ACTORCAT_BOSS) { + if (this->bombCollider.base.ac->category != ACTORCAT_BOSS) { bombFlower = (EnBombf*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOMBF, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0); if (bombFlower != NULL) { @@ -367,9 +367,8 @@ void EnBombf_Update(Actor* thisx, PlayState* play) { thisx->bgCheckFlags &= ~BGCHECKFLAG_WALL; } - if ((this->bombCollider.base.acFlags & AC_HIT) || - ((this->bombCollider.base.ocFlags1 & OC1_HIT) && - (this->bombCollider.base.otherOC->category == ACTORCAT_ENEMY))) { + if ((this->bombCollider.base.acFlags & AC_HIT) || ((this->bombCollider.base.ocFlags1 & OC1_HIT) && + (this->bombCollider.base.oc->category == ACTORCAT_ENEMY))) { this->isFuseEnabled = true; this->timer = 0; } else { diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 7a5b871056..fff44153d8 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -156,11 +156,10 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) { collided = this->collider.base.atFlags & AT_HIT; collided = !!(collided); if (collided) { - if (((this->collider.base.otherAC->id == ACTOR_EN_ITEM00) || - (this->collider.base.otherAC->id == ACTOR_EN_SI))) { - this->grabbed = this->collider.base.otherAC; - if (this->collider.base.otherAC->id == ACTOR_EN_SI) { - this->collider.base.otherAC->flags |= ACTOR_FLAG_13; + if (((this->collider.base.at->id == ACTOR_EN_ITEM00) || (this->collider.base.at->id == ACTOR_EN_SI))) { + this->grabbed = this->collider.base.at; + if (this->collider.base.at->id == ACTOR_EN_SI) { + this->collider.base.at->flags |= ACTOR_FLAG_13; } } } diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index 27c0304a3b..0514148f75 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -209,7 +209,7 @@ void EnBubble_Fly(EnBubble* this, PlayState* play) { u8 bounceCount; if (this->colliderSphere.elements[1].base.bumperFlags & BUMP_HIT) { - bumpActor = this->colliderSphere.base.otherAT; + bumpActor = this->colliderSphere.base.ac; this->normalizedBumpVelocity = bumpActor->velocity; EnBubble_Vec3fNormalize(&this->normalizedBumpVelocity); this->velocityFromBump.x += (this->normalizedBumpVelocity.x * 3.0f); @@ -287,9 +287,9 @@ u32 func_809CC648(EnBubble* this) { } this->colliderSphere.base.acFlags &= ~AC_HIT; if (this->colliderSphere.elements[1].base.bumperFlags & BUMP_HIT) { - this->unk_1F0.x = this->colliderSphere.base.otherAT->velocity.x / 10.0f; - this->unk_1F0.y = this->colliderSphere.base.otherAT->velocity.y / 10.0f; - this->unk_1F0.z = this->colliderSphere.base.otherAT->velocity.z / 10.0f; + this->unk_1F0.x = this->colliderSphere.base.ac->velocity.x / 10.0f; + this->unk_1F0.y = this->colliderSphere.base.ac->velocity.y / 10.0f; + this->unk_1F0.z = this->colliderSphere.base.ac->velocity.z / 10.0f; this->graphicRotSpeed = 128.0f; this->graphicEccentricity = 0.48f; return false; diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c index 368ced47b9..47ab2e9030 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -449,7 +449,7 @@ void func_809CF984(EnBw* this, PlayState* play) { this->collider1.base.atFlags &= ~AT_HIT; this->actor.speedXZ = -6.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - if ((&player->actor == this->collider1.base.otherAC) && !(this->collider1.base.atFlags & AT_BOUNCED)) { + if ((&player->actor == this->collider1.base.at) && !(this->collider1.base.atFlags & AT_BOUNCED)) { Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); } } diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c index d48fb2ec69..6cf3425f2c 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -136,15 +136,15 @@ void EnBx_Update(Actor* thisx, PlayState* play) { if ((thisx->xzDistToPlayer <= 70.0f) || (this->collider.base.atFlags & AT_HIT) || (this->collider.base.acFlags & AC_HIT) || (this->colliderQuad.base.atFlags & AT_HIT)) { - if ((thisx->xzDistToPlayer <= 70.0f) || (&player->actor == this->collider.base.otherAC) || - (&player->actor == this->collider.base.otherAT) || (&player->actor == this->colliderQuad.base.otherAC)) { + if ((thisx->xzDistToPlayer <= 70.0f) || (&player->actor == this->collider.base.at) || + (&player->actor == this->collider.base.ac) || (&player->actor == this->colliderQuad.base.at)) { tmp33 = player->invincibilityTimer & 0xFF; tmp32 = thisx->world.rot.y; if (!(thisx->params & 0x80)) { tmp32 = thisx->yawTowardsPlayer; } - if ((&player->actor != this->collider.base.otherAC) && (&player->actor != this->collider.base.otherAT) && - (&player->actor != this->colliderQuad.base.otherAC) && (player->invincibilityTimer <= 0)) { + if ((&player->actor != this->collider.base.at) && (&player->actor != this->collider.base.ac) && + (&player->actor != this->colliderQuad.base.at) && (player->invincibilityTimer <= 0)) { if (player->invincibilityTimer < -39) { player->invincibilityTimer = 0; } else { @@ -159,9 +159,9 @@ void EnBx_Update(Actor* thisx, PlayState* play) { this->collider.base.atFlags &= ~AT_HIT; this->collider.base.acFlags &= ~AC_HIT; this->colliderQuad.base.atFlags &= ~AT_HIT; - this->colliderQuad.base.otherAC = NULL; - this->collider.base.otherAT = NULL; - this->collider.base.otherAC = NULL; + this->colliderQuad.base.at = NULL; + this->collider.base.ac = NULL; + this->collider.base.at = NULL; this->unk_14C = 0x14; } diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index 9f6a5ab0f0..6a4cddd97c 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -205,9 +205,9 @@ void EnDekunuts_SetupGasp(EnDekunuts* this) { void EnDekunuts_SetupBeDamaged(EnDekunuts* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gDekuNutsDamageAnim, -3.0f); if (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) { - this->actor.world.rot.y = this->collider.base.otherAT->world.rot.y; + this->actor.world.rot.y = this->collider.base.ac->world.rot.y; } else { - this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 0x8000; + this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } this->collider.base.acFlags &= ~AC_ON; this->actionFunc = EnDekunuts_BeDamaged; diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index a8fbafa045..ad6c1e47bd 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -650,7 +650,7 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) { if (this->colliderBody.base.atFlags & AT_HIT) { Player* player = GET_PLAYER(play); - if (this->colliderBody.base.otherAC == &player->actor) { + if (this->colliderBody.base.at == &player->actor) { Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); } } diff --git a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c index f0cd7e2ff4..942f5bdf38 100644 --- a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c +++ b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c @@ -365,7 +365,7 @@ void EnFireRock_Update(Actor* thisx, PlayState* play) { if (this->type == FIRE_ROCK_ON_FLOOR) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - if (this->collider.base.otherAC == playerActor) { + if (this->collider.base.at == playerActor) { if (!(player->stateFlags1 & PLAYER_STATE1_26)) { func_8002F758(play, thisx, 2.0f, -player->actor.world.rot.y, 3.0f, 4); } diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index d695acc5a6..caf011b107 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -391,9 +391,9 @@ void EnFloormas_SetupSmWait(EnFloormas* this) { void EnFloormas_SetupTakeDamage(EnFloormas* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f); if (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) { - this->actor.world.rot.y = this->collider.base.otherAT->world.rot.y; + this->actor.world.rot.y = this->collider.base.ac->world.rot.y; } else { - this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 0x8000; + this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x14); this->actionFunc = EnFloormas_TakeDamage; @@ -753,7 +753,7 @@ void EnFloormas_JumpAtLink(EnFloormas* this, PlayState* play) { Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND); EnFloormas_SetupLand(this); } else if ((this->actor.yDistToPlayer < -10.0f) && (this->collider.base.ocFlags1 & OC1_HIT) && - (&player->actor == this->collider.base.otherOC)) { + (&player->actor == this->collider.base.oc)) { play->grabPlayer(play, player); EnFloormas_SetupGrabLink(this, player); } diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index b5ec524089..84c37d9260 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -916,7 +916,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) { this->skelAnime.playSpeed = 1.5f; } else if (this->swordCollider.base.atFlags & AT_HIT) { this->swordCollider.base.atFlags &= ~AT_HIT; - if (&player->actor == this->swordCollider.base.otherAC) { + if (&player->actor == this->swordCollider.base.at) { func_8002F71C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f); this->spinAttackState = 2; func_8002DF54(play, &this->actor, 0x18); diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index 5123ce7d0b..144d6c5071 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -462,7 +462,7 @@ void EnHintnuts_ColliderCheck(EnHintnuts* this, PlayState* play) { if (this->collider.base.acFlags & AC_HIT) { this->collider.base.acFlags &= ~AC_HIT; Actor_SetDropFlag(&this->actor, &this->collider.elem, true); - if (this->collider.base.otherAT->id != ACTOR_EN_NUTSBALL) { + if (this->collider.base.ac->id != ACTOR_EN_NUTSBALL) { EnHintnuts_SetupBurrow(this); } else { EnHintnuts_HitByScrubProjectile1(this, play); diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index 8c028c7674..a0cad3597f 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -586,7 +586,7 @@ void func_80A75790(EnIk* this) { s16 yaw; s16 yawDiff; - yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->bodyCollider.base.otherAT->world.pos); + yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->bodyCollider.base.ac->world.pos); this->unk_2F8 = 0; yawDiff = yaw - this->actor.shape.rot.y; if (ABS(yawDiff) <= 0x4000) { @@ -753,7 +753,7 @@ void func_80A75FA0(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (this->axeCollider.base.atFlags & AT_HIT) { this->axeCollider.base.atFlags &= ~AT_HIT; - if (&player->actor == this->axeCollider.base.otherAC) { + if (&player->actor == this->axeCollider.base.at) { prevInvincibilityTimer = player->invincibilityTimer; if (player->invincibilityTimer <= 0) { if (player->invincibilityTimer < -39) { diff --git a/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/src/overlays/actors/ovl_En_Mb/z_en_mb.c index 2376347ffa..34d67aa746 100644 --- a/src/overlays/actors/ovl_En_Mb/z_en_mb.c +++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.c @@ -827,7 +827,7 @@ void EnMb_ClubAttack(EnMb* this, PlayState* play) { if (this->attackCollider.base.atFlags & AT_HIT) { this->attackCollider.base.atFlags &= ~AT_HIT; - if (this->attackCollider.base.otherAC == &player->actor) { + if (this->attackCollider.base.at == &player->actor) { u8 prevPlayerInvincibilityTimer = player->invincibilityTimer; if (player->invincibilityTimer < 0) { @@ -907,7 +907,7 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) { } if (this->attackCollider.base.atFlags & AT_HIT) { - if (this->attackCollider.base.otherAC == &player->actor) { + if (this->attackCollider.base.at == &player->actor) { if (!endCharge && !(player->stateFlags2 & PLAYER_STATE2_7)) { if (player->invincibilityTimer < 0) { if (player->invincibilityTimer < -39) { @@ -976,7 +976,7 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) { } if (this->attackCollider.base.atFlags & AT_HIT) { - if (this->attackCollider.base.otherAC == &player->actor) { + if (this->attackCollider.base.at == &player->actor) { if (!endCharge && !(player->stateFlags2 & PLAYER_STATE2_7)) { if (player->invincibilityTimer < 0) { if (player->invincibilityTimer <= -40) { diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index 9e66d2986b..db4d3bdfc8 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -562,7 +562,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) { (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { Player* player = GET_PLAYER(play); this->colQuad.base.atFlags &= ~AT_HIT; - if (!(this->colCylinder.base.acFlags & AC_HIT) && &player->actor == this->colQuad.base.otherAC) { + if (!(this->colCylinder.base.acFlags & AC_HIT) && &player->actor == this->colQuad.base.at) { if (Rand_ZeroOne() > 0.5f) { this->actor.world.rot.y += 0x2000; } else { @@ -580,7 +580,7 @@ void EnPeehat_Larva_StateSeekPlayer(EnPeehat* this, PlayState* play) { EffectSsDeadDb_Spawn(play, &pos, &zeroVec, &zeroVec, 40, 7, 255, 255, 255, 255, 255, 0, 0, 1, 9, 1); } } - if (&player->actor != this->colQuad.base.otherAC || this->colCylinder.base.acFlags & AC_HIT) { + if (&player->actor != this->colQuad.base.at || this->colCylinder.base.acFlags & AC_HIT) { if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { EffectSsDeadSound_SpawnStationary(play, &this->actor.projectedPos, NA_SE_EN_PIHAT_SM_DEAD, 1, 1, 40); } @@ -964,7 +964,7 @@ void EnPeehat_Update(Actor* thisx, PlayState* play) { } if (thisx->params != PEAHAT_TYPE_FLYING && this->colQuad.base.atFlags & AT_HIT) { this->colQuad.base.atFlags &= ~AT_HIT; - if (&player->actor == this->colQuad.base.otherAC) { + if (&player->actor == this->colQuad.base.at) { EnPeehat_SetStateAttackRecoil(this); } } diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 9b5ac95def..0b9b1cf2ed 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -264,9 +264,9 @@ void EnPoField_SetupFlee(EnPoField* this) { void EnPoField_SetupDamage(EnPoField* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gPoeFieldDamagedAnim, -6.0f); if (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) { - this->actor.world.rot.y = this->collider.base.otherAT->world.rot.y; + this->actor.world.rot.y = this->collider.base.ac->world.rot.y; } else { - this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 0x8000; + this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } this->collider.base.acFlags &= ~(AC_HIT | AC_ON); this->actor.speedXZ = 5.0f; diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index e3eec9ab0a..a87027bed0 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -300,10 +300,10 @@ void func_80AD9568(EnPoSisters* this) { void func_80AD95D8(EnPoSisters* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gPoeSistersDamagedAnim, -3.0f); - if (this->collider.base.otherAT != NULL) { + if (this->collider.base.ac != NULL) { this->actor.world.rot.y = (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) - ? this->collider.base.otherAT->world.rot.y - : Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 0x8000; + ? this->collider.base.ac->world.rot.y + : Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } if (this->unk_194 != 0) { this->actor.speedXZ = 10.0f; diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index ffa19a7a91..a7d5b34f60 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -294,9 +294,9 @@ void func_80ADE28C(EnPoh* this) { Animation_PlayOnce(&this->skelAnime, &gPoeComposerDamagedAnim); } if (this->colliderCyl.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) { - this->actor.world.rot.y = this->colliderCyl.base.otherAT->world.rot.y; + this->actor.world.rot.y = this->colliderCyl.base.ac->world.rot.y; } else { - this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCyl.base.otherAT) + 0x8000; + this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCyl.base.ac) + 0x8000; } this->colliderCyl.base.acFlags &= ~AC_ON; this->actor.speedXZ = 5.0f; diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index 6b88cfaddc..3a842575ec 100644 --- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -624,7 +624,7 @@ void EnReeba_Update(Actor* thisx, PlayState* play2) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - if ((this->collider.base.otherAC == &player->actor) && !this->isBig && (this->actionfunc != func_80AE56E0)) { + if ((this->collider.base.at == &player->actor) && !this->isBig && (this->actionfunc != func_80AE56E0)) { this->actionfunc = func_80AE5688; } } diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index 2ceb060670..c19b932e0b 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -372,7 +372,7 @@ void EnTite_Attack(EnTite* this, PlayState* play) { Animation_MorphToLoop(&this->skelAnime, &object_tite_Anim_0012E4, 4.0f); this->actor.speedXZ = -6.0f; this->actor.world.rot.y = this->actor.yawTowardsPlayer; - if (&player->actor == this->collider.base.otherAC) { + if (&player->actor == this->collider.base.at) { if (!(this->collider.base.atFlags & AT_BOUNCED)) { Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT); } diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/src/overlays/actors/ovl_En_Tp/z_en_tp.c index 622825a451..8e79324941 100644 --- a/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -248,7 +248,7 @@ void EnTp_Head_ApproachPlayer(EnTp* this, PlayState* play) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - if (&player->actor == this->collider.base.otherAC) { + if (&player->actor == this->collider.base.at) { this->timer = 1; } } @@ -385,7 +385,7 @@ void EnTp_Head_TakeOff(EnTp* this, PlayState* play) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - if (&player->actor == this->collider.base.otherAC) { + if (&player->actor == this->collider.base.at) { this->unk_15C = 1; } } @@ -439,7 +439,7 @@ void EnTp_Head_Wait(EnTp* this, PlayState* play) { if (this->actor.xzDistToPlayer < 200.0f) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - if (&player->actor == this->collider.base.otherAC) { + if (&player->actor == this->collider.base.at) { this->timer = 0; } } diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.c b/src/overlays/actors/ovl_En_Trap/z_en_trap.c index 8ae28164a9..e742cdba10 100644 --- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c +++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c @@ -143,7 +143,7 @@ void EnTrap_Update(Actor* thisx, PlayState* play) { if (this->collider.base.ocFlags1 & OC1_HIT) { this->collider.base.ocFlags1 &= ~OC1_HIT; angleToCollidedActor = - thisx->world.rot.y + Math_Vec3f_Yaw(&this->collider.base.otherOC->world.pos, &thisx->world.pos); + thisx->world.rot.y + Math_Vec3f_Yaw(&this->collider.base.oc->world.pos, &thisx->world.pos); touchingActor = true; } // Freeze the trap if hit by ice arrows: @@ -198,7 +198,7 @@ void EnTrap_Update(Actor* thisx, PlayState* play) { // If spike trap is touching an actor which is in the path of the spike trap if (touchingActor && (this->vContinue != 0.0f)) { angleToCollidedActor = - Math_Vec3f_Yaw(&thisx->world.pos, &this->collider.base.otherOC->world.pos) - thisx->world.rot.y; + Math_Vec3f_Yaw(&thisx->world.pos, &this->collider.base.oc->world.pos) - thisx->world.rot.y; if (ABS(angleToCollidedActor) < 0x1000) { this->vContinue = 0.0f; } diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index eb79027d92..435443ac28 100644 --- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -198,7 +198,7 @@ void EnTuboTrap_HandleImpact(EnTuboTrap* this, PlayState* play) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; - if (this->collider.base.otherAC == &player->actor) { + if (this->collider.base.at == &player->actor) { EnTuboTrap_SpawnEffectsOnLand(this, play); SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EV_POT_BROKEN); SfxSource_PlaySfxAtFixedWorldPos(play, &player2->actor.world.pos, 40, NA_SE_PL_BODY_HIT); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 12eb90707c..feac292e26 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -220,9 +220,9 @@ void EnWallmas_SetupReturnToCeiling(EnWallmas* this) { void EnWallmas_SetupTakeDamage(EnWallmas* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f); if (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) { - this->actor.world.rot.y = this->collider.base.otherAT->world.rot.y; + this->actor.world.rot.y = this->collider.base.ac->world.rot.y; } else { - this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 0x8000; + this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000; } Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x14); diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index 298e844fb6..33b2db3e24 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -117,7 +117,7 @@ void EnYukabyun_Update(Actor* thisx, PlayState* play) { s32 pad; if (((this->collider.base.atFlags & AT_HIT) || (this->collider.base.acFlags & AC_HIT) || - ((this->collider.base.ocFlags1 & OC1_HIT) && !(this->collider.base.otherOC->id == ACTOR_EN_YUKABYUN))) || + ((this->collider.base.ocFlags1 & OC1_HIT) && !(this->collider.base.oc->id == ACTOR_EN_YUKABYUN))) || ((this->actionfunc == func_80B43B6C) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL))) { this->collider.base.atFlags &= ~AT_HIT; this->collider.base.acFlags &= ~AC_HIT; diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index 54e20218e6..9eaef89051 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -509,7 +509,7 @@ s32 ObjSwitch_EyeIsHit(ObjSwitch* this) { s16 yawDiff; if ((this->tris.col.base.acFlags & AC_HIT) && !(this->prevColFlags & AC_HIT)) { - collidingActor = this->tris.col.base.otherAT; + collidingActor = this->tris.col.base.ac; if (collidingActor != NULL) { yawDiff = collidingActor->world.rot.y - this->dyna.actor.shape.rot.y; if (ABS(yawDiff) > 0x5000) { diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index 86858ec112..f8a78c2e8b 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -194,7 +194,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { player->unk_860 = 200; } } else if (dmgFlags & DMG_ARROW_NORMAL) { - arrow = (EnArrow*)this->colliderFlame.base.otherAT; + arrow = (EnArrow*)this->colliderFlame.base.ac; if ((arrow->actor.update != NULL) && (arrow->actor.id == ACTOR_EN_ARROW)) { arrow->actor.params = 0; arrow->collider.elem.toucher.dmgFlags = DMG_ARROW_FIRE; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index f341f514a3..eab9176bf1 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -4149,7 +4149,7 @@ s32 func_808382DC(Player* this, PlayState* play) { } if (this->cylinder.base.acFlags & AC_HIT) { - Actor* ac = this->cylinder.base.otherAT; + Actor* ac = this->cylinder.base.ac; s32 sp4C; if (ac->flags & ACTOR_FLAG_24) { @@ -8129,7 +8129,7 @@ s32 func_80842DF4(PlayState* play, Player* this) { if (temp1) { if (this->meleeWeaponAnimation < PLAYER_MWA_SPIN_ATTACK_1H) { - Actor* at = this->meleeWeaponQuads[temp1 ? 1 : 0].base.otherAC; + Actor* at = this->meleeWeaponQuads[temp1 ? 1 : 0].base.at; if ((at != NULL) && (at->id != ACTOR_EN_KANBAN)) { func_80832630(play); @@ -8683,7 +8683,7 @@ void func_80844708(Player* this, PlayState* play) { if (this->linearVelocity >= 7.0f) { if (((this->actor.bgCheckFlags & BGCHECKFLAG_PLAYER_WALL_INTERACT) && (D_8085360C < 0x2000)) || ((this->cylinder.base.ocFlags1 & OC1_HIT) && - (cylinderOc = this->cylinder.base.otherOC, + (cylinderOc = this->cylinder.base.oc, ((cylinderOc->id == ACTOR_EN_WOOD02) && (ABS((s16)(this->actor.world.rot.y - cylinderOc->yawTowardsPlayer)) > 0x6000))))) {