mirror of
https://github.com/zeldaret/mm.git
synced 2024-11-26 22:30:58 +00:00
Colliders Sync Tris Quad Sphere Line (#1714)
* Tris * Quad * Sphere * Line
This commit is contained in:
parent
5dd4310285
commit
1ddc836c8e
@ -864,7 +864,7 @@ void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph);
|
||||
void func_800BE33C(Vec3f* arg0, Vec3f* arg1, Vec3s* dst, s32 arg3);
|
||||
void func_800BE3D0(Actor* actor, s16 angle, Vec3s* arg2);
|
||||
void func_800BE504(Actor* actor, ColliderCylinder* cyl);
|
||||
void func_800BE568(Actor* actor, ColliderSphere* collider);
|
||||
void func_800BE568(Actor* actor, ColliderSphere* sph);
|
||||
void func_800BE5CC(Actor* actor, ColliderJntSph* jntSph, s32 elemIndex);
|
||||
s32 Actor_IsSmallChest(struct EnBox* chest);
|
||||
void Actor_DrawDamageEffects(struct PlayState* play, Actor* actor, Vec3f bodyPartsPos[], s16 bodyPartsCount,
|
||||
|
@ -180,26 +180,34 @@ typedef struct {
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInitToActor; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f vtx[3];
|
||||
} ColliderTrisElementDimInit; // size = 0x24
|
||||
/*
|
||||
* Tris - A collider made of triangle shaped elements
|
||||
*/
|
||||
|
||||
// collider structs
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderElement info;
|
||||
/* 0x00 */ ColliderElement base;
|
||||
/* 0x28 */ TriNorm dim;
|
||||
} ColliderTrisElement; // size = 0x5C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderElementInit info;
|
||||
/* 0x18 */ ColliderTrisElementDimInit dim;
|
||||
} ColliderTrisElementInit; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ s32 count;
|
||||
/* 0x1C */ ColliderTrisElement* elements;
|
||||
} ColliderTris; // size = 0x20
|
||||
|
||||
// init data structs
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f vtx[3];
|
||||
} ColliderTrisElementDimInit; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderElementInit base;
|
||||
/* 0x18 */ ColliderTrisElementDimInit dim;
|
||||
} ColliderTrisElementInit; // size = 0x3C
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ ColliderInit base;
|
||||
/* 0x8 */ s32 count;
|
||||
@ -212,6 +220,12 @@ typedef struct {
|
||||
/* 0xC */ ColliderTrisElementInit* elements;
|
||||
} ColliderTrisInitType1; // size = 0x10
|
||||
|
||||
/*
|
||||
* Quad - A single quad shaped collider
|
||||
*/
|
||||
|
||||
// collider structs
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f quad[4];
|
||||
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
|
||||
@ -219,40 +233,54 @@ typedef struct {
|
||||
/* 0x3C */ f32 acDist; // distance to nearest AC collision this frame.
|
||||
} ColliderQuadDim; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderElement elem;
|
||||
/* 0x40 */ ColliderQuadDim dim;
|
||||
} ColliderQuad; // size = 0x80
|
||||
|
||||
// init data structs
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f quad[4];
|
||||
} ColliderQuadDimInit; // size = 0x30
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderElement info;
|
||||
/* 0x40 */ ColliderQuadDim dim;
|
||||
} ColliderQuad; // size = 0x80
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderElementInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ ColliderQuadDimInit dim;
|
||||
} ColliderQuadInit; // size = 0x50
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitType1 base;
|
||||
/* 0x08 */ ColliderElementInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ ColliderQuadDimInit dim;
|
||||
} ColliderQuadInitType1; // size = 0x50
|
||||
|
||||
/*
|
||||
* Sphere - A single sphere shaped collider
|
||||
*/
|
||||
|
||||
// collider structs
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderElement info;
|
||||
/* 0x18 */ ColliderElement elem;
|
||||
/* 0x40 */ ColliderJntSphElementDim dim;
|
||||
} ColliderSphere; // size = 0x58
|
||||
|
||||
// init data structs
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderElementInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ ColliderJntSphElementDimInit dim;
|
||||
} ColliderSphereInit; // size = 0x2C
|
||||
|
||||
/*
|
||||
* Line collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Linef line;
|
||||
/* 0x18 */ u16 ocFlags;
|
||||
@ -538,19 +566,19 @@ s32 Collider_ResetCylinderAC(struct PlayState* play, Collider* col);
|
||||
s32 Collider_ResetCylinderOC(struct PlayState* play, Collider* col);
|
||||
s32 Collider_InitTrisElementDim(struct PlayState* play, TriNorm* dim);
|
||||
s32 Collider_DestroyTrisElementDim(struct PlayState* play, TriNorm* dim);
|
||||
s32 Collider_SetTrisElementDim(struct PlayState* play, TriNorm* dim, ColliderTrisElementDimInit* src);
|
||||
s32 Collider_InitTrisElement(struct PlayState* play, ColliderTrisElement* element);
|
||||
s32 Collider_DestroyTrisElement(struct PlayState* play, ColliderTrisElement* element);
|
||||
s32 Collider_SetTrisElement(struct PlayState* play, ColliderTrisElement* element, ColliderTrisElementInit* src);
|
||||
s32 Collider_ResetTrisElementAT(struct PlayState* play, ColliderTrisElement* element);
|
||||
s32 Collider_ResetTrisElementAC(struct PlayState* play, ColliderTrisElement* element);
|
||||
s32 Collider_ResetTrisElementOC(struct PlayState* play, ColliderTrisElement* element);
|
||||
s32 Collider_SetTrisElementDim(struct PlayState* play, TriNorm* dest, ColliderTrisElementDimInit* src);
|
||||
s32 Collider_InitTrisElement(struct PlayState* play, ColliderTrisElement* trisElem);
|
||||
s32 Collider_DestroyTrisElement(struct PlayState* play, ColliderTrisElement* trisElem);
|
||||
s32 Collider_SetTrisElement(struct PlayState* play, ColliderTrisElement* dest, ColliderTrisElementInit* src);
|
||||
s32 Collider_ResetTrisElementAT(struct PlayState* play, ColliderTrisElement* trisElem);
|
||||
s32 Collider_ResetTrisElementAC(struct PlayState* play, ColliderTrisElement* trisElem);
|
||||
s32 Collider_ResetTrisElementOC(struct PlayState* play, ColliderTrisElement* trisElem);
|
||||
s32 Collider_InitTris(struct PlayState* play, ColliderTris* tris);
|
||||
s32 Collider_FreeTris(struct PlayState* play, ColliderTris* tris);
|
||||
s32 Collider_DestroyTris(struct PlayState* play, ColliderTris* tris);
|
||||
s32 Collider_SetTrisAllocType1(struct PlayState* play, ColliderTris* tris, struct Actor* actor, ColliderTrisInitType1* src);
|
||||
s32 Collider_SetTris(struct PlayState* play, ColliderTris* triGroup, struct Actor* actor, ColliderTrisInit* src, ColliderTrisElement* tris);
|
||||
s32 Collider_InitAndSetTris(struct PlayState* play, ColliderTris* tris, struct Actor* actor, ColliderTrisInit* src, ColliderTrisElement* elements);
|
||||
s32 Collider_SetTrisAllocType1(struct PlayState* play, ColliderTris* dest, struct Actor* actor, ColliderTrisInitType1* src);
|
||||
s32 Collider_SetTris(struct PlayState* play, ColliderTris* dest, struct Actor* actor, ColliderTrisInit* src, ColliderTrisElement* trisElements);
|
||||
s32 Collider_InitAndSetTris(struct PlayState* play, ColliderTris* dest, struct Actor* actor, ColliderTrisInit* src, ColliderTrisElement* trisElements);
|
||||
s32 Collider_ResetTrisAT(struct PlayState* play, Collider* col);
|
||||
s32 Collider_ResetTrisAC(struct PlayState* play, Collider* col);
|
||||
s32 Collider_ResetTrisOC(struct PlayState* play, Collider* col);
|
||||
@ -558,27 +586,27 @@ s32 Collider_InitQuadDim(struct PlayState* play, ColliderQuadDim* dim);
|
||||
s32 Collider_DestroyQuadDim(struct PlayState* play, ColliderQuadDim* dim);
|
||||
s32 Collider_ResetQuadACDist(struct PlayState* play, ColliderQuadDim* dim);
|
||||
void Collider_SetQuadMidpoints(ColliderQuadDim* dim);
|
||||
s32 Collider_SetQuadDim(struct PlayState* play, ColliderQuadDim* dim, ColliderQuadDimInit* init);
|
||||
s32 Collider_InitQuad(struct PlayState* play, ColliderQuad* collider);
|
||||
s32 Collider_DestroyQuad(struct PlayState* play, ColliderQuad* collider);
|
||||
s32 Collider_SetQuadType1(struct PlayState* play, ColliderQuad* collider, struct Actor* actor, ColliderQuadInitType1* src);
|
||||
s32 Collider_SetQuad(struct PlayState* play, ColliderQuad* collider, struct Actor* actor, ColliderQuadInit* src);
|
||||
s32 Collider_InitAndSetQuad(struct PlayState* play, ColliderQuad* collider, struct Actor* actor, ColliderQuadInit* src);
|
||||
s32 Collider_SetQuadDim(struct PlayState* play, ColliderQuadDim* dest, ColliderQuadDimInit* src);
|
||||
s32 Collider_InitQuad(struct PlayState* play, ColliderQuad* quad);
|
||||
s32 Collider_DestroyQuad(struct PlayState* play, ColliderQuad* quad);
|
||||
s32 Collider_SetQuadType1(struct PlayState* play, ColliderQuad* dest, struct Actor* actor, ColliderQuadInitType1* src);
|
||||
s32 Collider_SetQuad(struct PlayState* play, ColliderQuad* dest, struct Actor* actor, ColliderQuadInit* src);
|
||||
s32 Collider_InitAndSetQuad(struct PlayState* play, ColliderQuad* dest, struct Actor* actor, ColliderQuadInit* src);
|
||||
s32 Collider_ResetQuadAT(struct PlayState* play, Collider* col);
|
||||
s32 Collider_ResetQuadAC(struct PlayState* play, Collider* col);
|
||||
s32 Collider_ResetQuadOC(struct PlayState* play, Collider* col);
|
||||
s32 Collider_QuadSetNearestAC(struct PlayState* play, ColliderQuad* quad, Vec3f* hitPos);
|
||||
s32 Collider_InitSphere(struct PlayState* play, ColliderSphere* collider);
|
||||
s32 Collider_DestroySphere(struct PlayState* play, ColliderSphere* collider);
|
||||
s32 Collider_SetSphere(struct PlayState* play, ColliderSphere* collider, struct Actor* actor, ColliderSphereInit* src);
|
||||
s32 Collider_InitAndSetSphere(struct PlayState* play, ColliderSphere* collider, struct Actor* actor, ColliderSphereInit* src);
|
||||
s32 Collider_InitSphere(struct PlayState* play, ColliderSphere* sph);
|
||||
s32 Collider_DestroySphere(struct PlayState* play, ColliderSphere* sph);
|
||||
s32 Collider_SetSphere(struct PlayState* play, ColliderSphere* dest, struct Actor* actor, ColliderSphereInit* src);
|
||||
s32 Collider_InitAndSetSphere(struct PlayState* play, ColliderSphere* dest, struct Actor* actor, ColliderSphereInit* src);
|
||||
s32 Collider_ResetSphereAT(struct PlayState* play, Collider* col);
|
||||
s32 Collider_ResetSphereAC(struct PlayState* play, Collider* col);
|
||||
s32 Collider_ResetSphereOC(struct PlayState* play, Collider* col);
|
||||
s32 Collider_InitLine(struct PlayState* play, OcLine* line);
|
||||
s32 Collider_DestroyLine(struct PlayState* play, OcLine* line);
|
||||
s32 Collider_SetLinePoints(struct PlayState* play, OcLine* line, Vec3f* a, Vec3f* b);
|
||||
s32 Collider_SetLine(struct PlayState* play, OcLine* line, OcLine* src);
|
||||
s32 Collider_SetLine(struct PlayState* play, OcLine* dst, OcLine* src);
|
||||
s32 Collider_ResetLineOC(struct PlayState* play, OcLine* line);
|
||||
void CollisionCheck_InitContext(struct PlayState* play, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_DestroyContext(struct PlayState* play, CollisionCheckContext* colCtxt);
|
||||
@ -606,7 +634,7 @@ s32 CollisionCheck_SwordHitAudio(Collider* at, ColliderElement* acElem);
|
||||
void CollisionCheck_HitEffects(struct PlayState* play, Collider* at, ColliderElement* atElem, Collider* ac, ColliderElement* acElem, Vec3f* hitPos);
|
||||
void CollisionCheck_SetBounce(Collider* at, Collider* ac);
|
||||
s32 CollisionCheck_SetATvsAC(struct PlayState* play, Collider* atCol, ColliderElement* atElem, Vec3f* atPos, Collider* acCol, ColliderElement* acElem, Vec3f* acPos, Vec3f* hitPos);
|
||||
void CollisionCheck_TrisAvgPoint(ColliderTrisElement* tri, Vec3f* avg);
|
||||
void CollisionCheck_TrisAvgPoint(ColliderTrisElement* trisElem, Vec3f* avg);
|
||||
void CollisionCheck_QuadAvgPoint(ColliderQuad* quad, Vec3f* avg);
|
||||
void CollisionCheck_AC_JntSphVsJntSph(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* atCol, Collider* acCol);
|
||||
void CollisionCheck_AC_JntSphVsCyl(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* atCol, Collider* acCol);
|
||||
@ -676,12 +704,12 @@ s32 CollisionCheck_LineOCCheckAll(struct PlayState* play, CollisionCheckContext*
|
||||
s32 CollisionCheck_LineOCCheck(struct PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b, struct Actor** exclusions, s32 numExclusions);
|
||||
void Collider_UpdateCylinder(struct Actor* actor, ColliderCylinder* cyl);
|
||||
void Collider_SetCylinderPosition(ColliderCylinder* cyl, Vec3s* pos);
|
||||
void Collider_SetQuadVertices(ColliderQuad* collider, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
|
||||
void Collider_SetTrisVertices(ColliderTris* collider, s32 index, Vec3f* a, Vec3f* b, Vec3f* c);
|
||||
void Collider_SetTrisDim(struct PlayState* play, ColliderTris* collider, s32 index, ColliderTrisElementDimInit* init);
|
||||
void Collider_SetQuadVertices(ColliderQuad* quad, Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* d);
|
||||
void Collider_SetTrisVertices(ColliderTris* tris, s32 elemIndex, Vec3f* a, Vec3f* b, Vec3f* c);
|
||||
void Collider_SetTrisDim(struct PlayState* play, ColliderTris* dest, s32 elemIndex, ColliderTrisElementDimInit* src);
|
||||
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* jntSph);
|
||||
void Collider_UpdateSpheresElement(ColliderJntSph* jntSph, s32 elemIndex, struct Actor* actor);
|
||||
void Collider_UpdateSphere(s32 limb, ColliderSphere* collider);
|
||||
void Collider_UpdateSphere(s32 limb, ColliderSphere* sph);
|
||||
void CollisionCheck_SpawnRedBlood(struct PlayState* play, Vec3f* v);
|
||||
void CollisionCheck_SpawnWaterDroplets(struct PlayState* play, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticles(struct PlayState* play, Vec3f* v);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user