1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-21 22:41:14 +00:00

Revert other* names to master, split to other pr

This commit is contained in:
Dragorn421 2022-11-16 16:41:12 +01:00
parent 04123d247a
commit 353194caf4
No known key found for this signature in database
GPG key ID: 32B53D2D16FC4118
45 changed files with 162 additions and 168 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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;
}

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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;
}
}

View file

@ -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);
}
}

View file

@ -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)) {

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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 {

View file

@ -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;
}

View file

@ -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 {

View file

@ -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;
}
}
}

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);

View file

@ -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);

View file

@ -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) {

View file

@ -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) {

View file

@ -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);
}
}

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;
}
}

View file

@ -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);
}

View file

@ -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;
}
}

View file

@ -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;
}

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -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) {

View file

@ -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;

View file

@ -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))))) {