mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-09 05:43:18 -04:00
Colliders Sync Tris Quad Sphere Line (#1714)
* Tris * Quad * Sphere * Line
This commit is contained in:
+4
-4
@@ -4809,11 +4809,11 @@ void func_800BE504(Actor* actor, ColliderCylinder* cyl) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_800BE568(Actor* actor, ColliderSphere* collider) {
|
||||
if (collider->info.acHitElem->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20)) {
|
||||
actor->world.rot.y = collider->base.ac->shape.rot.y;
|
||||
void func_800BE568(Actor* actor, ColliderSphere* sph) {
|
||||
if (sph->elem.acHitElem->toucher.dmgFlags & (0x10000 | 0x2000 | 0x1000 | 0x800 | 0x20)) {
|
||||
actor->world.rot.y = sph->base.ac->shape.rot.y;
|
||||
} else {
|
||||
actor->world.rot.y = Actor_WorldYawTowardActor(collider->base.ac, actor);
|
||||
actor->world.rot.y = Actor_WorldYawTowardActor(sph->base.ac, actor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+427
-422
File diff suppressed because it is too large
Load Diff
@@ -229,7 +229,7 @@ void FireObj_Update(PlayState* play, FireObj* fire, Actor* actor) {
|
||||
} else if ((fire->collision.base.acFlags & AC_HIT) && (arrow->actor.update != NULL) &&
|
||||
(arrow->actor.id == ACTOR_EN_ARROW)) {
|
||||
arrow->actor.params = 0;
|
||||
arrow->collider.info.toucher.dmgFlags = DMG_FIRE_ARROW;
|
||||
arrow->collider.elem.toucher.dmgFlags = DMG_FIRE_ARROW;
|
||||
}
|
||||
fire->collision.dim.pos.x = fire->position.x;
|
||||
fire->collision.dim.pos.y = fire->position.y;
|
||||
|
||||
@@ -139,11 +139,11 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
||||
ArmsHook_CheckForCancel(this);
|
||||
|
||||
if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
|
||||
(this->collider.info.atHitElem->elemType != ELEMTYPE_UNK4)) {
|
||||
(this->collider.elem.atHitElem->elemType != ELEMTYPE_UNK4)) {
|
||||
Actor* touchedActor = this->collider.base.at;
|
||||
|
||||
if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_200 | ACTOR_FLAG_400))) {
|
||||
if (this->collider.info.atHitElem->bumperFlags & BUMP_HOOKABLE) {
|
||||
if (this->collider.elem.atHitElem->bumperFlags & BUMP_HOOKABLE) {
|
||||
ArmsHook_AttachHookToActor(this, touchedActor);
|
||||
if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_400)) {
|
||||
func_808C1154(this);
|
||||
|
||||
@@ -270,7 +270,7 @@ void func_809CE234(BgSpdweb* this, PlayState* play) {
|
||||
void func_809CE4C8(BgSpdweb* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
Vec3f sp40;
|
||||
ColliderTrisElement* element;
|
||||
ColliderTrisElement* trisElem;
|
||||
s16 sp3A;
|
||||
s32 i;
|
||||
f32 temp_f12;
|
||||
@@ -289,10 +289,10 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) {
|
||||
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
element = &this->collider.elements[i];
|
||||
if (element->info.bumperFlags & BUMP_HIT) {
|
||||
if (this->collider.elements[i].info.acHitElem->toucher.dmgFlags & 0x800) {
|
||||
Math_Vec3s_ToVec3f(&this->dyna.actor.home.pos, &element->info.bumper.hitPos);
|
||||
trisElem = &this->collider.elements[i];
|
||||
if (trisElem->base.bumperFlags & BUMP_HIT) {
|
||||
if (this->collider.elements[i].base.acHitElem->toucher.dmgFlags & 0x800) {
|
||||
Math_Vec3s_ToVec3f(&this->dyna.actor.home.pos, &trisElem->base.bumper.hitPos);
|
||||
func_809CEE74(this);
|
||||
return;
|
||||
}
|
||||
@@ -422,7 +422,7 @@ void func_809CEBC0(BgSpdweb* this, PlayState* play) {
|
||||
f32 sp58;
|
||||
f32 temp_f10;
|
||||
f32 temp_f18;
|
||||
ColliderTrisElement* ptr;
|
||||
ColliderTrisElement* trisElem;
|
||||
s32 i;
|
||||
Vec3f sp3C;
|
||||
f32 sp38;
|
||||
@@ -432,9 +432,9 @@ void func_809CEBC0(BgSpdweb* this, PlayState* play) {
|
||||
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) {
|
||||
ptr = &this->collider.elements[i];
|
||||
if (ptr->info.bumperFlags & BUMP_HIT) {
|
||||
Math_Vec3s_ToVec3f(&this->dyna.actor.home.pos, &ptr->info.bumper.hitPos);
|
||||
trisElem = &this->collider.elements[i];
|
||||
if (trisElem->base.bumperFlags & BUMP_HIT) {
|
||||
Math_Vec3s_ToVec3f(&this->dyna.actor.home.pos, &trisElem->base.bumper.hitPos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,16 +151,16 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
||||
Collider_SetQuad(play, &this->collider, &this->actor, &sQuadInit);
|
||||
|
||||
if (ARROW_IS_ARROW(this->actor.params)) {
|
||||
this->collider.info.toucherFlags &= ~(TOUCH_SFX_WOOD | TOUCH_SFX_HARD);
|
||||
this->collider.info.toucherFlags |= 0;
|
||||
this->collider.elem.toucherFlags &= ~(TOUCH_SFX_WOOD | TOUCH_SFX_HARD);
|
||||
this->collider.elem.toucherFlags |= 0;
|
||||
}
|
||||
|
||||
if (this->actor.params < ARROW_TYPE_NORMAL_LIT) {
|
||||
this->collider.base.atFlags = (AT_TYPE_ENEMY | AT_ON);
|
||||
} else {
|
||||
this->collider.info.toucher.dmgFlags = Actor_GetArrowDmgFlags(this->actor.params);
|
||||
this->collider.elem.toucher.dmgFlags = Actor_GetArrowDmgFlags(this->actor.params);
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_NUT) {
|
||||
this->collider.info.toucher.damage = 1;
|
||||
this->collider.elem.toucher.damage = 1;
|
||||
}
|
||||
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
@@ -351,7 +351,7 @@ void func_8088AA98(EnArrow* this, PlayState* play) {
|
||||
}
|
||||
|
||||
this->actor.params = ARROW_TYPE_NORMAL;
|
||||
this->collider.info.toucher.dmgFlags = 0x20;
|
||||
this->collider.elem.toucher.dmgFlags = 0x20;
|
||||
|
||||
if (this->actor.child != NULL) {
|
||||
Actor_Kill(this->actor.child);
|
||||
@@ -380,7 +380,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
||||
((this->actor.params == ARROW_TYPE_DEKU_BUBBLE) &&
|
||||
((this->unk_262 != 0) || (phi_a2 = (this->collider.base.atFlags & AT_HIT) != 0)))) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
if (phi_a2 && (this->collider.info.atHitElem->elemType != ELEMTYPE_UNK4) &&
|
||||
if (phi_a2 && (this->collider.elem.atHitElem->elemType != ELEMTYPE_UNK4) &&
|
||||
(this->collider.base.atFlags & AT_BOUNCED)) {
|
||||
if ((this->collider.base.at != NULL) && (this->collider.base.at->id != ACTOR_OBJ_SYOKUDAI)) {
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.prevPos);
|
||||
@@ -434,7 +434,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
||||
} else {
|
||||
EffectSsHitmark_SpawnCustomScale(play, EFFECT_HITMARK_WHITE, 150, &this->actor.world.pos);
|
||||
|
||||
if (sp50 && (this->collider.info.atHitElem->elemType != ELEMTYPE_UNK4)) {
|
||||
if (sp50 && (this->collider.elem.atHitElem->elemType != ELEMTYPE_UNK4)) {
|
||||
sp7C = this->collider.base.at;
|
||||
|
||||
if ((sp7C->update != NULL) && !(this->collider.base.atFlags & AT_BOUNCED) &&
|
||||
|
||||
@@ -331,8 +331,8 @@ void EnBat_SetupDie(EnBat* this, PlayState* play) {
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
|
||||
this->drawDmgEffAlpha = 4.0f;
|
||||
this->drawDmgEffScale = 0.45f;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x,
|
||||
this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0,
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x,
|
||||
this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0,
|
||||
CLEAR_TAG_PARAMS(CLEAR_TAG_SMALL_LIGHT_RAYS));
|
||||
} else if (this->actor.colChkInfo.damageEffect == BAD_BAT_DMGEFF_FIRE) {
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE;
|
||||
@@ -426,7 +426,7 @@ void EnBat_UpdateDamage(EnBat* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem);
|
||||
this->collider.base.atFlags &= ~AT_ON;
|
||||
|
||||
if (this->actionFunc == EnBat_DiveAttack) {
|
||||
|
||||
@@ -505,8 +505,8 @@ void EnBb_UpdateDamage(EnBb* this, PlayState* play) {
|
||||
this->collider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
|
||||
this->collider.base.atFlags &= ~AT_ON;
|
||||
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
|
||||
!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info);
|
||||
!(this->collider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem);
|
||||
this->flameScaleY = 0.0f;
|
||||
this->flameScaleX = 0.0f;
|
||||
EnBb_Thaw(this, play);
|
||||
@@ -533,8 +533,8 @@ void EnBb_UpdateDamage(EnBb* this, PlayState* play) {
|
||||
this->drawDmgEffAlpha = 4.0f;
|
||||
this->drawDmgEffScale = 0.4f;
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x,
|
||||
this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0,
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x,
|
||||
this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0,
|
||||
CLEAR_TAG_PARAMS(CLEAR_TAG_SMALL_LIGHT_RAYS));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1220,8 +1220,8 @@ void EnDeath_UpdateDamage(EnDeath* this, PlayState* play) {
|
||||
this->dmgEffectAlpha = 3.0f;
|
||||
this->dmgEffectScale = 0.8f;
|
||||
this->dmgEffect = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->coreCollider.info.bumper.hitPos.x,
|
||||
this->coreCollider.info.bumper.hitPos.y, this->coreCollider.info.bumper.hitPos.z, 0, 0, 0,
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->coreCollider.elem.bumper.hitPos.x,
|
||||
this->coreCollider.elem.bumper.hitPos.y, this->coreCollider.elem.bumper.hitPos.z, 0, 0, 0,
|
||||
4);
|
||||
}
|
||||
if (play->envCtx.lightSettingOverride == 27) {
|
||||
|
||||
@@ -154,13 +154,13 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc = EnFirefly_FlyIdle;
|
||||
} else if (this->actor.params == KEESE_ICE_FLY) {
|
||||
this->auraType = KEESE_AURA_ICE;
|
||||
this->collider.info.toucher.effect = 2; // Freeze
|
||||
this->collider.elem.toucher.effect = 2; // Freeze
|
||||
this->actor.hintId = TATL_HINT_ID_ICE_KEESE;
|
||||
this->maxAltitude = this->actor.home.pos.y + 100.0f;
|
||||
this->actionFunc = EnFirefly_FlyIdle;
|
||||
} else {
|
||||
this->auraType = KEESE_AURA_NONE;
|
||||
this->collider.info.toucher.effect = 0; // Nothing
|
||||
this->collider.elem.toucher.effect = 0; // Nothing
|
||||
this->actor.hintId = TATL_HINT_ID_KEESE;
|
||||
this->maxAltitude = this->actor.home.pos.y + 100.0f;
|
||||
this->actionFunc = EnFirefly_Perch;
|
||||
@@ -186,7 +186,7 @@ void EnFirefly_SpawnIceEffects(EnFirefly* this, PlayState* play) {
|
||||
|
||||
void EnFirefly_Extinguish(EnFirefly* this) {
|
||||
this->currentType = KEESE_NORMAL;
|
||||
this->collider.info.toucher.effect = 0; // Nothing
|
||||
this->collider.elem.toucher.effect = 0; // Nothing
|
||||
this->auraType = KEESE_AURA_NONE;
|
||||
this->actor.hintId = TATL_HINT_ID_KEESE;
|
||||
}
|
||||
@@ -194,7 +194,7 @@ void EnFirefly_Extinguish(EnFirefly* this) {
|
||||
void EnFirefly_Ignite(EnFirefly* this) {
|
||||
if (this->actor.params == KEESE_FIRE_FLY) {
|
||||
this->currentType = KEESE_FIRE;
|
||||
this->collider.info.toucher.effect = 1; // Fire
|
||||
this->collider.elem.toucher.effect = 1; // Fire
|
||||
this->auraType = KEESE_AURA_FIRE;
|
||||
this->actor.hintId = TATL_HINT_ID_FIRE_KEESE;
|
||||
}
|
||||
@@ -359,8 +359,8 @@ void EnFirefly_SetupFall(EnFirefly* this, PlayState* play) {
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
|
||||
this->drawDmgEffAlpha = 4.0f;
|
||||
this->drawDmgEffScale = 0.55f;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x,
|
||||
this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0,
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x,
|
||||
this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0,
|
||||
CLEAR_TAG_PARAMS(CLEAR_TAG_SMALL_LIGHT_RAYS));
|
||||
} else if (this->actor.colChkInfo.damageEffect == KEESE_DMGEFF_FIRE) {
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FIRE;
|
||||
@@ -644,7 +644,7 @@ void EnFirefly_DisturbDiveAttack(EnFirefly* this, PlayState* play) {
|
||||
void EnFirefly_UpdateDamage(EnFirefly* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem);
|
||||
|
||||
if (this->actor.colChkInfo.damageEffect == KEESE_DMGEFF_STUN) {
|
||||
this->timer = 40;
|
||||
|
||||
@@ -98,7 +98,7 @@ void EnFuMato_Init(Actor* thisx, PlayState* play) {
|
||||
|
||||
fu = (EnFu*)this->dyna.actor.parent;
|
||||
if (fu->unk_542 == 2) {
|
||||
this->collider.info.elemType = ELEMTYPE_UNK0;
|
||||
this->collider.elem.elemType = ELEMTYPE_UNK0;
|
||||
this->collider.dim.worldSphere.radius = 30;
|
||||
} else {
|
||||
this->collider.dim.worldSphere.radius = 17;
|
||||
|
||||
@@ -1103,7 +1103,7 @@ void func_80B87C7C(EnKaizoku* this) {
|
||||
this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y;
|
||||
this->bodyCollider.elem.elemType = ELEMTYPE_UNK4;
|
||||
this->bodyCollider.base.colType = COLTYPE_NONE;
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK4;
|
||||
this->swordCollider.elem.elemType = ELEMTYPE_UNK4;
|
||||
this->action = KAIZOKU_ACTION_6;
|
||||
this->actionFunc = func_80B87D3C;
|
||||
}
|
||||
@@ -1132,7 +1132,7 @@ void func_80B87D3C(EnKaizoku* this, PlayState* play) {
|
||||
(this->picto.actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH))) {
|
||||
this->bodyCollider.elem.elemType = ELEMTYPE_UNK1;
|
||||
this->bodyCollider.base.colType = COLTYPE_HIT3;
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK2;
|
||||
this->swordCollider.elem.elemType = ELEMTYPE_UNK2;
|
||||
this->picto.actor.shape.rot.x = 0;
|
||||
this->picto.actor.world.rot.y = this->picto.actor.shape.rot.y = this->picto.actor.yawTowardsPlayer;
|
||||
this->picto.actor.speed = 0.0f;
|
||||
@@ -1148,7 +1148,7 @@ void func_80B87E28(EnKaizoku* this) {
|
||||
Actor_PlaySfx(&this->picto.actor, NA_SE_EN_TEKU_JUMP);
|
||||
this->bodyCollider.elem.elemType = ELEMTYPE_UNK4;
|
||||
this->bodyCollider.base.colType = COLTYPE_NONE;
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK4;
|
||||
this->swordCollider.elem.elemType = ELEMTYPE_UNK4;
|
||||
this->action = KAIZOKU_ACTION_7;
|
||||
this->actionFunc = func_80B87E9C;
|
||||
this->picto.actor.shape.rot.y = this->picto.actor.world.rot.y = this->picto.actor.yawTowardsPlayer;
|
||||
@@ -1658,7 +1658,7 @@ void func_80B894C0(EnKaizoku* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->picto.actor.xzDistToPlayer <= 65.0f) && ((play->gameplayFrames % 8) != 0)) {
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK2;
|
||||
this->swordCollider.elem.elemType = ELEMTYPE_UNK2;
|
||||
func_80B87F70(this);
|
||||
} else {
|
||||
func_80B87E28(this);
|
||||
@@ -1768,9 +1768,9 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
if (gSaveContext.save.saveInfo.playerData.health <= 0x10) {
|
||||
this->swordCollider.info.toucher.damage = 0;
|
||||
this->swordCollider.elem.toucher.damage = 0;
|
||||
} else {
|
||||
this->swordCollider.info.toucher.damage = 4;
|
||||
this->swordCollider.elem.toucher.damage = 4;
|
||||
}
|
||||
|
||||
if (!(this->swordCollider.base.atFlags & AT_BOUNCED) && (this->swordCollider.base.atFlags & AT_HIT)) {
|
||||
@@ -1843,7 +1843,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
||||
40);
|
||||
this->bodyCollider.elem.elemType = ELEMTYPE_UNK1;
|
||||
this->bodyCollider.base.colType = COLTYPE_HIT3;
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK2;
|
||||
this->swordCollider.elem.elemType = ELEMTYPE_UNK2;
|
||||
func_80B891B8(this);
|
||||
}
|
||||
break;
|
||||
@@ -1883,7 +1883,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
||||
Actor_ApplyDamage(&this->picto.actor);
|
||||
this->bodyCollider.elem.elemType = ELEMTYPE_UNK1;
|
||||
this->bodyCollider.base.colType = COLTYPE_HIT3;
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK4;
|
||||
this->swordCollider.elem.elemType = ELEMTYPE_UNK4;
|
||||
this->unk_2B8 = 80;
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_FROZEN_SFX;
|
||||
this->drawDmgEffScale = 0.0f;
|
||||
@@ -1924,7 +1924,7 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
||||
|
||||
this->bodyCollider.elem.elemType = ELEMTYPE_UNK1;
|
||||
this->bodyCollider.base.colType = COLTYPE_HIT3;
|
||||
this->swordCollider.info.elemType = ELEMTYPE_UNK4;
|
||||
this->swordCollider.elem.elemType = ELEMTYPE_UNK4;
|
||||
Math_Vec3f_Copy(&sp58, &this->picto.actor.focus.pos);
|
||||
for (i = 0; i < 3; i++) {
|
||||
sp58.y += Rand_ZeroFloat(20.0f);
|
||||
|
||||
@@ -395,7 +395,7 @@ void func_80A4E84C(EnMkk* this) {
|
||||
void func_80A4EBBC(EnMkk* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem);
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
func_80A4E67C(this);
|
||||
}
|
||||
|
||||
@@ -690,13 +690,13 @@ void func_8089874C(EnPeehat* this, PlayState* play) {
|
||||
if (this->colliderSphere.base.acFlags & AC_HIT) {
|
||||
this->colliderSphere.base.acFlags &= ~AC_HIT;
|
||||
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
|
||||
!(this->colliderSphere.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
|
||||
!(this->colliderSphere.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
|
||||
if (!Actor_ApplyDamage(&this->actor)) {
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
}
|
||||
|
||||
this->colliderTris.base.atFlags &= ~(AT_HIT | AT_ON);
|
||||
Actor_SetDropFlag(&this->actor, &this->colliderSphere.info);
|
||||
Actor_SetDropFlag(&this->actor, &this->colliderSphere.elem);
|
||||
func_808971DC(this, play);
|
||||
|
||||
if (this->actor.colChkInfo.damageEffect == 5) {
|
||||
@@ -728,8 +728,8 @@ void func_8089874C(EnPeehat* this, PlayState* play) {
|
||||
this->drawDmgEffAlpha = 4.0f;
|
||||
this->drawDmgEffScale = 1.1f;
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->colliderSphere.info.bumper.hitPos.x,
|
||||
this->colliderSphere.info.bumper.hitPos.y, this->colliderSphere.info.bumper.hitPos.z, 0,
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->colliderSphere.elem.bumper.hitPos.x,
|
||||
this->colliderSphere.elem.bumper.hitPos.y, this->colliderSphere.elem.bumper.hitPos.z, 0,
|
||||
0, 0, CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS));
|
||||
}
|
||||
func_800BE568(&this->actor, &this->colliderSphere);
|
||||
|
||||
@@ -1155,11 +1155,11 @@ void EnSw_Init(Actor* thisx, PlayState* play) {
|
||||
if (!ENSW_GET_3(&this->actor)) {
|
||||
this->actor.hintId = TATL_HINT_ID_SKULLWALLTULA;
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
this->collider.info.toucher.damage = 8;
|
||||
this->collider.elem.toucher.damage = 8;
|
||||
} else {
|
||||
this->actor.hintId = TATL_HINT_ID_GOLD_SKULLTULA;
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable2, &sColChkInfoInit2);
|
||||
this->collider.info.toucher.damage = 16;
|
||||
this->collider.elem.toucher.damage = 16;
|
||||
}
|
||||
|
||||
this->path =
|
||||
|
||||
@@ -944,10 +944,10 @@ void func_80895FF8(EnTite* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem);
|
||||
|
||||
if ((this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) ||
|
||||
!(this->collider.info.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
|
||||
!(this->collider.elem.acHitElem->toucher.dmgFlags & 0xDB0B3)) {
|
||||
func_80893E54(this, play);
|
||||
if (this->actor.shape.yOffset < 0.0f) {
|
||||
func_80895DE8(this);
|
||||
@@ -996,8 +996,8 @@ void func_80895FF8(EnTite* this, PlayState* play) {
|
||||
this->drawDmgEffType = ACTOR_DRAW_DMGEFF_LIGHT_ORBS;
|
||||
this->drawDmgEffAlpha = 4.0f;
|
||||
this->drawDmgEffScale = 0.5f;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.info.bumper.hitPos.x,
|
||||
this->collider.info.bumper.hitPos.y, this->collider.info.bumper.hitPos.z, 0, 0, 0,
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->collider.elem.bumper.hitPos.x,
|
||||
this->collider.elem.bumper.hitPos.y, this->collider.elem.bumper.hitPos.z, 0, 0, 0,
|
||||
CLEAR_TAG_PARAMS(CLEAR_TAG_LARGE_LIGHT_RAYS));
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ s32 func_80A35510(ObjBell* this, s32 arg1) {
|
||||
|
||||
this->unk_21C = CLAMP(this->unk_21C, 0.0f, 18000.0f);
|
||||
if (phi_a3 == true) {
|
||||
Math_Vec3s_ToVec3f(&bumperPos, &this->collider2.info.bumper.hitPos);
|
||||
Math_Vec3s_ToVec3f(&bumperPos, &this->collider2.elem.bumper.hitPos);
|
||||
Math_Vec3f_Copy(&worldPos, &this->dyna.actor.world.pos);
|
||||
this->dyna.actor.world.rot.y = Math_Vec3f_Yaw(&bumperPos, &worldPos);
|
||||
if (this->unk_20C <= 0x4000 && this->unk_20C >= -0x4000) {
|
||||
|
||||
@@ -617,7 +617,7 @@ void func_80B30808(ObjSpidertent* this, PlayState* play) {
|
||||
ObjSpidertentStruct* ptr2 = &D_80B31350[OBJSPIDERTENT_GET_1(&this->dyna.actor)];
|
||||
Vec3f sp70;
|
||||
Vec3s* hitPos;
|
||||
ColliderTrisElement* ptr;
|
||||
ColliderTrisElement* trisElem;
|
||||
f32 temp_f0;
|
||||
s32 phi_s1;
|
||||
Vec3f sp54;
|
||||
@@ -633,12 +633,12 @@ void func_80B30808(ObjSpidertent* this, PlayState* play) {
|
||||
phi_f20 = FLT_MAX;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) {
|
||||
ptr = &this->collider.elements[i];
|
||||
trisElem = &this->collider.elements[i];
|
||||
|
||||
if (ptr->info.bumperFlags & BUMP_HIT) {
|
||||
sp54.x = ptr->info.bumper.hitPos.x;
|
||||
sp54.y = ptr->info.bumper.hitPos.y;
|
||||
sp54.z = ptr->info.bumper.hitPos.z;
|
||||
if (trisElem->base.bumperFlags & BUMP_HIT) {
|
||||
sp54.x = trisElem->base.bumper.hitPos.x;
|
||||
sp54.y = trisElem->base.bumper.hitPos.y;
|
||||
sp54.z = trisElem->base.bumper.hitPos.z;
|
||||
|
||||
temp_f0 = Math3D_Vec3fDistSq(&sp54, &player->actor.world.pos);
|
||||
if (temp_f0 < phi_f20) {
|
||||
@@ -649,7 +649,7 @@ void func_80B30808(ObjSpidertent* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (phi_s4 >= 0) {
|
||||
hitPos = &this->collider.elements[phi_s4].info.bumper.hitPos;
|
||||
hitPos = &this->collider.elements[phi_s4].base.bumper.hitPos;
|
||||
|
||||
sp70.x = hitPos->x;
|
||||
sp70.y = hitPos->y;
|
||||
|
||||
@@ -170,7 +170,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
} else {
|
||||
s32 interaction = OBJ_SYOKUDAI_INTERACTION_NONE;
|
||||
u32 flameColliderHurtboxDmgFlags = 0;
|
||||
u32 flameColliderACDmgFlags = 0;
|
||||
|
||||
player = GET_PLAYER(play);
|
||||
|
||||
@@ -193,7 +193,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
}
|
||||
if (this->flameCollider.base.acFlags & AC_HIT) {
|
||||
flameColliderHurtboxDmgFlags = this->flameCollider.elem.acHitElem->toucher.dmgFlags;
|
||||
flameColliderACDmgFlags = this->flameCollider.elem.acHitElem->toucher.dmgFlags;
|
||||
if (this->flameCollider.elem.acHitElem->toucher.dmgFlags & 0x820) {
|
||||
interaction = OBJ_SYOKUDAI_INTERACTION_ARROW_FA;
|
||||
}
|
||||
@@ -215,14 +215,13 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
|
||||
} else if (player->unk_B28 < 0xC8) {
|
||||
player->unk_B28 = 0xC8;
|
||||
}
|
||||
} else if (flameColliderHurtboxDmgFlags & 0x20) {
|
||||
Actor* flameColliderHurtboxActor = this->flameCollider.base.ac;
|
||||
} else if (flameColliderACDmgFlags & 0x20) {
|
||||
Actor* flameColliderACActor = this->flameCollider.base.ac;
|
||||
|
||||
if ((flameColliderHurtboxActor->update != NULL) &&
|
||||
(flameColliderHurtboxActor->id == ACTOR_EN_ARROW)) {
|
||||
if ((flameColliderACActor->update != NULL) && (flameColliderACActor->id == ACTOR_EN_ARROW)) {
|
||||
|
||||
flameColliderHurtboxActor->params = 0;
|
||||
((EnArrow*)flameColliderHurtboxActor)->collider.info.toucher.dmgFlags = 0x800;
|
||||
flameColliderACActor->params = 0;
|
||||
((EnArrow*)flameColliderACActor)->collider.elem.toucher.dmgFlags = 0x800;
|
||||
}
|
||||
}
|
||||
if ((this->snuffTimer > OBJ_SYOKUDAI_SNUFF_NEVER) &&
|
||||
@@ -232,8 +231,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
|
||||
this->snuffTimer = OBJ_SYOKUDAI_SNUFF_TIMER_INITIAL(groupSize);
|
||||
}
|
||||
} else if ((type != OBJ_SYOKUDAI_TYPE_SWITCH_CAUSES_FLAME) &&
|
||||
(((interaction >= OBJ_SYOKUDAI_INTERACTION_ARROW_FA) &&
|
||||
(flameColliderHurtboxDmgFlags & 0x800)) ||
|
||||
(((interaction >= OBJ_SYOKUDAI_INTERACTION_ARROW_FA) && (flameColliderACDmgFlags & 0x800)) ||
|
||||
((interaction <= OBJ_SYOKUDAI_INTERACTION_STICK) && (player->unk_B28 != 0)))) {
|
||||
if ((interaction < OBJ_SYOKUDAI_INTERACTION_NONE) && (player->unk_B28 < 0xC8)) {
|
||||
player->unk_B28 = 0xC8;
|
||||
|
||||
@@ -5399,13 +5399,13 @@ PlayerMeleeWeaponAnimation func_808335F4(Player* this) {
|
||||
}
|
||||
|
||||
void func_80833728(Player* this, s32 index, u32 dmgFlags, s32 damage) {
|
||||
this->meleeWeaponQuads[index].info.toucher.dmgFlags = dmgFlags;
|
||||
this->meleeWeaponQuads[index].info.toucher.damage = damage;
|
||||
this->meleeWeaponQuads[index].elem.toucher.dmgFlags = dmgFlags;
|
||||
this->meleeWeaponQuads[index].elem.toucher.damage = damage;
|
||||
|
||||
if (dmgFlags == DMG_DEKU_STICK) {
|
||||
this->meleeWeaponQuads[index].info.toucherFlags = (TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_WOOD);
|
||||
this->meleeWeaponQuads[index].elem.toucherFlags = (TOUCH_ON | TOUCH_NEAREST | TOUCH_SFX_WOOD);
|
||||
} else {
|
||||
this->meleeWeaponQuads[index].info.toucherFlags = (TOUCH_ON | TOUCH_NEAREST);
|
||||
this->meleeWeaponQuads[index].elem.toucherFlags = (TOUCH_ON | TOUCH_NEAREST);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user