mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-17 13:24:45 +00:00
Cleanup z_collision_check.c
and structs
This commit is contained in:
parent
d8175501ad
commit
9062812a2c
109 changed files with 1640 additions and 1528 deletions
|
@ -518,7 +518,7 @@ void func_8003555C(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* accel);
|
|||
void func_800355B8(PlayState* play, Vec3f* pos);
|
||||
u8 func_800355E4(PlayState* play, Collider* collider);
|
||||
u8 Actor_ApplyDamage(Actor* actor);
|
||||
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo, s32 freezeFlag);
|
||||
void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag);
|
||||
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag);
|
||||
void func_80035844(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, s32 arg3);
|
||||
Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, s32 timer, s16* unused,
|
||||
|
@ -686,44 +686,43 @@ DamageTable* DamageTable_Get(s32 index);
|
|||
void DamageTable_Clear(DamageTable* table);
|
||||
void Collider_DrawRedPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC);
|
||||
void Collider_DrawPoly(GraphicsContext* gfxCtx, Vec3f* vA, Vec3f* vB, Vec3f* vC, u8 r, u8 g, u8 b);
|
||||
s32 Collider_InitJntSph(PlayState* play, ColliderJntSph* collider);
|
||||
s32 Collider_FreeJntSph(PlayState* play, ColliderJntSph* collider);
|
||||
s32 Collider_DestroyJntSph(PlayState* play, ColliderJntSph* collider);
|
||||
s32 Collider_InitJntSph(PlayState* play, ColliderJntSph* jntSph);
|
||||
s32 Collider_FreeJntSph(PlayState* play, ColliderJntSph* jntSph);
|
||||
s32 Collider_DestroyJntSph(PlayState* play, ColliderJntSph* jntSph);
|
||||
s32 Collider_SetJntSphToActor(PlayState* play, ColliderJntSph* dest, ColliderJntSphInitToActor* src);
|
||||
s32 Collider_SetJntSphAllocType1(PlayState* play, ColliderJntSph* dest, Actor* actor,
|
||||
ColliderJntSphInitType1* src);
|
||||
s32 Collider_SetJntSphAlloc(PlayState* play, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src);
|
||||
s32 Collider_SetJntSph(PlayState* play, ColliderJntSph* dest, Actor* actor, ColliderJntSphInit* src,
|
||||
ColliderJntSphElement* elements);
|
||||
s32 Collider_ResetJntSphAT(PlayState* play, Collider* collider);
|
||||
s32 Collider_ResetJntSphAC(PlayState* play, Collider* collider);
|
||||
s32 Collider_ResetJntSphOC(PlayState* play, Collider* collider);
|
||||
s32 Collider_InitCylinder(PlayState* play, ColliderCylinder* collider);
|
||||
s32 Collider_DestroyCylinder(PlayState* play, ColliderCylinder* collider);
|
||||
s32 Collider_SetCylinderToActor(PlayState* play, ColliderCylinder* collider, ColliderCylinderInitToActor* src);
|
||||
s32 Collider_SetCylinderType1(PlayState* play, ColliderCylinder* collider, Actor* actor,
|
||||
ColliderCylinderInitType1* src);
|
||||
s32 Collider_SetCylinder(PlayState* play, ColliderCylinder* collider, Actor* actor, ColliderCylinderInit* src);
|
||||
s32 Collider_ResetCylinderAT(PlayState* play, Collider* collider);
|
||||
s32 Collider_ResetCylinderAC(PlayState* play, Collider* collider);
|
||||
s32 Collider_ResetCylinderOC(PlayState* play, Collider* collider);
|
||||
ColliderJntSphElement* jntSphElements);
|
||||
s32 Collider_ResetJntSphAT(PlayState* play, Collider* col);
|
||||
s32 Collider_ResetJntSphAC(PlayState* play, Collider* col);
|
||||
s32 Collider_ResetJntSphOC(PlayState* play, Collider* col);
|
||||
s32 Collider_InitCylinder(PlayState* play, ColliderCylinder* cyl);
|
||||
s32 Collider_DestroyCylinder(PlayState* play, ColliderCylinder* cyl);
|
||||
s32 Collider_SetCylinderToActor(PlayState* play, ColliderCylinder* dest, ColliderCylinderInitToActor* src);
|
||||
s32 Collider_SetCylinderType1(PlayState* play, ColliderCylinder* dest, Actor* actor, ColliderCylinderInitType1* src);
|
||||
s32 Collider_SetCylinder(PlayState* play, ColliderCylinder* dest, Actor* actor, ColliderCylinderInit* src);
|
||||
s32 Collider_ResetCylinderAT(PlayState* play, Collider* col);
|
||||
s32 Collider_ResetCylinderAC(PlayState* play, Collider* col);
|
||||
s32 Collider_ResetCylinderOC(PlayState* play, Collider* col);
|
||||
s32 Collider_InitTris(PlayState* play, ColliderTris* tris);
|
||||
s32 Collider_FreeTris(PlayState* play, ColliderTris* tris);
|
||||
s32 Collider_DestroyTris(PlayState* play, ColliderTris* tris);
|
||||
s32 Collider_SetTrisAllocType1(PlayState* play, ColliderTris* dest, Actor* actor, ColliderTrisInitType1* src);
|
||||
s32 Collider_SetTrisAlloc(PlayState* play, ColliderTris* dest, Actor* actor, ColliderTrisInit* src);
|
||||
s32 Collider_SetTris(PlayState* play, ColliderTris* dest, Actor* actor, ColliderTrisInit* src,
|
||||
ColliderTrisElement* elements);
|
||||
s32 Collider_ResetTrisAT(PlayState* play, Collider* collider);
|
||||
s32 Collider_ResetTrisAC(PlayState* play, Collider* collider);
|
||||
s32 Collider_ResetTrisOC(PlayState* play, Collider* collider);
|
||||
s32 Collider_InitQuad(PlayState* play, ColliderQuad* collider);
|
||||
s32 Collider_DestroyQuad(PlayState* play, ColliderQuad* collider);
|
||||
s32 Collider_SetQuadType1(PlayState* play, ColliderQuad* collider, Actor* actor, ColliderQuadInitType1* src);
|
||||
s32 Collider_SetQuad(PlayState* play, ColliderQuad* collider, Actor* actor, ColliderQuadInit* src);
|
||||
s32 Collider_ResetQuadAT(PlayState* play, Collider* collider);
|
||||
s32 Collider_ResetQuadAC(PlayState* play, Collider* collider);
|
||||
s32 Collider_ResetQuadOC(PlayState* play, Collider* collider);
|
||||
ColliderTrisElement* trisElements);
|
||||
s32 Collider_ResetTrisAT(PlayState* play, Collider* col);
|
||||
s32 Collider_ResetTrisAC(PlayState* play, Collider* col);
|
||||
s32 Collider_ResetTrisOC(PlayState* play, Collider* col);
|
||||
s32 Collider_InitQuad(PlayState* play, ColliderQuad* quad);
|
||||
s32 Collider_DestroyQuad(PlayState* play, ColliderQuad* quad);
|
||||
s32 Collider_SetQuadType1(PlayState* play, ColliderQuad* dest, Actor* actor, ColliderQuadInitType1* src);
|
||||
s32 Collider_SetQuad(PlayState* play, ColliderQuad* dest, Actor* actor, ColliderQuadInit* src);
|
||||
s32 Collider_ResetQuadAT(PlayState* play, Collider* col);
|
||||
s32 Collider_ResetQuadAC(PlayState* play, Collider* col);
|
||||
s32 Collider_ResetQuadOC(PlayState* play, Collider* col);
|
||||
s32 Collider_InitLine(PlayState* play, OcLine* line);
|
||||
s32 Collider_DestroyLine(PlayState* play, OcLine* line);
|
||||
s32 Collider_SetLinePoints(PlayState* play, OcLine* ocLine, Vec3f* a, Vec3f* b);
|
||||
|
@ -734,7 +733,7 @@ void CollisionCheck_DestroyContext(PlayState* play, CollisionCheckContext* colCh
|
|||
void CollisionCheck_ClearContext(PlayState* play, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_EnableSAC(PlayState* play, CollisionCheckContext* colChkCtx);
|
||||
void CollisionCheck_DisableSAC(PlayState* play, CollisionCheckContext* colChkCtx);
|
||||
void Collider_Draw(PlayState* play, Collider* collider);
|
||||
void Collider_Draw(PlayState* play, Collider* col);
|
||||
void CollisionCheck_DrawCollision(PlayState* play, CollisionCheckContext* colChkCtx);
|
||||
s32 CollisionCheck_SetAT(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider);
|
||||
s32 CollisionCheck_SetAT_SAC(PlayState* play, CollisionCheckContext* colChkCtx, Collider* collider, s32 index);
|
||||
|
@ -756,12 +755,12 @@ void CollisionCheck_Damage(PlayState* play, CollisionCheckContext* colChkCtx);
|
|||
s32 CollisionCheck_LineOCCheckAll(PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b);
|
||||
s32 CollisionCheck_LineOCCheck(PlayState* play, CollisionCheckContext* colChkCtx, Vec3f* a, Vec3f* b,
|
||||
Actor** exclusions, s32 numExclusions);
|
||||
void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* collider);
|
||||
void Collider_SetCylinderPosition(ColliderCylinder* collider, 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(PlayState* play, ColliderTris* collider, s32 index, ColliderTrisElementDimInit* src);
|
||||
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* collider);
|
||||
void Collider_UpdateCylinder(Actor* actor, ColliderCylinder* cyl);
|
||||
void Collider_SetCylinderPosition(ColliderCylinder* cyl, Vec3s* pos);
|
||||
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(PlayState* play, ColliderTris* tris, s32 elemIndex, ColliderTrisElementDimInit* src);
|
||||
void Collider_UpdateSpheres(s32 limb, ColliderJntSph* jntSph);
|
||||
void CollisionCheck_SpawnRedBlood(PlayState* play, Vec3f* v);
|
||||
void CollisionCheck_SpawnWaterDroplets(PlayState* play, Vec3f* v);
|
||||
void CollisionCheck_SpawnShieldParticles(PlayState* play, Vec3f* v);
|
||||
|
|
|
@ -892,6 +892,8 @@ typedef struct {
|
|||
/* 0x74 */ s16 unk_74[2]; // context-specific data used by the current scene draw config
|
||||
} RoomContext; // size = 0x78
|
||||
|
||||
#define SAC_ENABLE (1 << 0)
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ s16 colATCount;
|
||||
/* 0x002 */ u16 sacFlags;
|
||||
|
|
|
@ -9,90 +9,140 @@
|
|||
// From z64.h
|
||||
struct Actor;
|
||||
|
||||
/*
|
||||
* Bases for all shapes of colliders
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
|
||||
/* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
|
||||
/* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
|
||||
/* 3 */ COLTYPE_HIT3, // No blood, white hitmark
|
||||
/* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
|
||||
/* 5 */ COLTYPE_HIT5, // No blood, red hitmark
|
||||
/* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
|
||||
/* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
|
||||
/* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
|
||||
/* 9 */ COLTYPE_METAL,
|
||||
/* 10 */ COLTYPE_NONE,
|
||||
/* 11 */ COLTYPE_WOOD,
|
||||
/* 12 */ COLTYPE_HARD,
|
||||
/* 13 */ COLTYPE_TREE
|
||||
} ColliderType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLSHAPE_JNTSPH,
|
||||
/* 1 */ COLSHAPE_CYLINDER,
|
||||
/* 2 */ COLSHAPE_TRIS,
|
||||
/* 3 */ COLSHAPE_QUAD,
|
||||
/* 4 */ COLSHAPE_MAX
|
||||
} ColliderShape;
|
||||
|
||||
typedef struct {
|
||||
/* 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; // Information flags for AT collisions.
|
||||
/* 0x11 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x12 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
|
||||
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x15 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
/* 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.
|
||||
/* 0x10 */ u8 atFlags;
|
||||
/* 0x11 */ u8 acFlags;
|
||||
/* 0x12 */ u8 ocFlags1;
|
||||
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
|
||||
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions. See `ColliderType` enum
|
||||
/* 0x15 */ u8 shape; // See `ColliderShape` enum
|
||||
} Collider; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x01 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x02 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x03 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x04 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
|
||||
/* 0x05 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
/* 0x00 */ u8 colType;
|
||||
/* 0x01 */ u8 atFlags;
|
||||
/* 0x02 */ u8 acFlags;
|
||||
/* 0x03 */ u8 ocFlags1;
|
||||
/* 0x04 */ u8 ocFlags2;
|
||||
/* 0x05 */ u8 shape;
|
||||
} ColliderInit; // size = 0x06
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
|
||||
/* 0x01 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x02 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x03 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x04 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
/* 0x00 */ u8 colType;
|
||||
/* 0x01 */ u8 atFlags;
|
||||
/* 0x02 */ u8 acFlags;
|
||||
/* 0x03 */ u8 ocFlags1;
|
||||
/* 0x04 */ u8 shape;
|
||||
} ColliderInitType1; // size = 0x05
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ struct Actor* actor;
|
||||
/* 0x04 */ u8 atFlags; // Information flags for AT collisions.
|
||||
/* 0x05 */ u8 acFlags; // Information flags for AC collisions.
|
||||
/* 0x06 */ u8 ocFlags1; // Information flags for OC collisions.
|
||||
/* 0x07 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
/* 0x04 */ u8 atFlags;
|
||||
/* 0x05 */ u8 acFlags;
|
||||
/* 0x06 */ u8 ocFlags1;
|
||||
/* 0x07 */ u8 shape;
|
||||
} ColliderInitToActor; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 dmgFlags; // Toucher damage type flags.
|
||||
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x05 */ u8 damage; // Damage or Stun Timer
|
||||
} ColliderTouch; // size = 0x08
|
||||
} ColliderElementTouch; // size = 0x08
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 dmgFlags; // Bumper damage type flags.
|
||||
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x05 */ u8 defense; // Damage Resistance
|
||||
/* 0x06 */ Vec3s hitPos; // Point of contact
|
||||
} ColliderBump; // size = 0x0C
|
||||
} ColliderElementBump; // size = 0x0C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 dmgFlags; // Bumper exclusion mask
|
||||
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
/* 0x05 */ u8 defense; // Damage Resistance
|
||||
} ColliderBumpInit; // size = 0x08
|
||||
} ColliderElementBumpInit; // size = 0x08
|
||||
|
||||
typedef struct ColliderInfo {
|
||||
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
|
||||
/**
|
||||
* Affects the sound Link's sword makes when hitting it, hookability,
|
||||
* and possibly other things. It's definitely not flags, as all checks
|
||||
* are == or !=. Will probably need more actors decomped to truly
|
||||
* understand what this is.
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0 */ ELEMTYPE_UNK0,
|
||||
/* 1 */ ELEMTYPE_UNK1,
|
||||
/* 2 */ ELEMTYPE_UNK2,
|
||||
/* 3 */ ELEMTYPE_UNK3,
|
||||
/* 4 */ ELEMTYPE_UNK4,
|
||||
/* 5 */ ELEMTYPE_UNK5,
|
||||
/* 6 */ ELEMTYPE_UNK6,
|
||||
/* 7 */ ELEMTYPE_UNK7
|
||||
} ElementType;
|
||||
|
||||
typedef struct ColliderElement {
|
||||
/* 0x00 */ ColliderElementTouch toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x08 */ ColliderElementBump bumper; // Damage properties when acting as an AC collider
|
||||
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
|
||||
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
|
||||
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
|
||||
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
|
||||
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
|
||||
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
|
||||
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
|
||||
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
|
||||
} ColliderInfo; // size = 0x28
|
||||
/* 0x20 */ struct ColliderElement* atHitInfo; // element that hit the AT collider
|
||||
/* 0x24 */ struct ColliderElement* acHitInfo; // element that hit the AC collider
|
||||
} ColliderElement; // size = 0x28
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
|
||||
/* 0x04 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
|
||||
/* 0x04 */ ColliderElementTouch toucher; // Damage properties when acting as an AT collider
|
||||
/* 0x0C */ ColliderElementBumpInit bumper; // Damage properties when acting as an AC collider
|
||||
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
|
||||
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
|
||||
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
|
||||
} ColliderInfoInit; // size = 0x18
|
||||
} ColliderElementInit; // size = 0x18
|
||||
|
||||
/*
|
||||
* JntSph collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Sphere16 modelSphere; // model space sphere
|
||||
/* 0x08 */ Sphere16 worldSphere; // world space sphere
|
||||
/* 0x10 */ f32 scale; // world space sphere = model * scale * 0.01
|
||||
/* 0x14 */ u8 limb; // attached limb
|
||||
/* 0x10 */ f32 scale; // world space sphere = model * scale * 0.01
|
||||
/* 0x14 */ u8 limb; // attached limb
|
||||
} ColliderJntSphElementDim; // size = 0x18
|
||||
|
||||
typedef struct {
|
||||
|
@ -102,12 +152,12 @@ typedef struct {
|
|||
} ColliderJntSphElementDimInit; // size = 0x0C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfo info;
|
||||
/* 0x00 */ ColliderElement base;
|
||||
/* 0x28 */ ColliderJntSphElementDim dim;
|
||||
} ColliderJntSphElement; // size = 0x40
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfoInit info;
|
||||
/* 0x00 */ ColliderElementInit base;
|
||||
/* 0x18 */ ColliderJntSphElementDimInit dim;
|
||||
} ColliderJntSphElementInit; // size = 0x24
|
||||
|
||||
|
@ -135,41 +185,49 @@ typedef struct {
|
|||
/* 0x0C */ ColliderJntSphElementInit* elements;
|
||||
} ColliderJntSphInitToActor; // size = 0x10
|
||||
|
||||
/*
|
||||
* Cylinder collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderInfo info;
|
||||
/* 0x18 */ ColliderElement elem;
|
||||
/* 0x40 */ Cylinder16 dim;
|
||||
} ColliderCylinder; // size = 0x4C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInit; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitType1 base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInitType1; // size = 0x2C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitToActor base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ Cylinder16 dim;
|
||||
} ColliderCylinderInitToActor; // size = 0x2C
|
||||
|
||||
/*
|
||||
* Tris collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f vtx[3];
|
||||
} ColliderTrisElementDimInit; // size = 0x24
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfo info;
|
||||
/* 0x00 */ ColliderElement base;
|
||||
/* 0x28 */ TriNorm dim;
|
||||
} ColliderTrisElement; // size = 0x5C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfoInit info;
|
||||
/* 0x00 */ ColliderElementInit base;
|
||||
/* 0x18 */ ColliderTrisElementDimInit dim;
|
||||
} ColliderTrisElementInit; // size = 0x3C
|
||||
|
||||
|
@ -191,6 +249,10 @@ typedef struct {
|
|||
/* 0x0C */ ColliderTrisElementInit* elements;
|
||||
} ColliderTrisInitType1; // size = 0x10
|
||||
|
||||
/*
|
||||
* Quad collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f quad[4];
|
||||
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
|
||||
|
@ -202,77 +264,36 @@ typedef struct {
|
|||
/* 0x00 */ Vec3f quad[4];
|
||||
} ColliderQuadDimInit; // size = 0x30
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInfo info;
|
||||
/* 0x24 */ ColliderQuadDim dim;
|
||||
} ColliderQuadElement; // size = 0x68
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Collider base;
|
||||
/* 0x18 */ ColliderInfo info;
|
||||
/* 0x18 */ ColliderElement elem;
|
||||
/* 0x40 */ ColliderQuadDim dim;
|
||||
} ColliderQuad; // size = 0x80
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInit base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ ColliderQuadDimInit dim;
|
||||
} ColliderQuadInit; // size = 0x50
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ ColliderInitType1 base;
|
||||
/* 0x08 */ ColliderInfoInit info;
|
||||
/* 0x08 */ ColliderElementInit elem;
|
||||
/* 0x20 */ ColliderQuadDimInit dim;
|
||||
} ColliderQuadInitType1; // size = 0x50
|
||||
|
||||
/*
|
||||
* Line collider
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Linef line;
|
||||
/* 0x18 */ u16 ocFlags;
|
||||
} OcLine; // size = 0x1C
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLTYPE_HIT0, // Blue blood, white hitmark
|
||||
/* 1 */ COLTYPE_HIT1, // No blood, dust hitmark
|
||||
/* 2 */ COLTYPE_HIT2, // Green blood, dust hitmark
|
||||
/* 3 */ COLTYPE_HIT3, // No blood, white hitmark
|
||||
/* 4 */ COLTYPE_HIT4, // Water burst, no hitmark
|
||||
/* 5 */ COLTYPE_HIT5, // No blood, red hitmark
|
||||
/* 6 */ COLTYPE_HIT6, // Green blood, white hitmark
|
||||
/* 7 */ COLTYPE_HIT7, // Red blood, white hitmark
|
||||
/* 8 */ COLTYPE_HIT8, // Blue blood, red hitmark
|
||||
/* 9 */ COLTYPE_METAL,
|
||||
/* 10 */ COLTYPE_NONE,
|
||||
/* 11 */ COLTYPE_WOOD,
|
||||
/* 12 */ COLTYPE_HARD,
|
||||
/* 13 */ COLTYPE_TREE
|
||||
} ColliderType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ COLSHAPE_JNTSPH,
|
||||
/* 1 */ COLSHAPE_CYLINDER,
|
||||
/* 2 */ COLSHAPE_TRIS,
|
||||
/* 3 */ COLSHAPE_QUAD,
|
||||
/* 4 */ COLSHAPE_MAX
|
||||
} ColliderShape;
|
||||
|
||||
/**
|
||||
* Affects the sound Link's sword makes when hitting it, hookability,
|
||||
* and possibly other things. It's definitely not flags, as all checks
|
||||
* are == or !=. Will probably need more actors decomped to truly
|
||||
* understand what this is.
|
||||
/*
|
||||
* Collider properties, for all shapes
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0 */ ELEMTYPE_UNK0,
|
||||
/* 1 */ ELEMTYPE_UNK1,
|
||||
/* 2 */ ELEMTYPE_UNK2,
|
||||
/* 3 */ ELEMTYPE_UNK3,
|
||||
/* 4 */ ELEMTYPE_UNK4,
|
||||
/* 5 */ ELEMTYPE_UNK5,
|
||||
/* 6 */ ELEMTYPE_UNK6,
|
||||
/* 7 */ ELEMTYPE_UNK7
|
||||
} ElementType;
|
||||
|
||||
#define SAC_ENABLE (1 << 0)
|
||||
|
||||
#define AT_NONE 0 // No flags set. Cannot have AT collisions when set as AT
|
||||
#define AT_ON (1 << 0) // Can have AT collisions when set as AT
|
||||
|
|
|
@ -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->ac->category == ACTORCAT_EXPLOSIVE)) {
|
||||
if ((collider->acFlags & AC_HIT) && (collider->otherAT->category == ACTORCAT_EXPLOSIVE)) {
|
||||
collider->acFlags &= ~AC_HIT;
|
||||
return collider->ac;
|
||||
return collider->otherAT;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
@ -4064,28 +4064,27 @@ u8 Actor_ApplyDamage(Actor* actor) {
|
|||
return actor->colChkInfo.health;
|
||||
}
|
||||
|
||||
void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo, s32 freezeFlag) {
|
||||
if (colInfo->acHitInfo == NULL) {
|
||||
void Actor_SetDropFlag(Actor* actor, ColliderElement* elem, s32 freezeFlag) {
|
||||
if (elem->acHitInfo == NULL) {
|
||||
actor->dropFlag = 0x00;
|
||||
} else if (freezeFlag &&
|
||||
(colInfo->acHitInfo->toucher.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
|
||||
actor->freezeTimer = colInfo->acHitInfo->toucher.damage;
|
||||
} else if (freezeFlag && (elem->acHitInfo->toucher.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
|
||||
actor->freezeTimer = elem->acHitInfo->toucher.damage;
|
||||
actor->dropFlag = 0x00;
|
||||
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_FIRE) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_FIRE) {
|
||||
actor->dropFlag = 0x01;
|
||||
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_ICE) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_ICE) {
|
||||
actor->dropFlag = 0x02;
|
||||
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK1) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK1) {
|
||||
actor->dropFlag = 0x04;
|
||||
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK2) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK2) {
|
||||
actor->dropFlag = 0x08;
|
||||
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK3) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK3) {
|
||||
actor->dropFlag = 0x10;
|
||||
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) {
|
||||
actor->dropFlag = 0x20;
|
||||
} else if (colInfo->acHitInfo->toucher.dmgFlags & DMG_MAGIC_LIGHT) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_MAGIC_LIGHT) {
|
||||
if (freezeFlag) {
|
||||
actor->freezeTimer = colInfo->acHitInfo->toucher.damage;
|
||||
actor->freezeTimer = elem->acHitInfo->toucher.damage;
|
||||
}
|
||||
actor->dropFlag = 0x40;
|
||||
} else {
|
||||
|
@ -4094,35 +4093,35 @@ void Actor_SetDropFlag(Actor* actor, ColliderInfo* colInfo, s32 freezeFlag) {
|
|||
}
|
||||
|
||||
void Actor_SetDropFlagJntSph(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag) {
|
||||
ColliderInfo* curColInfo;
|
||||
ColliderElement* elem;
|
||||
s32 flag;
|
||||
s32 i;
|
||||
|
||||
actor->dropFlag = 0x00;
|
||||
|
||||
for (i = jntSph->count - 1; i >= 0; i--) {
|
||||
curColInfo = &jntSph->elements[i].info;
|
||||
if (curColInfo->acHitInfo == NULL) {
|
||||
elem = &jntSph->elements[i].base;
|
||||
if (elem->acHitInfo == NULL) {
|
||||
flag = 0x00;
|
||||
} else if (freezeFlag &&
|
||||
(curColInfo->acHitInfo->toucher.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
|
||||
actor->freezeTimer = curColInfo->acHitInfo->toucher.damage;
|
||||
(elem->acHitInfo->toucher.dmgFlags & (DMG_UNKNOWN_1 | DMG_MAGIC_ICE | DMG_MAGIC_FIRE))) {
|
||||
actor->freezeTimer = elem->acHitInfo->toucher.damage;
|
||||
flag = 0x00;
|
||||
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_FIRE) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_FIRE) {
|
||||
flag = 0x01;
|
||||
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_ICE) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_ICE) {
|
||||
flag = 0x02;
|
||||
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK1) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK1) {
|
||||
flag = 0x04;
|
||||
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK2) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK2) {
|
||||
flag = 0x08;
|
||||
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK3) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_UNK3) {
|
||||
flag = 0x10;
|
||||
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) {
|
||||
flag = 0x20;
|
||||
} else if (curColInfo->acHitInfo->toucher.dmgFlags & DMG_MAGIC_LIGHT) {
|
||||
} else if (elem->acHitInfo->toucher.dmgFlags & DMG_MAGIC_LIGHT) {
|
||||
if (freezeFlag) {
|
||||
actor->freezeTimer = curColInfo->acHitInfo->toucher.damage;
|
||||
actor->freezeTimer = elem->acHitInfo->toucher.damage;
|
||||
}
|
||||
flag = 0x40;
|
||||
} else {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -169,10 +169,10 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
|||
ArmsHook_CheckForCancel(this);
|
||||
|
||||
if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
|
||||
(this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
|
||||
touchedActor = this->collider.base.at;
|
||||
(this->collider.elem.atHitInfo->elemType != ELEMTYPE_UNK4)) {
|
||||
touchedActor = this->collider.base.otherAC;
|
||||
if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_9 | ACTOR_FLAG_10))) {
|
||||
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
|
||||
if (this->collider.elem.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
|
||||
ArmsHook_AttachHookToActor(this, touchedActor);
|
||||
if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_10)) {
|
||||
func_80865044(this);
|
||||
|
|
|
@ -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.oc;
|
||||
actor = this->colliderLeft.base.otherOC;
|
||||
} else {
|
||||
actor = this->colliderRight.base.oc;
|
||||
actor = this->colliderRight.base.otherOC;
|
||||
}
|
||||
this->colliderLeft.base.ocFlags1 &= ~OC1_HIT;
|
||||
this->colliderRight.base.ocFlags1 &= ~OC1_HIT;
|
||||
|
|
|
@ -166,8 +166,8 @@ void BgHakaTrap_Init(Actor* thisx, PlayState* play) {
|
|||
this->colliderCylinder.dim.radius = 18;
|
||||
this->colliderCylinder.dim.height = 115;
|
||||
|
||||
this->colliderCylinder.info.toucherFlags &= ~TOUCH_SFX_NORMAL;
|
||||
this->colliderCylinder.info.toucherFlags |= TOUCH_SFX_WOOD;
|
||||
this->colliderCylinder.elem.toucherFlags &= ~TOUCH_SFX_NORMAL;
|
||||
this->colliderCylinder.elem.toucherFlags |= TOUCH_SFX_WOOD;
|
||||
|
||||
this->actionFunc = func_808801B8;
|
||||
}
|
||||
|
|
|
@ -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.ac->world.pos) < 50.0f &&
|
||||
(this->potCollider.base.ac->world.pos.y - this->dyna.actor.world.pos.y) < 50.0f) {
|
||||
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) {
|
||||
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;
|
||||
|
|
|
@ -129,8 +129,8 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) {
|
|||
(player->meleeWeaponAnimation == PLAYER_MWA_HAMMER_FORWARD ||
|
||||
player->meleeWeaponAnimation == PLAYER_MWA_HAMMER_SIDE)) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
if ((this->collider.elements[0].info.bumperFlags & BUMP_HIT) ||
|
||||
(this->collider.elements[1].info.bumperFlags & BUMP_HIT)) {
|
||||
if ((this->collider.elements[0].base.bumperFlags & BUMP_HIT) ||
|
||||
(this->collider.elements[1].base.bumperFlags & BUMP_HIT)) {
|
||||
this->dyna.actor.world.rot.y -= 0x4000;
|
||||
} else {
|
||||
this->dyna.actor.world.rot.y += 0x4000;
|
||||
|
|
|
@ -139,8 +139,8 @@ void func_8088CEC0(BgHidanSekizou* this, s32 arg1, s16 arg2) {
|
|||
element->dim.worldSphere.center.y = (s16)this->dyna.actor.home.pos.y + element->dim.modelSphere.center.y;
|
||||
element->dim.worldSphere.center.z = this->dyna.actor.home.pos.z - (sp30 * element->dim.modelSphere.center.x) +
|
||||
(sp2C * element->dim.modelSphere.center.z);
|
||||
element->info.toucherFlags |= TOUCH_ON;
|
||||
element->info.ocElemFlags |= OCELEM_ON;
|
||||
element->base.toucherFlags |= TOUCH_ON;
|
||||
element->base.ocElemFlags |= OCELEM_ON;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,8 +210,8 @@ void func_8088D434(BgHidanSekizou* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
for (i = 3 * phi_s4; i < ARRAY_COUNT(this->elements); i++) {
|
||||
this->collider.elements[i].info.toucherFlags &= ~TOUCH_ON;
|
||||
this->collider.elements[i].info.ocElemFlags &= ~OCELEM_ON;
|
||||
this->collider.elements[i].base.toucherFlags &= ~TOUCH_ON;
|
||||
this->collider.elements[i].base.ocElemFlags &= ~OCELEM_ON;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.ac != NULL) && (this->cylinder1.base.ac->id == ACTOR_EN_ICE_HONO)) {
|
||||
if ((this->cylinder1.base.otherAT != NULL) && (this->cylinder1.base.otherAT->id == ACTOR_EN_ICE_HONO)) {
|
||||
if (type == RED_ICE_KING_ZORA) {
|
||||
if (this->dyna.actor.parent != NULL) {
|
||||
this->dyna.actor.parent->freezeTimer = 50;
|
||||
|
|
|
@ -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.at != NULL) &&
|
||||
(this->collider.base.at->category == ACTORCAT_PLAYER))) {
|
||||
((this->collider.base.atFlags & AT_HIT) && (this->collider.base.otherAC != NULL) &&
|
||||
(this->collider.base.otherAC->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;
|
||||
|
|
|
@ -244,7 +244,7 @@ void func_808992E8(BgJyaIronobj* this, PlayState* play) {
|
|||
s32 i;
|
||||
|
||||
if (this->colCylinder.base.acFlags & AC_HIT) {
|
||||
actor = this->colCylinder.base.ac;
|
||||
actor = this->colCylinder.base.otherAT;
|
||||
this->colCylinder.base.acFlags &= ~AC_HIT;
|
||||
if (actor != NULL && actor->id == ACTOR_EN_IK) {
|
||||
particleFunc[this->dyna.actor.params & 1](this, play, (EnIk*)actor);
|
||||
|
|
|
@ -98,7 +98,7 @@ void BgMenkuriEye_Update(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
}
|
||||
if ((this->collider.base.acFlags & AC_HIT) &&
|
||||
(ABS((s16)(this->collider.base.ac->world.rot.y - this->actor.shape.rot.y)) > 0x5000)) {
|
||||
(ABS((s16)(this->collider.base.otherAT->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);
|
||||
|
|
|
@ -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.ac;
|
||||
colliderBaseAc = this->colliderJntSph.base.otherAT;
|
||||
|
||||
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.ac->world.pos.x,
|
||||
if (Math3D_Dist2DSq(colliderBaseAc->world.pos.z, this->colliderJntSph.base.otherAT->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);
|
||||
|
|
|
@ -1226,10 +1226,10 @@ void BossDodongo_SpawnFire(BossDodongo* this, PlayState* play, s16 params) {
|
|||
|
||||
void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) {
|
||||
s32 pad;
|
||||
ColliderInfo* item1;
|
||||
ColliderElement* item1;
|
||||
u8 swordDamage;
|
||||
s32 damage;
|
||||
ColliderInfo* item2;
|
||||
ColliderElement* item2;
|
||||
s16 i;
|
||||
|
||||
if ((this->health <= 0) && (this->actionFunc != BossDodongo_DeathCutscene)) {
|
||||
|
@ -1241,12 +1241,12 @@ void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) {
|
|||
if (this->unk_1C0 == 0) {
|
||||
if (this->actionFunc == BossDodongo_Inhale) {
|
||||
for (i = 0; i < 19; i++) {
|
||||
if (this->collider.elements[i].info.bumperFlags & BUMP_HIT) {
|
||||
item1 = this->collider.elements[i].info.acHitInfo;
|
||||
if (this->collider.elements[i].base.bumperFlags & BUMP_HIT) {
|
||||
item1 = this->collider.elements[i].base.acHitInfo;
|
||||
item2 = item1;
|
||||
|
||||
if ((item2->toucher.dmgFlags & DMG_BOOMERANG) || (item2->toucher.dmgFlags & DMG_SLINGSHOT)) {
|
||||
this->collider.elements[i].info.bumperFlags &= ~BUMP_HIT;
|
||||
this->collider.elements[i].base.bumperFlags &= ~BUMP_HIT;
|
||||
this->unk_1C0 = 2;
|
||||
BossDodongo_SetupWalk(this);
|
||||
this->unk_1DA = 0x32;
|
||||
|
@ -1256,9 +1256,9 @@ void BossDodongo_UpdateDamage(BossDodongo* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->collider.elements->info.bumperFlags & BUMP_HIT) {
|
||||
this->collider.elements->info.bumperFlags &= ~BUMP_HIT;
|
||||
item1 = this->collider.elements[0].info.acHitInfo;
|
||||
if (this->collider.elements[0].base.bumperFlags & BUMP_HIT) {
|
||||
this->collider.elements[0].base.bumperFlags &= ~BUMP_HIT;
|
||||
item1 = this->collider.elements[0].base.acHitInfo;
|
||||
if ((this->actionFunc == BossDodongo_Vulnerable) || (this->actionFunc == BossDodongo_LayDown)) {
|
||||
swordDamage = damage = CollisionCheck_GetSwordDamage(item1->toucher.dmgFlags);
|
||||
|
||||
|
|
|
@ -1279,11 +1279,11 @@ void BossFd_Effects(BossFd* this, PlayState* play) {
|
|||
|
||||
void BossFd_CollisionCheck(BossFd* this, PlayState* play) {
|
||||
ColliderJntSphElement* headCollider = &this->collider.elements[0];
|
||||
ColliderInfo* hurtbox;
|
||||
ColliderElement* hurtbox;
|
||||
|
||||
if (headCollider->info.bumperFlags & BUMP_HIT) {
|
||||
headCollider->info.bumperFlags &= ~BUMP_HIT;
|
||||
hurtbox = headCollider->info.acHitInfo;
|
||||
if (headCollider->base.bumperFlags & BUMP_HIT) {
|
||||
headCollider->base.bumperFlags &= ~BUMP_HIT;
|
||||
hurtbox = headCollider->base.acHitInfo;
|
||||
this->actor.colChkInfo.health -= 2;
|
||||
if (hurtbox->toucher.dmgFlags & DMG_ARROW_ICE) {
|
||||
this->actor.colChkInfo.health -= 2;
|
||||
|
|
|
@ -806,31 +806,31 @@ void BossFd2_Wait(BossFd2* this, PlayState* play) {
|
|||
|
||||
void BossFd2_CollisionCheck(BossFd2* this, PlayState* play) {
|
||||
s16 i;
|
||||
ColliderInfo* hurtbox;
|
||||
ColliderElement* hurtbox;
|
||||
BossFd* bossFd = (BossFd*)this->actor.parent;
|
||||
|
||||
if (this->actionFunc == BossFd2_ClawSwipe) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->elements); i++) {
|
||||
if (this->collider.elements[i].info.toucherFlags & TOUCH_HIT) {
|
||||
this->collider.elements[i].info.toucherFlags &= ~TOUCH_HIT;
|
||||
if (this->collider.elements[i].base.toucherFlags & TOUCH_HIT) {
|
||||
this->collider.elements[i].base.toucherFlags &= ~TOUCH_HIT;
|
||||
Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!bossFd->faceExposed) {
|
||||
this->collider.elements[0].info.elemType = ELEMTYPE_UNK2;
|
||||
this->collider.elements[0].base.elemType = ELEMTYPE_UNK2;
|
||||
this->collider.base.colType = COLTYPE_METAL;
|
||||
} else {
|
||||
this->collider.elements[0].info.elemType = ELEMTYPE_UNK3;
|
||||
this->collider.elements[0].base.elemType = ELEMTYPE_UNK3;
|
||||
this->collider.base.colType = COLTYPE_HIT3;
|
||||
}
|
||||
|
||||
if (this->collider.elements[0].info.bumperFlags & BUMP_HIT) {
|
||||
this->collider.elements[0].info.bumperFlags &= ~BUMP_HIT;
|
||||
if (this->collider.elements[0].base.bumperFlags & BUMP_HIT) {
|
||||
this->collider.elements[0].base.bumperFlags &= ~BUMP_HIT;
|
||||
|
||||
hurtbox = this->collider.elements[0].info.acHitInfo;
|
||||
hurtbox = this->collider.elements[0].base.acHitInfo;
|
||||
if (!bossFd->faceExposed) {
|
||||
if (hurtbox->toucher.dmgFlags & DMG_HAMMER) {
|
||||
bossFd->actor.colChkInfo.health -= 2;
|
||||
|
|
|
@ -2685,12 +2685,12 @@ void BossGanon_Damaged(BossGanon* this, PlayState* play) {
|
|||
void BossGanon_UpdateDamage(BossGanon* this, PlayState* play) {
|
||||
s16 i;
|
||||
s16 j;
|
||||
ColliderInfo* acHitInfo;
|
||||
ColliderElement* acHitInfo;
|
||||
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->unk_2D4 = 2;
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
acHitInfo = this->collider.info.acHitInfo;
|
||||
acHitInfo = this->collider.elem.acHitInfo;
|
||||
|
||||
if ((this->actionFunc == BossGanon_HitByLightBall) || (this->actionFunc == BossGanon_ChargeBigMagic)) {
|
||||
if (acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) {
|
||||
|
@ -3935,7 +3935,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
|
|||
}
|
||||
|
||||
if ((this->collider.base.acFlags & AC_HIT) || hitWithBottle) {
|
||||
ColliderInfo* acHitInfo = this->collider.info.acHitInfo;
|
||||
ColliderElement* acHitInfo = this->collider.elem.acHitInfo;
|
||||
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
|
@ -4309,7 +4309,7 @@ void func_808E2544(Actor* thisx, PlayState* play) {
|
|||
BossGanon* dorf = (BossGanon*)this->actor.parent;
|
||||
s32 pad;
|
||||
Player* player = GET_PLAYER(play);
|
||||
ColliderInfo* acHitInfo;
|
||||
ColliderElement* acHitInfo;
|
||||
Vec3f sp60;
|
||||
|
||||
this->unk_1A2++;
|
||||
|
@ -4419,7 +4419,7 @@ void func_808E2544(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
acHitInfo = this->collider.info.acHitInfo;
|
||||
acHitInfo = this->collider.elem.acHitInfo;
|
||||
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
|
|
|
@ -1842,10 +1842,10 @@ void func_80902348(BossGanon2* this, PlayState* play) {
|
|||
|
||||
if (this->unk_316 == 0) {
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_864); i++) {
|
||||
if (this->unk_444.elements[i].info.bumperFlags & BUMP_HIT) {
|
||||
this->unk_444.elements[i].info.bumperFlags &= ~BUMP_HIT;
|
||||
} else if (this->unk_444.elements[i].info.toucherFlags & TOUCH_HIT) {
|
||||
this->unk_444.elements[i].info.toucherFlags &= ~TOUCH_HIT;
|
||||
if (this->unk_444.elements[i].base.bumperFlags & BUMP_HIT) {
|
||||
this->unk_444.elements[i].base.bumperFlags &= ~BUMP_HIT;
|
||||
} else if (this->unk_444.elements[i].base.toucherFlags & TOUCH_HIT) {
|
||||
this->unk_444.elements[i].base.toucherFlags &= ~TOUCH_HIT;
|
||||
|
||||
if (this->unk_312 == 1) {
|
||||
phi_v0_2 = 0x1800;
|
||||
|
@ -1880,23 +1880,23 @@ void func_80902348(BossGanon2* this, PlayState* play) {
|
|||
|
||||
void func_80902524(BossGanon2* this, PlayState* play) {
|
||||
s8 temp_v0_4;
|
||||
ColliderInfo* acHitInfo;
|
||||
ColliderElement* acHitInfo;
|
||||
s16 i;
|
||||
u8 phi_v1_2;
|
||||
|
||||
osSyncPrintf("this->no_hit_time %d\n", this->unk_316);
|
||||
if (this->unk_316 != 0 || ((this->unk_334 == 0) && (this->actionFunc == func_80900890))) {
|
||||
for (i = 0; i < ARRAY_COUNT(this->unk_464); i++) {
|
||||
this->unk_424.elements[i].info.bumperFlags &= ~BUMP_HIT;
|
||||
this->unk_424.elements[i].base.bumperFlags &= ~BUMP_HIT;
|
||||
}
|
||||
}
|
||||
|
||||
osSyncPrintf("this->look_on %d\n", this->unk_313);
|
||||
if (this->unk_313) {
|
||||
if (this->actionFunc != func_808FFFE0) {
|
||||
if (this->unk_424.elements[0].info.bumperFlags & BUMP_HIT) {
|
||||
this->unk_424.elements[0].info.bumperFlags &= ~BUMP_HIT;
|
||||
acHitInfo = this->unk_424.elements[0].info.acHitInfo;
|
||||
if (this->unk_424.elements[0].base.bumperFlags & BUMP_HIT) {
|
||||
this->unk_424.elements[0].base.bumperFlags &= ~BUMP_HIT;
|
||||
acHitInfo = this->unk_424.elements[0].base.acHitInfo;
|
||||
if ((acHitInfo->toucher.dmgFlags & DMG_ARROW_LIGHT) && (this->actionFunc != func_80900890)) {
|
||||
func_809000A0(this, play);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_FANTOM_HIT_THUNDER);
|
||||
|
@ -1926,9 +1926,9 @@ void func_80902524(BossGanon2* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (this->unk_424.elements[15].info.bumperFlags & BUMP_HIT) {
|
||||
this->unk_424.elements[15].info.bumperFlags &= ~BUMP_HIT;
|
||||
acHitInfo = this->unk_424.elements[15].info.acHitInfo;
|
||||
if (this->unk_424.elements[15].base.bumperFlags & BUMP_HIT) {
|
||||
this->unk_424.elements[15].base.bumperFlags &= ~BUMP_HIT;
|
||||
acHitInfo = this->unk_424.elements[15].base.acHitInfo;
|
||||
this->unk_316 = 60;
|
||||
this->unk_344 = 0x32;
|
||||
this->unk_342 = 5;
|
||||
|
|
|
@ -1224,7 +1224,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
|
|||
void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) {
|
||||
s32 acHit;
|
||||
EnfHG* horse = (EnfHG*)this->actor.child;
|
||||
ColliderInfo* hurtbox;
|
||||
ColliderElement* hurtbox;
|
||||
|
||||
if (this->work[GND_INVINC_TIMER] != 0) {
|
||||
this->work[GND_INVINC_TIMER]--;
|
||||
|
@ -1235,7 +1235,7 @@ void BossGanondrof_CollisionCheck(BossGanondrof* this, PlayState* play) {
|
|||
if ((acHit && ((s8)this->actor.colChkInfo.health > 0)) || (this->returnCount != 0)) {
|
||||
if (acHit) {
|
||||
this->colliderBody.base.acFlags &= ~AC_HIT;
|
||||
hurtbox = this->colliderBody.info.acHitInfo;
|
||||
hurtbox = this->colliderBody.elem.acHitInfo;
|
||||
}
|
||||
if (this->flyMode != GND_FLY_PAINTING) {
|
||||
if (acHit && (this->actionFunc != BossGanondrof_Stunned) && (hurtbox->toucher.dmgFlags & DMG_RANGED)) {
|
||||
|
|
|
@ -1301,7 +1301,7 @@ void BossGoma_FloorAttack(BossGoma* this, PlayState* play) {
|
|||
switch (this->actionState) {
|
||||
case 0:
|
||||
for (i = 0; i < this->collider.count; i++) {
|
||||
if (this->collider.elements[i].info.toucherFlags & TOUCH_HIT) {
|
||||
if (this->collider.elements[i].base.toucherFlags & TOUCH_HIT) {
|
||||
this->framesUntilNextAction = 10;
|
||||
break;
|
||||
}
|
||||
|
@ -1807,12 +1807,12 @@ void BossGoma_UpdateHit(BossGoma* this, PlayState* play) {
|
|||
if (this->invincibilityFrames != 0) {
|
||||
this->invincibilityFrames--;
|
||||
} else {
|
||||
ColliderInfo* acHitInfo = this->collider.elements[0].info.acHitInfo;
|
||||
ColliderElement* acHitInfo = this->collider.elements[0].base.acHitInfo;
|
||||
s32 damage;
|
||||
|
||||
if (this->eyeClosedTimer == 0 && this->actionFunc != BossGoma_CeilingSpawnGohmas &&
|
||||
(this->collider.elements[0].info.bumperFlags & BUMP_HIT)) {
|
||||
this->collider.elements[0].info.bumperFlags &= ~BUMP_HIT;
|
||||
(this->collider.elements[0].base.bumperFlags & BUMP_HIT)) {
|
||||
this->collider.elements[0].base.bumperFlags &= ~BUMP_HIT;
|
||||
|
||||
if (this->actionFunc == BossGoma_CeilingMoveToCenter || this->actionFunc == BossGoma_CeilingIdle ||
|
||||
this->actionFunc == BossGoma_CeilingPrepareSpawnGohmas) {
|
||||
|
|
|
@ -1139,15 +1139,15 @@ void BossMo_TentCollisionCheck(BossMo* this, PlayState* play) {
|
|||
s16 i1;
|
||||
|
||||
for (i1 = 0; i1 < ARRAY_COUNT(this->tentElements); i1++) {
|
||||
if (this->tentCollider.elements[i1].info.bumperFlags & BUMP_HIT) {
|
||||
if (this->tentCollider.elements[i1].base.bumperFlags & BUMP_HIT) {
|
||||
s16 i2;
|
||||
ColliderInfo* hurtbox;
|
||||
ColliderElement* hurtbox;
|
||||
|
||||
for (i2 = 0; i2 < 19; i2++) {
|
||||
this->tentCollider.elements[i2].info.bumperFlags &= ~BUMP_HIT;
|
||||
this->tentCollider.elements[i2].info.toucherFlags &= ~TOUCH_HIT;
|
||||
this->tentCollider.elements[i2].base.bumperFlags &= ~BUMP_HIT;
|
||||
this->tentCollider.elements[i2].base.toucherFlags &= ~TOUCH_HIT;
|
||||
}
|
||||
hurtbox = this->tentCollider.elements[i1].info.acHitInfo;
|
||||
hurtbox = this->tentCollider.elements[i1].base.acHitInfo;
|
||||
this->work[MO_TENT_INVINC_TIMER] = 5;
|
||||
if (hurtbox->toucher.dmgFlags & DMG_MAGIC_FIRE) {
|
||||
func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_CUT);
|
||||
|
@ -1175,8 +1175,8 @@ void BossMo_TentCollisionCheck(BossMo* this, PlayState* play) {
|
|||
Rand_ZeroFloat(0.08f) + 0.13f);
|
||||
}
|
||||
break;
|
||||
} else if (this->tentCollider.elements[i1].info.toucherFlags & TOUCH_HIT) {
|
||||
this->tentCollider.elements[i1].info.toucherFlags &= ~TOUCH_HIT;
|
||||
} else if (this->tentCollider.elements[i1].base.toucherFlags & TOUCH_HIT) {
|
||||
this->tentCollider.elements[i1].base.toucherFlags &= ~TOUCH_HIT;
|
||||
this->playerHitTimer = 5;
|
||||
break;
|
||||
}
|
||||
|
@ -1745,7 +1745,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
if (this->coreCollider.base.acFlags & AC_HIT) {
|
||||
ColliderInfo* hurtbox = this->coreCollider.info.acHitInfo;
|
||||
ColliderElement* hurtbox = this->coreCollider.elem.acHitInfo;
|
||||
// "hit!!"
|
||||
osSyncPrintf("Core_Damage_check 当り!!\n");
|
||||
this->coreCollider.base.acFlags &= ~AC_HIT;
|
||||
|
|
|
@ -869,10 +869,10 @@ void BossSst_HeadStunned(BossSst* this, PlayState* play) {
|
|||
void BossSst_HeadSetupVulnerable(BossSst* this) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &gBongoHeadStunnedAnim, -5.0f);
|
||||
this->colliderCyl.base.acFlags |= AC_ON;
|
||||
this->colliderCyl.info.bumper.dmgFlags = DMG_SWORD | DMG_DEKU_STICK;
|
||||
this->colliderCyl.elem.bumper.dmgFlags = DMG_SWORD | DMG_DEKU_STICK;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->colliderJntSph.elements[10].info.bumperFlags |= (BUMP_ON | BUMP_HOOKABLE);
|
||||
this->colliderJntSph.elements[0].info.bumperFlags &= ~BUMP_ON;
|
||||
this->colliderJntSph.elements[10].base.bumperFlags |= (BUMP_ON | BUMP_HOOKABLE);
|
||||
this->colliderJntSph.elements[0].base.bumperFlags &= ~BUMP_ON;
|
||||
if (this->actionFunc != BossSst_HeadDamage) {
|
||||
this->timer = 50;
|
||||
}
|
||||
|
@ -925,9 +925,9 @@ void BossSst_HeadDamage(BossSst* this, PlayState* play) {
|
|||
void BossSst_HeadSetupRecover(BossSst* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gBongoHeadRecoverAnim, -5.0f);
|
||||
this->colliderCyl.base.acFlags &= ~AC_ON;
|
||||
this->colliderCyl.info.bumper.dmgFlags = DMG_DEFAULT;
|
||||
this->colliderJntSph.elements[10].info.bumperFlags &= ~(BUMP_ON | BUMP_HOOKABLE);
|
||||
this->colliderJntSph.elements[0].info.bumperFlags |= BUMP_ON;
|
||||
this->colliderCyl.elem.bumper.dmgFlags = DMG_DEFAULT;
|
||||
this->colliderJntSph.elements[10].base.bumperFlags &= ~(BUMP_ON | BUMP_HOOKABLE);
|
||||
this->colliderJntSph.elements[0].base.bumperFlags |= BUMP_ON;
|
||||
this->vVanish = true;
|
||||
this->actor.speedXZ = 5.0f;
|
||||
this->actionFunc = BossSst_HeadRecover;
|
||||
|
@ -2491,7 +2491,7 @@ void BossSst_HandSetDamage(BossSst* this, s32 damage) {
|
|||
|
||||
this->colliderJntSph.base.atFlags |= AT_ON;
|
||||
for (i = 0; i < 11; i++) {
|
||||
this->colliderJntSph.elements[i].info.toucher.damage = damage;
|
||||
this->colliderJntSph.elements[i].base.toucher.damage = damage;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ void BossTw_Init(Actor* thisx, PlayState* play2) {
|
|||
|
||||
if (this->actor.params == TW_FIRE_BLAST || this->actor.params == TW_FIRE_BLAST_GROUND) {
|
||||
this->actionFunc = BossTw_BlastFire;
|
||||
this->collider.info.toucher.effect = 1;
|
||||
this->collider.elem.toucher.effect = 1;
|
||||
} else if (this->actor.params == TW_ICE_BLAST || this->actor.params == TW_ICE_BLAST_GROUND) {
|
||||
this->actionFunc = BossTw_BlastIce;
|
||||
} else if (this->actor.params >= TW_DEATHBALL_KOTAKE) {
|
||||
|
@ -3091,7 +3091,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, PlayState* play2) {
|
|||
BossTw_TwinrovaDamage(this, play, 0);
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_TWINROBA_YOUNG_DAMAGE);
|
||||
} else if (this->collider.base.acFlags & AC_HIT) {
|
||||
ColliderInfo* info = this->collider.info.acHitInfo;
|
||||
ColliderElement* info = this->collider.elem.acHitInfo;
|
||||
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
if (info->toucher.dmgFlags & (DMG_SLINGSHOT | DMG_ARROW)) {}
|
||||
|
@ -3099,7 +3099,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, PlayState* play2) {
|
|||
} else if (this->collider.base.acFlags & AC_HIT) {
|
||||
u8 damage;
|
||||
u8 swordDamage;
|
||||
ColliderInfo* info = this->collider.info.acHitInfo;
|
||||
ColliderElement* info = this->collider.elem.acHitInfo;
|
||||
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
swordDamage = false;
|
||||
|
@ -4318,7 +4318,7 @@ void BossTw_BlastIce(BossTw* this, PlayState* play) {
|
|||
s32 BossTw_BlastShieldCheck(BossTw* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 ret = false;
|
||||
ColliderInfo* info;
|
||||
ColliderElement* info;
|
||||
|
||||
if (1) {}
|
||||
|
||||
|
@ -4326,7 +4326,7 @@ s32 BossTw_BlastShieldCheck(BossTw* this, PlayState* play) {
|
|||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
this->collider.base.atFlags &= ~AT_HIT;
|
||||
info = this->collider.info.acHitInfo;
|
||||
info = this->collider.elem.acHitInfo;
|
||||
|
||||
if (info->toucher.dmgFlags & DMG_SHIELD) {
|
||||
this->work[INVINC_TIMER] = 7;
|
||||
|
|
|
@ -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.at == &player->actor) {
|
||||
if (this->colliderBody.base.otherAC == &player->actor) {
|
||||
func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
|
||||
}
|
||||
}
|
||||
|
@ -1129,17 +1129,17 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
|
|||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 160);
|
||||
this->actor.colorFilterTimer = this->invincibilityTimer;
|
||||
} else {
|
||||
this->colliderBody.info.bumper.dmgFlags = DMG_BOOMERANG;
|
||||
this->colliderBody.elem.bumper.dmgFlags = DMG_BOOMERANG;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->colliderBody.base.acFlags & AC_HIT) {
|
||||
this->colliderBody.base.acFlags &= ~AC_HIT;
|
||||
|
||||
if (this->colliderBody.base.ac->id == ACTOR_EN_BOOM) {
|
||||
if (this->colliderBody.base.otherAT->id == ACTOR_EN_BOOM) {
|
||||
sPhase2Timer &= 0xFE00;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0, 160);
|
||||
this->colliderBody.info.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
|
||||
this->colliderBody.elem.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
|
||||
} else {
|
||||
sKillBari++;
|
||||
if ((this->actor.colorFilterTimer != 0) && !(this->actor.colorFilterParams & 0x4000)) {
|
||||
|
@ -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.at == &player->actor) {
|
||||
if (this->colliderBody.base.otherAC == &player->actor) {
|
||||
func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
|
||||
Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT);
|
||||
}
|
||||
|
@ -1217,7 +1217,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void BossVa_SetupBodyPhase3(BossVa* this) {
|
||||
this->colliderBody.info.bumper.dmgFlags = DMG_BOOMERANG;
|
||||
this->colliderBody.elem.bumper.dmgFlags = DMG_BOOMERANG;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
sPhase3StopMoving = false;
|
||||
BossVa_SetupAction(this, BossVa_BodyPhase3);
|
||||
|
@ -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.at == &player->actor) {
|
||||
if (this->colliderBody.base.otherAC == &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.at == &player->actor) {
|
||||
if (this->colliderBody.base.otherAC == &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.ac->id == ACTOR_EN_BOOM) {
|
||||
boomerang = (EnBoom*)this->colliderBody.base.ac;
|
||||
} else if (this->colliderBody.base.otherAT->id == ACTOR_EN_BOOM) {
|
||||
boomerang = (EnBoom*)this->colliderBody.base.otherAT;
|
||||
boomerang->returnTimer = 0;
|
||||
boomerang->moveTo = &player->actor;
|
||||
boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer;
|
||||
|
@ -1421,7 +1421,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
|
|||
}
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, ((sFightPhase - PHASE_4 + 1) * 1.5f) + 4.0f, 1.0f, 0.25f, 0.0f);
|
||||
}
|
||||
this->colliderBody.info.bumper.dmgFlags = DMG_BOOMERANG;
|
||||
this->colliderBody.elem.bumper.dmgFlags = DMG_BOOMERANG;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->vaBodySpinRate, 0, 1, 0x96, 0);
|
||||
if (this->timer > 0) {
|
||||
|
@ -1429,7 +1429,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
|
|||
this->timer = 35;
|
||||
}
|
||||
Math_SmoothStepToF(&this->actor.shape.yOffset, -480.0f, 1.0f, 30.0f, 0.0f);
|
||||
this->colliderBody.info.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
|
||||
this->colliderBody.elem.bumper.dmgFlags = DMG_SWORD | DMG_BOOMERANG | DMG_DEKU_STICK;
|
||||
this->timer--;
|
||||
} else {
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_26) && (this->timer < -60)) {
|
||||
|
@ -2541,11 +2541,12 @@ 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.at == &player->actor) || (this->colliderSph.base.at == &player->actor)) {
|
||||
if ((this->colliderLightning.base.otherAC == &player->actor) ||
|
||||
(this->colliderSph.base.otherAC == &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.at = NULL;
|
||||
this->colliderLightning.base.at = NULL;
|
||||
this->colliderSph.base.otherAC = NULL;
|
||||
this->colliderLightning.base.otherAC = NULL;
|
||||
}
|
||||
|
||||
this->colliderLightning.base.atFlags &= ~AT_HIT;
|
||||
|
@ -2554,8 +2555,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.ac->id == ACTOR_EN_BOOM) && (sp52 >= 128)) {
|
||||
boomerang = (EnBoom*)this->colliderSph.base.ac;
|
||||
if ((this->colliderSph.base.otherAT->id == ACTOR_EN_BOOM) && (sp52 >= 128)) {
|
||||
boomerang = (EnBoom*)this->colliderSph.base.otherAT;
|
||||
boomerang->returnTimer = 0;
|
||||
boomerang->moveTo = &player->actor;
|
||||
boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer;
|
||||
|
@ -2636,11 +2637,12 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderSph.base.atFlags & AT_HIT)) {
|
||||
if ((this->colliderLightning.base.at == &player->actor) || (this->colliderSph.base.at == &player->actor)) {
|
||||
if ((this->colliderLightning.base.otherAC == &player->actor) ||
|
||||
(this->colliderSph.base.otherAC == &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.at = NULL;
|
||||
this->colliderLightning.base.at = NULL;
|
||||
this->colliderSph.base.otherAC = NULL;
|
||||
this->colliderLightning.base.otherAC = NULL;
|
||||
}
|
||||
|
||||
this->colliderLightning.base.atFlags &= ~AT_HIT;
|
||||
|
@ -2668,8 +2670,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.ac->id == ACTOR_EN_BOOM) && (sp52 >= 64)) {
|
||||
boomerang = (EnBoom*)this->colliderSph.base.ac;
|
||||
if ((this->colliderSph.base.otherAT->id == ACTOR_EN_BOOM) && (sp52 >= 64)) {
|
||||
boomerang = (EnBoom*)this->colliderSph.base.otherAT;
|
||||
boomerang->returnTimer = 0;
|
||||
boomerang->moveTo = &player->actor;
|
||||
boomerang->actor.world.rot.y = boomerang->actor.yawTowardsPlayer;
|
||||
|
@ -2810,8 +2812,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.ac->id == ACTOR_EN_BOOM) {
|
||||
boomerang = (EnBoom*)this->colliderBody.base.ac;
|
||||
if (this->colliderBody.base.otherAT->id == ACTOR_EN_BOOM) {
|
||||
boomerang = (EnBoom*)this->colliderBody.base.otherAT;
|
||||
boomerang->returnTimer = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ void DoorKiller_FallAsRubble(DoorKiller* this, PlayState* play) {
|
|||
|
||||
s32 DoorKiller_IsHit(Actor* thisx, PlayState* play) {
|
||||
DoorKiller* this = (DoorKiller*)thisx;
|
||||
if ((this->colliderCylinder.base.acFlags & AC_HIT) && (this->colliderCylinder.info.acHitInfo != NULL)) {
|
||||
if ((this->colliderCylinder.base.acFlags & AC_HIT) && (this->colliderCylinder.elem.acHitInfo != NULL)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -422,10 +422,10 @@ void DoorKiller_Wait(DoorKiller* this, PlayState* play) {
|
|||
|
||||
if (DoorKiller_IsHit(&this->actor, play)) {
|
||||
// AC cylinder: wobble if hit by most weapons, die if hit by explosives or hammer
|
||||
if (this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & (DMG_RANGED | DMG_SLASH | DMG_DEKU_STICK)) {
|
||||
if (this->colliderCylinder.elem.acHitInfo->toucher.dmgFlags & (DMG_RANGED | DMG_SLASH | DMG_DEKU_STICK)) {
|
||||
this->timer = 16;
|
||||
this->actionFunc = DoorKiller_Wobble;
|
||||
} else if (this->colliderCylinder.info.acHitInfo->toucher.dmgFlags & (DMG_HAMMER_SWING | DMG_EXPLOSIVE)) {
|
||||
} else if (this->colliderCylinder.elem.acHitInfo->toucher.dmgFlags & (DMG_HAMMER_SWING | DMG_EXPLOSIVE)) {
|
||||
DoorKiller_SpawnRubble(&this->actor, play);
|
||||
this->actionFunc = DoorKiller_Die;
|
||||
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 20, NA_SE_EN_KDOOR_BREAK);
|
||||
|
|
|
@ -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.oc == &player->actor)) ||
|
||||
((this->hurtCollider.base.ocFlags1 & OC1_HIT) && (this->hurtCollider.base.otherOC == &player->actor)) ||
|
||||
(this->hurtCollider.base.acFlags & AC_HIT)) {
|
||||
this->hurtCollider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
|
@ -679,7 +679,8 @@ 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.oc->world.pos) - temp158f;
|
||||
moveDir =
|
||||
Math_Vec3f_Yaw(&this->dyna.actor.world.pos, &this->hurtCollider.base.otherOC->world.pos) - temp158f;
|
||||
}
|
||||
|
||||
if ((this->dyna.unk_150 == 0.0f) || (this->unk_258 == 0) ||
|
||||
|
@ -798,7 +799,7 @@ void EnAm_UpdateDamage(EnAm* this, PlayState* play) {
|
|||
if (this->dyna.actor.colChkInfo.damageEffect != AM_DMGEFF_MAGIC_FIRE_LIGHT) {
|
||||
this->unk_264 = 0;
|
||||
this->damageEffect = this->dyna.actor.colChkInfo.damageEffect;
|
||||
Actor_SetDropFlag(&this->dyna.actor, &this->hurtCollider.info, false);
|
||||
Actor_SetDropFlag(&this->dyna.actor, &this->hurtCollider.elem, false);
|
||||
|
||||
if ((this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_NUT) ||
|
||||
(this->dyna.actor.colChkInfo.damageEffect == AM_DMGEFF_STUN) ||
|
||||
|
@ -909,14 +910,14 @@ void EnAm_Update(Actor* thisx, PlayState* play) {
|
|||
if (this->hitCollider.base.atFlags & AT_HIT) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->hitCollider.base.at == &player->actor) {
|
||||
if (this->hitCollider.base.otherAC == &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.at = NULL;
|
||||
this->hitCollider.base.otherAC = NULL;
|
||||
EnAm_SetupRicochet(this, play);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ void func_809B27D8(EnAnubiceFire* this, PlayState* play) {
|
|||
Audio_PlayActorSfx2(&this->actor, NA_SE_IT_SHIELD_REFLECT_SW);
|
||||
this->cylinder.base.atFlags &= ~(AT_HIT | AT_BOUNCED | AT_TYPE_ENEMY);
|
||||
this->cylinder.base.atFlags |= AT_TYPE_PLAYER;
|
||||
this->cylinder.info.toucher.dmgFlags = DMG_DEKU_STICK;
|
||||
this->cylinder.elem.toucher.dmgFlags = DMG_DEKU_STICK;
|
||||
this->unk_15A = 30;
|
||||
this->actor.params = 1;
|
||||
this->actor.velocity.x *= -1.0f;
|
||||
|
|
|
@ -121,15 +121,15 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
|||
Collider_SetQuad(play, &this->collider, &this->actor, &sColliderInit);
|
||||
|
||||
if (this->actor.params <= ARROW_NORMAL) {
|
||||
this->collider.info.toucherFlags &= ~TOUCH_SFX_MASK;
|
||||
this->collider.info.toucherFlags |= TOUCH_SFX_NORMAL;
|
||||
this->collider.elem.toucherFlags &= ~TOUCH_SFX_MASK;
|
||||
this->collider.elem.toucherFlags |= TOUCH_SFX_NORMAL;
|
||||
}
|
||||
|
||||
if (this->actor.params < 0) {
|
||||
this->collider.base.atFlags = (AT_ON | AT_TYPE_ENEMY);
|
||||
} else if (this->actor.params <= ARROW_SEED) {
|
||||
this->collider.info.toucher.dmgFlags = dmgFlags[this->actor.params];
|
||||
LOG_HEX("this->at_info.cl_elem.at_btl_info.at_type", this->collider.info.toucher.dmgFlags,
|
||||
this->collider.elem.toucher.dmgFlags = dmgFlags[this->actor.params];
|
||||
LOG_HEX("this->at_info.cl_elem.at_btl_info.at_type", this->collider.elem.toucher.dmgFlags,
|
||||
"../z_en_arrow.c", 707);
|
||||
}
|
||||
}
|
||||
|
@ -284,8 +284,8 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
|
|||
} else {
|
||||
EffectSsHitMark_SpawnCustomScale(play, 0, 150, &this->actor.world.pos);
|
||||
|
||||
if (atTouched && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
|
||||
hitActor = this->collider.base.at;
|
||||
if (atTouched && (this->collider.elem.atHitInfo->elemType != ELEMTYPE_UNK4)) {
|
||||
hitActor = this->collider.base.otherAC;
|
||||
|
||||
if ((hitActor->update != NULL) && !(this->collider.base.atFlags & AT_BOUNCED) &&
|
||||
(hitActor->flags & ACTOR_FLAG_14)) {
|
||||
|
@ -300,10 +300,10 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
|
|||
this->hitFlags |= 1;
|
||||
this->hitFlags |= 2;
|
||||
|
||||
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HIT) {
|
||||
this->actor.world.pos.x = this->collider.info.atHitInfo->bumper.hitPos.x;
|
||||
this->actor.world.pos.y = this->collider.info.atHitInfo->bumper.hitPos.y;
|
||||
this->actor.world.pos.z = this->collider.info.atHitInfo->bumper.hitPos.z;
|
||||
if (this->collider.elem.atHitInfo->bumperFlags & BUMP_HIT) {
|
||||
this->actor.world.pos.x = this->collider.elem.atHitInfo->bumper.hitPos.x;
|
||||
this->actor.world.pos.y = this->collider.elem.atHitInfo->bumper.hitPos.y;
|
||||
this->actor.world.pos.z = this->collider.elem.atHitInfo->bumper.hitPos.z;
|
||||
}
|
||||
|
||||
func_809B3CEC(play, this);
|
||||
|
|
|
@ -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.at == &player->actor) {
|
||||
if (this->collider.base.otherAC == &player->actor) {
|
||||
func_8002F71C(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -330,9 +330,9 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
|
|||
this->timer = 0;
|
||||
this->flameScaleY = 80.0f;
|
||||
this->flameScaleX = 100.0f;
|
||||
this->collider.elements[0].info.toucherFlags = TOUCH_ON | TOUCH_SFX_HARD;
|
||||
this->collider.elements[0].info.toucher.dmgFlags = DMG_DEFAULT;
|
||||
this->collider.elements[0].info.toucher.damage = 8;
|
||||
this->collider.elements[0].base.toucherFlags = TOUCH_ON | TOUCH_SFX_HARD;
|
||||
this->collider.elements[0].base.toucher.dmgFlags = DMG_DEFAULT;
|
||||
this->collider.elements[0].base.toucher.damage = 8;
|
||||
this->bobSize = this->actionState * 20.0f;
|
||||
this->flamePrimAlpha = 255;
|
||||
this->moveMode = BBMOVE_NORMAL;
|
||||
|
@ -350,7 +350,7 @@ void EnBb_Init(Actor* thisx, PlayState* play) {
|
|||
thisx->naviEnemyId = NAVI_ENEMY_RED_BUBBLE;
|
||||
thisx->colChkInfo.damageTable = &sDamageTableRed;
|
||||
this->flameEnvColor.r = 255;
|
||||
this->collider.elements[0].info.toucher.effect = 1;
|
||||
this->collider.elements[0].base.toucher.effect = 1;
|
||||
EnBb_SetupRed(play, this);
|
||||
break;
|
||||
case ENBB_WHITE:
|
||||
|
@ -1151,10 +1151,10 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) {
|
|||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
this->dmgEffect = this->actor.colChkInfo.damageEffect;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].info, false);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, false);
|
||||
switch (this->dmgEffect) {
|
||||
case 7:
|
||||
this->actor.freezeTimer = this->collider.elements[0].info.acHitInfo->toucher.damage;
|
||||
this->actor.freezeTimer = this->collider.elements[0].base.acHitInfo->toucher.damage;
|
||||
FALLTHROUGH;
|
||||
case 5:
|
||||
this->fireIceTimer = 0x30;
|
||||
|
@ -1164,7 +1164,7 @@ void EnBb_CollisionCheck(EnBb* this, PlayState* play) {
|
|||
//! Din's Fire on a white bubble will do just that. The mechanism is complex and described below.
|
||||
goto block_15;
|
||||
case 6:
|
||||
this->actor.freezeTimer = this->collider.elements[0].info.acHitInfo->toucher.damage;
|
||||
this->actor.freezeTimer = this->collider.elements[0].base.acHitInfo->toucher.damage;
|
||||
break;
|
||||
case 8:
|
||||
case 9:
|
||||
|
|
|
@ -333,7 +333,7 @@ void func_809BD524(EnBigokuta* this) {
|
|||
this->unk_19A = 0;
|
||||
this->cylinder[0].base.atFlags |= AT_ON;
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_DAIOCTA_MAHI);
|
||||
if (this->collider.elements->info.acHitInfo->toucher.dmgFlags & DMG_DEKU_NUT) {
|
||||
if (this->collider.elements[0].base.acHitInfo->toucher.dmgFlags & DMG_DEKU_NUT) {
|
||||
this->unk_195 = true;
|
||||
this->unk_196 = 20;
|
||||
} else {
|
||||
|
|
|
@ -141,7 +141,7 @@ void EnBili_Destroy(Actor* thisx, PlayState* play) {
|
|||
|
||||
void EnBili_SetupFloatIdle(EnBili* this) {
|
||||
this->actor.speedXZ = 0.7f;
|
||||
this->collider.info.bumper.effect = 1; // Shock?
|
||||
this->collider.elem.bumper.effect = 1; // Shock?
|
||||
this->timer = 32;
|
||||
this->collider.base.atFlags |= AT_ON;
|
||||
this->collider.base.acFlags |= AC_ON;
|
||||
|
@ -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.ac->prevPos) + 0x8000;
|
||||
this->actor.world.rot.x = Actor_WorldPitchTowardPoint(&this->actor, &this->collider.base.ac->prevPos);
|
||||
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->actionFunc = EnBili_Recoil;
|
||||
this->actor.speedXZ = 5.0f;
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ void EnBili_SetupDie(EnBili* this) {
|
|||
*/
|
||||
void EnBili_SetupStunned(EnBili* this) {
|
||||
this->timer = 80;
|
||||
this->collider.info.bumper.effect = 0;
|
||||
this->collider.elem.bumper.effect = 0;
|
||||
this->actor.gravity = -1.0f;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0, 0x96, 0x2000, 0x50);
|
||||
|
@ -549,7 +549,7 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
|
|||
|
||||
if ((this->actor.colChkInfo.health != 0) && (this->collider.base.acFlags & AC_HIT)) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (Actor_ApplyDamage(&this->actor) == 0) {
|
||||
|
@ -586,7 +586,7 @@ void EnBili_UpdateDamage(EnBili* this, PlayState* play) {
|
|||
EnBili_SetupBurnt(this);
|
||||
}
|
||||
|
||||
if (this->collider.info.acHitInfo->toucher.dmgFlags & DMG_ARROW) {
|
||||
if (this->collider.elem.acHitInfo->toucher.dmgFlags & DMG_ARROW) {
|
||||
this->actor.flags |= ACTOR_FLAG_4;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ void EnBom_Init(Actor* thisx, PlayState* play) {
|
|||
Collider_InitJntSph(play, &this->explosionCollider);
|
||||
Collider_SetCylinder(play, &this->bombCollider, thisx, &sCylinderInit);
|
||||
Collider_SetJntSph(play, &this->explosionCollider, thisx, &sJntSphInit, &this->explosionColliderItems[0]);
|
||||
this->explosionColliderItems[0].info.toucher.damage += (thisx->shape.rot.z & 0xFF00) >> 8;
|
||||
this->explosionColliderItems[0].base.toucher.damage += (thisx->shape.rot.z & 0xFF00) >> 8;
|
||||
|
||||
thisx->shape.rot.z &= 0xFF;
|
||||
if (thisx->shape.rot.z & 0x80) {
|
||||
|
@ -266,8 +266,9 @@ 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.oc->category == ACTORCAT_ENEMY))) {
|
||||
if ((this->bombCollider.base.acFlags & AC_HIT) ||
|
||||
((this->bombCollider.base.ocFlags1 & OC1_HIT) &&
|
||||
(this->bombCollider.base.otherOC->category == ACTORCAT_ENEMY))) {
|
||||
this->timer = 0;
|
||||
thisx->shape.rot.z = 0;
|
||||
} else {
|
||||
|
|
|
@ -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.oc->category != ACTORCAT_PLAYER))) {
|
||||
((this->collider.base.ocFlags1 & OC1_HIT) && (this->collider.base.otherOC->category != ACTORCAT_PLAYER))) {
|
||||
EnBomChu_Explode(this, play);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -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.ac->category != ACTORCAT_BOSS) {
|
||||
if (this->bombCollider.base.otherAT->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,8 +367,9 @@ 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.oc->category == ACTORCAT_ENEMY))) {
|
||||
if ((this->bombCollider.base.acFlags & AC_HIT) ||
|
||||
((this->bombCollider.base.ocFlags1 & OC1_HIT) &&
|
||||
(this->bombCollider.base.otherOC->category == ACTORCAT_ENEMY))) {
|
||||
this->isFuseEnabled = true;
|
||||
this->timer = 0;
|
||||
} else {
|
||||
|
|
|
@ -156,10 +156,11 @@ void EnBoom_Fly(EnBoom* this, PlayState* play) {
|
|||
collided = this->collider.base.atFlags & AT_HIT;
|
||||
collided = !!(collided);
|
||||
if (collided) {
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -262,8 +262,8 @@ void EnBrob_Update(Actor* thisx, PlayState* play2) {
|
|||
|
||||
acHits[0] = (this->colliders[0].base.acFlags & AC_HIT) != 0;
|
||||
acHits[1] = (this->colliders[1].base.acFlags & AC_HIT) != 0;
|
||||
if ((acHits[0] && (this->colliders[0].info.acHitInfo->toucher.dmgFlags & DMG_BOOMERANG)) ||
|
||||
(acHits[1] && (this->colliders[1].info.acHitInfo->toucher.dmgFlags & DMG_BOOMERANG))) {
|
||||
if ((acHits[0] && (this->colliders[0].elem.acHitInfo->toucher.dmgFlags & DMG_BOOMERANG)) ||
|
||||
(acHits[1] && (this->colliders[1].elem.acHitInfo->toucher.dmgFlags & DMG_BOOMERANG))) {
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
this->colliders[i].base.atFlags &= ~(AT_HIT | AT_BOUNCED);
|
||||
|
@ -272,8 +272,8 @@ void EnBrob_Update(Actor* thisx, PlayState* play2) {
|
|||
|
||||
func_809CAEF4(this);
|
||||
} else if ((this->colliders[0].base.atFlags & AT_HIT) || (this->colliders[1].base.atFlags & AT_HIT) ||
|
||||
(acHits[0] && (this->colliders[0].info.acHitInfo->toucher.dmgFlags & DMG_SLASH_KOKIRI)) ||
|
||||
(acHits[1] && (this->colliders[1].info.acHitInfo->toucher.dmgFlags & DMG_SLASH_KOKIRI))) {
|
||||
(acHits[0] && (this->colliders[0].elem.acHitInfo->toucher.dmgFlags & DMG_SLASH_KOKIRI)) ||
|
||||
(acHits[1] && (this->colliders[1].elem.acHitInfo->toucher.dmgFlags & DMG_SLASH_KOKIRI))) {
|
||||
|
||||
if (this->actionFunc == func_809CB114 && !(this->colliders[0].base.atFlags & AT_BOUNCED) &&
|
||||
!(this->colliders[1].base.atFlags & AT_BOUNCED)) {
|
||||
|
|
|
@ -97,7 +97,7 @@ void EnBubble_SetDimensions(EnBubble* this, f32 dim) {
|
|||
}
|
||||
|
||||
u32 func_809CBCBC(EnBubble* this) {
|
||||
ColliderInfo* info = &this->colliderSphere.elements[0].info;
|
||||
ColliderElement* info = &this->colliderSphere.elements[0].base;
|
||||
|
||||
info->toucher.dmgFlags = DMG_EXPLOSIVE;
|
||||
info->toucher.effect = 0;
|
||||
|
@ -114,7 +114,7 @@ u32 func_809CBCEC(EnBubble* this) {
|
|||
}
|
||||
|
||||
void EnBubble_DamagePlayer(EnBubble* this, PlayState* play) {
|
||||
s32 damage = -this->colliderSphere.elements[0].info.toucher.damage;
|
||||
s32 damage = -this->colliderSphere.elements[0].base.toucher.damage;
|
||||
|
||||
play->damagePlayer(play, damage);
|
||||
func_8002F7A0(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
|
||||
|
@ -208,8 +208,8 @@ void EnBubble_Fly(EnBubble* this, PlayState* play) {
|
|||
s32 bgId;
|
||||
u8 bounceCount;
|
||||
|
||||
if (this->colliderSphere.elements[1].info.bumperFlags & BUMP_HIT) {
|
||||
bumpActor = this->colliderSphere.base.ac;
|
||||
if (this->colliderSphere.elements[1].base.bumperFlags & BUMP_HIT) {
|
||||
bumpActor = this->colliderSphere.base.otherAT;
|
||||
this->normalizedBumpVelocity = bumpActor->velocity;
|
||||
EnBubble_Vec3fNormalize(&this->normalizedBumpVelocity);
|
||||
this->velocityFromBump.x += (this->normalizedBumpVelocity.x * 3.0f);
|
||||
|
@ -286,10 +286,10 @@ u32 func_809CC648(EnBubble* this) {
|
|||
return false;
|
||||
}
|
||||
this->colliderSphere.base.acFlags &= ~AC_HIT;
|
||||
if (this->colliderSphere.elements[1].info.bumperFlags & BUMP_HIT) {
|
||||
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;
|
||||
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->graphicRotSpeed = 128.0f;
|
||||
this->graphicEccentricity = 0.48f;
|
||||
return false;
|
||||
|
|
|
@ -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.at) && !(this->collider1.base.atFlags & AT_BOUNCED)) {
|
||||
if ((&player->actor == this->collider1.base.otherAC) && !(this->collider1.base.atFlags & AT_BOUNCED)) {
|
||||
Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT);
|
||||
}
|
||||
}
|
||||
|
@ -690,7 +690,7 @@ void func_809D0584(EnBw* this, PlayState* play) {
|
|||
return;
|
||||
}
|
||||
this->damageEffect = this->actor.colChkInfo.damageEffect;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider2.info, false);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider2.elem, false);
|
||||
if ((this->damageEffect == 1) || (this->damageEffect == 0xE)) {
|
||||
if (this->unk_23C == 0) {
|
||||
Actor_ApplyDamage(&this->actor);
|
||||
|
@ -766,7 +766,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
|
|||
func_8002836C(play, &thisx->world.pos, &velocity, &accel, &sp50, &sp4C, 0x3C, 0, 0x14);
|
||||
}
|
||||
if (this->unk_248 <= 0.4f) {
|
||||
this->collider1.info.toucher.effect = 0;
|
||||
this->collider1.elem.toucher.effect = 0;
|
||||
if (((play->gameplayFrames & 1) == 0) && (this->unk_220 < 5) && (this->unk_23C == 0)) {
|
||||
accel.y = -0.1f;
|
||||
velocity.x = Rand_CenteredFloat(4.0f);
|
||||
|
@ -786,7 +786,7 @@ void EnBw_Update(Actor* thisx, PlayState* play2) {
|
|||
20.0f - (this->unk_248 * 40.0f));
|
||||
}
|
||||
} else {
|
||||
this->collider1.info.toucher.effect = 1;
|
||||
this->collider1.elem.toucher.effect = 1;
|
||||
}
|
||||
|
||||
this->unk_234 = Actor_TestFloorInDirection(thisx, play, 50.0f, thisx->world.rot.y);
|
||||
|
|
|
@ -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.at) ||
|
||||
(&player->actor == this->collider.base.ac) || (&player->actor == this->colliderQuad.base.at)) {
|
||||
if ((thisx->xzDistToPlayer <= 70.0f) || (&player->actor == this->collider.base.otherAC) ||
|
||||
(&player->actor == this->collider.base.otherAT) || (&player->actor == this->colliderQuad.base.otherAC)) {
|
||||
tmp33 = player->invincibilityTimer & 0xFF;
|
||||
tmp32 = thisx->world.rot.y;
|
||||
if (!(thisx->params & 0x80)) {
|
||||
tmp32 = thisx->yawTowardsPlayer;
|
||||
}
|
||||
if ((&player->actor != this->collider.base.at) && (&player->actor != this->collider.base.ac) &&
|
||||
(&player->actor != this->colliderQuad.base.at) && (player->invincibilityTimer <= 0)) {
|
||||
if ((&player->actor != this->collider.base.otherAC) && (&player->actor != this->collider.base.otherAT) &&
|
||||
(&player->actor != this->colliderQuad.base.otherAC) && (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.at = NULL;
|
||||
this->collider.base.ac = NULL;
|
||||
this->collider.base.at = NULL;
|
||||
this->colliderQuad.base.otherAC = NULL;
|
||||
this->collider.base.otherAT = NULL;
|
||||
this->collider.base.otherAC = NULL;
|
||||
this->unk_14C = 0x14;
|
||||
}
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ void EnCrow_Respawn(EnCrow* this, PlayState* play) {
|
|||
void EnCrow_UpdateDamage(EnCrow* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, true);
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (this->actor.colChkInfo.damageEffect == 1) { // Deku Nuts
|
||||
EnCrow_SetupTurnAway(this);
|
||||
|
|
|
@ -282,7 +282,7 @@ void EnDekubaba_DisableHitboxes(EnDekubaba* this) {
|
|||
s32 i;
|
||||
|
||||
for (i = 1; i < ARRAY_COUNT(this->colliderElements); i++) {
|
||||
this->collider.elements[i].info.bumperFlags &= ~BUMP_ON;
|
||||
this->collider.elements[i].base.bumperFlags &= ~BUMP_ON;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ void EnDekubaba_SetupGrow(EnDekubaba* this) {
|
|||
this->timer = 15;
|
||||
|
||||
for (i = 2; i < ARRAY_COUNT(this->colliderElements); i++) {
|
||||
this->collider.elements[i].info.ocElemFlags |= OCELEM_ON;
|
||||
this->collider.elements[i].base.ocElemFlags |= OCELEM_ON;
|
||||
}
|
||||
|
||||
this->collider.base.colType = COLTYPE_HIT6;
|
||||
|
@ -341,7 +341,7 @@ void EnDekubaba_SetupRetract(EnDekubaba* this) {
|
|||
this->timer = 15;
|
||||
|
||||
for (i = 2; i < ARRAY_COUNT(this->colliderElements); i++) {
|
||||
this->collider.elements[i].info.ocElemFlags &= ~OCELEM_ON;
|
||||
this->collider.elements[i].base.ocElemFlags &= ~OCELEM_ON;
|
||||
}
|
||||
|
||||
this->actionFunc = EnDekubaba_Retract;
|
||||
|
@ -417,7 +417,7 @@ void EnDekubaba_SetupStunnedVertical(EnDekubaba* this) {
|
|||
s32 i;
|
||||
|
||||
for (i = 1; i < ARRAY_COUNT(this->colliderElements); i++) {
|
||||
this->collider.elements[i].info.bumperFlags |= BUMP_ON;
|
||||
this->collider.elements[i].base.bumperFlags |= BUMP_ON;
|
||||
}
|
||||
|
||||
if (this->timer == 1) {
|
||||
|
|
|
@ -204,10 +204,10 @@ void EnDekunuts_SetupGasp(EnDekunuts* this) {
|
|||
|
||||
void EnDekunuts_SetupBeDamaged(EnDekunuts* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gDekuNutsDamageAnim, -3.0f);
|
||||
if (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
|
||||
if (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->collider.base.otherAT->world.rot.y;
|
||||
} else {
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 0x8000;
|
||||
}
|
||||
this->collider.base.acFlags &= ~AC_ON;
|
||||
this->actionFunc = EnDekunuts_BeDamaged;
|
||||
|
@ -444,7 +444,7 @@ void EnDekunuts_Die(EnDekunuts* this, PlayState* play) {
|
|||
void EnDekunuts_ColliderCheck(EnDekunuts* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
if (this->actor.colChkInfo.mass == 0x32) {
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (this->actor.colChkInfo.damageEffect != 1) {
|
||||
|
|
|
@ -304,8 +304,8 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
|
|||
Animation_Change(&this->skelAnime, &object_dh_Anim_004658, -1.0f, this->skelAnime.curFrame, 0.0f, ANIMMODE_ONCE,
|
||||
-4.0f);
|
||||
this->actionState = 4;
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags = AT_NONE; // also TOUCH_NONE
|
||||
this->collider2.elements[0].info.toucher.dmgFlags = this->collider2.elements[0].info.toucher.damage = 0;
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags = AT_NONE; // also TOUCH_NONE
|
||||
this->collider2.elements[0].base.toucher.dmgFlags = this->collider2.elements[0].base.toucher.damage = 0;
|
||||
}
|
||||
switch (this->actionState) {
|
||||
case 1:
|
||||
|
@ -318,16 +318,16 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
|
|||
break;
|
||||
case 2:
|
||||
if (this->skelAnime.curFrame >= 4.0f) {
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags =
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags =
|
||||
AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
|
||||
this->collider2.elements[0].info.toucher.dmgFlags = DMG_DEFAULT;
|
||||
this->collider2.elements[0].info.toucher.damage = 8;
|
||||
this->collider2.elements[0].base.toucher.dmgFlags = DMG_DEFAULT;
|
||||
this->collider2.elements[0].base.toucher.damage = 8;
|
||||
}
|
||||
if (this->collider2.base.atFlags & AT_BOUNCED) {
|
||||
this->collider2.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags =
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags =
|
||||
AT_NONE; // also TOUCH_NONE
|
||||
this->collider2.elements[0].info.toucher.dmgFlags = this->collider2.elements[0].info.toucher.damage = 0;
|
||||
this->collider2.elements[0].base.toucher.dmgFlags = this->collider2.elements[0].base.toucher.damage = 0;
|
||||
this->actionState++;
|
||||
} else if (this->collider2.base.atFlags & AT_HIT) {
|
||||
this->collider2.base.atFlags &= ~AT_HIT;
|
||||
|
@ -343,9 +343,9 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
|
|||
Animation_Change(&this->skelAnime, &object_dh_Anim_004658, -1.0f,
|
||||
Animation_GetLastFrame(&object_dh_Anim_004658), 0.0f, ANIMMODE_ONCE, -4.0f);
|
||||
this->actionState++;
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags =
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags =
|
||||
AT_NONE; // also TOUCH_NONE
|
||||
this->collider2.elements[0].info.toucher.dmgFlags = this->collider2.elements[0].info.toucher.damage = 0;
|
||||
this->collider2.elements[0].base.toucher.dmgFlags = this->collider2.elements[0].base.toucher.damage = 0;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
|
@ -374,10 +374,10 @@ void EnDh_Burrow(EnDh* this, PlayState* play) {
|
|||
case 0:
|
||||
this->actionState++;
|
||||
this->drawDirtWave++;
|
||||
this->collider1.base.atFlags = this->collider1.info.toucherFlags =
|
||||
this->collider1.base.atFlags = this->collider1.elem.toucherFlags =
|
||||
AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
|
||||
this->collider1.info.toucher.dmgFlags = DMG_DEFAULT;
|
||||
this->collider1.info.toucher.damage = 4;
|
||||
this->collider1.elem.toucher.dmgFlags = DMG_DEFAULT;
|
||||
this->collider1.elem.toucher.damage = 4;
|
||||
FALLTHROUGH;
|
||||
case 1:
|
||||
this->dirtWavePhase += 0x47E;
|
||||
|
@ -393,8 +393,8 @@ void EnDh_Burrow(EnDh* this, PlayState* play) {
|
|||
case 2:
|
||||
this->drawDirtWave = false;
|
||||
this->collider1.dim.radius = 35;
|
||||
this->collider1.base.atFlags = this->collider1.info.toucherFlags = AT_NONE; // Also TOUCH_NONE
|
||||
this->collider1.info.toucher.dmgFlags = this->collider1.info.toucher.damage = 0;
|
||||
this->collider1.base.atFlags = this->collider1.elem.toucherFlags = AT_NONE; // Also TOUCH_NONE
|
||||
this->collider1.elem.toucher.dmgFlags = this->collider1.elem.toucher.damage = 0;
|
||||
EnDh_SetupWait(this);
|
||||
break;
|
||||
}
|
||||
|
@ -477,8 +477,8 @@ void EnDh_CollisionCheck(EnDh* this, PlayState* play) {
|
|||
if ((this->collider2.base.acFlags & AC_HIT) && !this->retreat) {
|
||||
this->collider2.base.acFlags &= ~AC_HIT;
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) && (this->actor.colChkInfo.damageEffect != 6)) {
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].info.toucherFlags = AT_NONE; // also TOUCH_NONE
|
||||
this->collider2.elements[0].info.toucher.dmgFlags = this->collider2.elements[0].info.toucher.damage = 0;
|
||||
this->collider2.base.atFlags = this->collider2.elements[0].base.toucherFlags = AT_NONE; // also TOUCH_NONE
|
||||
this->collider2.elements[0].base.toucher.dmgFlags = this->collider2.elements[0].base.toucher.damage = 0;
|
||||
if (player->unk_844 != 0) {
|
||||
this->unk_258 = player->unk_845;
|
||||
}
|
||||
|
|
|
@ -231,9 +231,9 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
|
|||
if ((this->targetQuad.base.acFlags & AC_HIT) || BREG(0)) {
|
||||
this->targetQuad.base.acFlags &= ~AC_HIT;
|
||||
|
||||
dx = fabsf(targetX - this->targetQuad.info.bumper.hitPos.x);
|
||||
dy = fabsf(targetY - this->targetQuad.info.bumper.hitPos.y);
|
||||
dz = fabsf(targetZ - this->targetQuad.info.bumper.hitPos.z);
|
||||
dx = fabsf(targetX - this->targetQuad.elem.bumper.hitPos.x);
|
||||
dy = fabsf(targetY - this->targetQuad.elem.bumper.hitPos.y);
|
||||
dz = fabsf(targetZ - this->targetQuad.elem.bumper.hitPos.z);
|
||||
|
||||
scoreVel.y = 5.0f;
|
||||
|
||||
|
|
|
@ -605,13 +605,13 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) {
|
|||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if ((this->timer != 0) || (ABS(yawDiff1) < 0x4000)) {
|
||||
this->sphElements[2].info.toucherFlags = TOUCH_NONE;
|
||||
this->sphElements[1].info.toucherFlags = TOUCH_NONE;
|
||||
this->sphElements[2].base.toucherFlags = TOUCH_NONE;
|
||||
this->sphElements[1].base.toucherFlags = TOUCH_NONE;
|
||||
this->colliderBody.base.atFlags = AT_NONE;
|
||||
this->sphElements[2].info.toucher.dmgFlags = 0;
|
||||
this->sphElements[1].info.toucher.dmgFlags = 0;
|
||||
this->sphElements[2].info.toucher.damage = 0;
|
||||
this->sphElements[1].info.toucher.damage = 0;
|
||||
this->sphElements[2].base.toucher.dmgFlags = 0;
|
||||
this->sphElements[1].base.toucher.dmgFlags = 0;
|
||||
this->sphElements[2].base.toucher.damage = 0;
|
||||
this->sphElements[1].base.toucher.damage = 0;
|
||||
EnDodongo_SetupBreatheFire(this);
|
||||
this->timer = Rand_S16Offset(5, 10);
|
||||
} else {
|
||||
|
@ -628,10 +628,10 @@ void EnDodongo_SweepTail(EnDodongo* this, PlayState* play) {
|
|||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_DODO_J_TAIL);
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, animation, 2.0f);
|
||||
this->timer = 18;
|
||||
this->colliderBody.base.atFlags = this->sphElements[1].info.toucherFlags =
|
||||
this->sphElements[2].info.toucherFlags = AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
|
||||
this->sphElements[1].info.toucher.dmgFlags = this->sphElements[2].info.toucher.dmgFlags = DMG_DEFAULT;
|
||||
this->sphElements[1].info.toucher.damage = this->sphElements[2].info.toucher.damage = 8;
|
||||
this->colliderBody.base.atFlags = this->sphElements[1].base.toucherFlags =
|
||||
this->sphElements[2].base.toucherFlags = AT_ON | AT_TYPE_ENEMY; // also TOUCH_ON | TOUCH_SFX_WOOD
|
||||
this->sphElements[1].base.toucher.dmgFlags = this->sphElements[2].base.toucher.dmgFlags = DMG_DEFAULT;
|
||||
this->sphElements[1].base.toucher.damage = this->sphElements[2].base.toucher.damage = 8;
|
||||
}
|
||||
} else if (this->timer > 1) {
|
||||
Vec3f tailPos;
|
||||
|
@ -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.at == &player->actor) {
|
||||
if (this->colliderBody.base.otherAC == &player->actor) {
|
||||
Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ void EnEiyer_RotateAroundHome(EnEiyer* this) {
|
|||
}
|
||||
|
||||
void EnEiyer_SetupAppearFromGround(EnEiyer* this) {
|
||||
this->collider.info.bumper.dmgFlags = DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT;
|
||||
this->collider.elem.bumper.dmgFlags = DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT;
|
||||
Animation_PlayLoop(&this->skelanime, &gStingerIdleAnim);
|
||||
|
||||
this->actor.world.pos.x = this->actor.home.pos.x;
|
||||
|
@ -228,7 +228,7 @@ void EnEiyer_SetupInactive(EnEiyer* this) {
|
|||
void EnEiyer_SetupAmbush(EnEiyer* this, PlayState* play) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Animation_PlayOnce(&this->skelanime, &gStingerBackflipAnim);
|
||||
this->collider.info.bumper.dmgFlags = DMG_DEFAULT;
|
||||
this->collider.elem.bumper.dmgFlags = DMG_DEFAULT;
|
||||
this->basePos = this->actor.world.pos;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
this->actor.flags |= ACTOR_FLAG_IGNORE_QUAKE;
|
||||
|
@ -290,14 +290,14 @@ void EnEiyer_SetupDie(EnEiyer* this) {
|
|||
this->timer = 20;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, 40);
|
||||
|
||||
if (this->collider.info.bumper.dmgFlags != (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) {
|
||||
if (this->collider.elem.bumper.dmgFlags != (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) {
|
||||
this->actor.speedXZ = 6.0f;
|
||||
Animation_MorphToLoop(&this->skelanime, &gStingerHitAnim, -3.0f);
|
||||
} else {
|
||||
this->actor.speedXZ -= 6.0f;
|
||||
}
|
||||
|
||||
this->collider.info.bumper.dmgFlags = DMG_DEFAULT;
|
||||
this->collider.elem.bumper.dmgFlags = DMG_DEFAULT;
|
||||
this->collider.base.atFlags &= ~AT_ON;
|
||||
this->collider.base.acFlags &= ~AC_ON;
|
||||
this->actionFunc = EnEiyer_Die;
|
||||
|
@ -602,7 +602,7 @@ void EnEiyer_Stunned(EnEiyer* this, PlayState* play) {
|
|||
void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
|
||||
if (this->actor.colChkInfo.damageEffect != 0 || this->actor.colChkInfo.damage != 0) {
|
||||
if (Actor_ApplyDamage(&this->actor) == 0) {
|
||||
|
@ -612,7 +612,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, PlayState* play) {
|
|||
}
|
||||
|
||||
// If underground, one hit kill
|
||||
if (this->collider.info.bumper.dmgFlags == (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) {
|
||||
if (this->collider.elem.bumper.dmgFlags == (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT)) {
|
||||
if (this->actor.colChkInfo.damage == 0) {
|
||||
EnEiyer_SetupAmbush(this, play);
|
||||
} else {
|
||||
|
@ -687,7 +687,7 @@ s32 EnEiyer_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
pos->z += 2500.0f;
|
||||
}
|
||||
|
||||
if (this->collider.info.bumper.dmgFlags == (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) && limbIndex != 9 &&
|
||||
if (this->collider.elem.bumper.dmgFlags == (DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) && limbIndex != 9 &&
|
||||
limbIndex != 10) {
|
||||
*dList = NULL;
|
||||
}
|
||||
|
|
|
@ -275,14 +275,14 @@ s32 EnFd_CheckHammer(EnFd* this, PlayState* play) {
|
|||
|
||||
s32 EnFd_ColliderCheck(EnFd* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
ColliderInfo* info;
|
||||
ColliderElement* info;
|
||||
|
||||
if (this->collider.base.acFlags & AC_HIT || EnFd_CheckHammer(this, play)) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
if (this->invincibilityTimer != 0) {
|
||||
return false;
|
||||
}
|
||||
info = &this->collider.elements[0].info;
|
||||
info = &this->collider.elements[0].base;
|
||||
if (info->acHitInfo != NULL && (info->acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -476,7 +476,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
|
|||
? true
|
||||
: false;
|
||||
if ((this->collider.base.acFlags & AC_HIT) || canBottleReflect1) {
|
||||
ColliderInfo* hurtbox = this->collider.info.acHitInfo;
|
||||
ColliderElement* hurtbox = this->collider.elem.acHitInfo;
|
||||
s16 i2;
|
||||
Vec3f spA8;
|
||||
Vec3f sp9C = { 0.0f, -0.5f, 0.0f };
|
||||
|
|
|
@ -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.at == playerActor) {
|
||||
if (this->collider.base.otherAC == playerActor) {
|
||||
if (!(player->stateFlags1 & PLAYER_STATE1_26)) {
|
||||
func_8002F758(play, thisx, 2.0f, -player->actor.world.rot.y, 3.0f, 4);
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
void EnFirefly_Extinguish(EnFirefly* this) {
|
||||
this->actor.params += 2;
|
||||
this->collider.elements[0].info.toucher.effect = 0; // None
|
||||
this->collider.elements[0].base.toucher.effect = 0; // None
|
||||
this->auraType = KEESE_AURA_NONE;
|
||||
this->onFire = false;
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
|
||||
|
@ -130,7 +130,7 @@ void EnFirefly_Ignite(EnFirefly* this) {
|
|||
} else {
|
||||
this->actor.params -= 2;
|
||||
}
|
||||
this->collider.elements[0].info.toucher.effect = 1; // Fire
|
||||
this->collider.elements[0].base.toucher.effect = 1; // Fire
|
||||
this->auraType = KEESE_AURA_FIRE;
|
||||
this->onFire = true;
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_FIRE_KEESE;
|
||||
|
@ -174,10 +174,10 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->actor.params == KEESE_ICE_FLY) {
|
||||
this->collider.elements[0].info.toucher.effect = 2; // Ice
|
||||
this->collider.elements[0].base.toucher.effect = 2; // Ice
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_ICE_KEESE;
|
||||
} else {
|
||||
this->collider.elements[0].info.toucher.effect = 0; // Nothing
|
||||
this->collider.elements[0].base.toucher.effect = 0; // Nothing
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_KEESE;
|
||||
}
|
||||
|
||||
|
@ -620,7 +620,7 @@ 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.elements[0].info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elements[0].base, true);
|
||||
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (Actor_ApplyDamage(&this->actor) == 0) {
|
||||
|
|
|
@ -293,7 +293,7 @@ void EnFloormas_SetupSplit(EnFloormas* this) {
|
|||
ANIMMODE_ONCE, 0.0f);
|
||||
this->collider.dim.radius = sCylinderInit.dim.radius * 0.6f;
|
||||
this->collider.dim.height = sCylinderInit.dim.height * 0.6f;
|
||||
this->collider.info.bumperFlags &= ~BUMP_HOOKABLE;
|
||||
this->collider.elem.bumperFlags &= ~BUMP_HOOKABLE;
|
||||
this->actor.speedXZ = 4.0f;
|
||||
this->actor.velocity.y = 7.0f;
|
||||
// using div creates a signed check.
|
||||
|
@ -390,10 +390,10 @@ void EnFloormas_SetupSmWait(EnFloormas* this) {
|
|||
|
||||
void EnFloormas_SetupTakeDamage(EnFloormas* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f);
|
||||
if (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
|
||||
if (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->collider.base.otherAT->world.rot.y;
|
||||
} else {
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 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.oc)) {
|
||||
(&player->actor == this->collider.base.otherOC)) {
|
||||
play->grabPlayer(play, player);
|
||||
EnFloormas_SetupGrabLink(this, player);
|
||||
}
|
||||
|
@ -915,7 +915,7 @@ void EnFloormas_Merge(EnFloormas* this, PlayState* play) {
|
|||
this->actor.flags &= ~ACTOR_FLAG_4;
|
||||
EnFloormas_MakeVulnerable(this);
|
||||
this->actor.params = 0;
|
||||
this->collider.info.bumperFlags |= BUMP_HOOKABLE;
|
||||
this->collider.elem.bumperFlags |= BUMP_HOOKABLE;
|
||||
this->actor.colChkInfo.health = sColChkInfoInit.health;
|
||||
EnFloormas_SetupStand(this);
|
||||
} else {
|
||||
|
@ -979,14 +979,14 @@ void EnFloormas_ColliderCheck(EnFloormas* this, PlayState* play) {
|
|||
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (this->collider.base.colType != COLTYPE_HARD) {
|
||||
isSmall = 0;
|
||||
if (this->actor.scale.x < 0.01f) {
|
||||
isSmall = 1;
|
||||
}
|
||||
if (isSmall && this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT) {
|
||||
if (isSmall && this->collider.elem.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT) {
|
||||
this->actor.colChkInfo.damage = 2;
|
||||
this->actor.colChkInfo.damageEffect = 0;
|
||||
}
|
||||
|
|
|
@ -135,10 +135,10 @@ Vec3f* EnFw_GetPosAdjAroundCircle(Vec3f* dst, EnFw* this, f32 radius, s16 dir) {
|
|||
}
|
||||
|
||||
s32 EnFw_CheckCollider(EnFw* this, PlayState* play) {
|
||||
ColliderInfo* info;
|
||||
ColliderElement* info;
|
||||
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
info = &this->collider.elements[0].info;
|
||||
info = &this->collider.elements[0].base;
|
||||
if (info->acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT) {
|
||||
this->lastDmgHook = true;
|
||||
} else {
|
||||
|
|
|
@ -135,7 +135,7 @@ void EnGSwitch_Init(Actor* thisx, PlayState* play) {
|
|||
this->actor.scale.x = 0.25f;
|
||||
this->actor.scale.y = 0.45f;
|
||||
this->actor.scale.z = 0.25f;
|
||||
this->collider.info.bumper.dmgFlags = DMG_ARROW;
|
||||
this->collider.elem.bumper.dmgFlags = DMG_ARROW;
|
||||
this->objId = OBJECT_TSUBO;
|
||||
this->objIndex = Object_GetIndex(&play->objectCtx, this->objId);
|
||||
if (this->objIndex < 0) {
|
||||
|
@ -181,9 +181,9 @@ void EnGSwitch_Break(EnGSwitch* this, PlayState* play) {
|
|||
randPos.x = this->actor.world.pos.x + Rand_CenteredFloat(40.0f);
|
||||
randPos.y = this->actor.world.pos.y + 30.0f + Rand_CenteredFloat(35.0f);
|
||||
randPos.z = this->actor.world.pos.z + Rand_CenteredFloat(40.0f);
|
||||
hitPos.x = this->collider.info.bumper.hitPos.x;
|
||||
hitPos.y = this->collider.info.bumper.hitPos.y;
|
||||
hitPos.z = this->collider.info.bumper.hitPos.z;
|
||||
hitPos.x = this->collider.elem.bumper.hitPos.x;
|
||||
hitPos.y = this->collider.elem.bumper.hitPos.y;
|
||||
hitPos.z = this->collider.elem.bumper.hitPos.z;
|
||||
EffectSsHitMark_SpawnCustomScale(play, EFFECT_HITMARK_WHITE, 700, &hitPos);
|
||||
if (this->type == ENGSWITCH_ARCHERY_POT) {
|
||||
velocity.y = 15.0f;
|
||||
|
|
|
@ -554,8 +554,8 @@ void EnGe2_Update(Actor* thisx, PlayState* play) {
|
|||
if ((this->stateFlags & GE2_STATE_KO) || (this->stateFlags & GE2_STATE_CAPTURING)) {
|
||||
this->actionFunc(this, play);
|
||||
} else if (this->collider.base.acFlags & AC_HIT) {
|
||||
if ((this->collider.info.acHitInfo != NULL) &&
|
||||
(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) {
|
||||
if ((this->collider.elem.acHitInfo != NULL) &&
|
||||
(this->collider.elem.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT)) {
|
||||
Actor_SetColorFilter(&this->actor, 0, 120, 0, 400);
|
||||
this->actor.update = EnGe2_UpdateStunned;
|
||||
return;
|
||||
|
@ -604,8 +604,8 @@ void EnGe2_UpdateStunned(Actor* thisx, PlayState* play2) {
|
|||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 40.0f, 25.0f, 40.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
|
||||
|
||||
if ((this->collider.base.acFlags & AC_HIT) && ((this->collider.info.acHitInfo == NULL) ||
|
||||
!(this->collider.info.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT))) {
|
||||
if ((this->collider.base.acFlags & AC_HIT) && ((this->collider.elem.acHitInfo == NULL) ||
|
||||
!(this->collider.elem.acHitInfo->toucher.dmgFlags & DMG_HOOKSHOT))) {
|
||||
this->actor.colorFilterTimer = 0;
|
||||
EnGe2_ChangeAction(this, GE2_ACTION_KNOCKEDOUT);
|
||||
this->timer = 100;
|
||||
|
|
|
@ -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.at) {
|
||||
if (&player->actor == this->swordCollider.base.otherAC) {
|
||||
func_8002F71C(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
|
||||
this->spinAttackState = 2;
|
||||
func_8002DF54(play, &this->actor, 0x18);
|
||||
|
@ -1368,7 +1368,7 @@ void EnGeldB_CollisionCheck(EnGeldB* this, PlayState* play) {
|
|||
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
||||
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
|
||||
this->damageEffect = this->actor.colChkInfo.damageEffect;
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
|
||||
Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
|
||||
if ((this->actor.colChkInfo.damageEffect == GELDB_DMG_STUN) ||
|
||||
(this->actor.colChkInfo.damageEffect == GELDB_DMG_FREEZE)) {
|
||||
|
|
|
@ -1343,7 +1343,7 @@ void EnGo2_GetItemAnimation(EnGo2* this, PlayState* play) {
|
|||
|
||||
void EnGo2_SetupRolling(EnGo2* this, PlayState* play) {
|
||||
if ((this->actor.params & 0x1F) == GORON_CITY_ROLLING_BIG || (this->actor.params & 0x1F) == GORON_CITY_LINK) {
|
||||
this->collider.info.bumperFlags = BUMP_ON;
|
||||
this->collider.elem.bumperFlags = BUMP_ON;
|
||||
this->actor.speedXZ = GET_INFTABLE(INFTABLE_11E) ? 6.0f : 3.6000001f;
|
||||
} else {
|
||||
this->actor.speedXZ = 6.0f;
|
||||
|
@ -1367,7 +1367,7 @@ void EnGo2_StopRolling(EnGo2* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
this->collider.info.bumperFlags = BUMP_NONE;
|
||||
this->collider.elem.bumperFlags = BUMP_NONE;
|
||||
}
|
||||
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
|
|
|
@ -610,7 +610,7 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) {
|
|||
if (this->hurtTimer != 0) {
|
||||
this->hurtTimer--;
|
||||
} else {
|
||||
ColliderInfo* acHitInfo;
|
||||
ColliderElement* acHitInfo;
|
||||
u8 swordDamage;
|
||||
|
||||
if ((this->colCyl1.base.atFlags & AT_HIT) && this->actionFunc == EnGoma_Jump) {
|
||||
|
@ -620,7 +620,7 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((this->colCyl2.base.acFlags & AC_HIT) && (s8)this->actor.colChkInfo.health > 0) {
|
||||
acHitInfo = this->colCyl2.info.acHitInfo;
|
||||
acHitInfo = this->colCyl2.elem.acHitInfo;
|
||||
this->colCyl2.base.acFlags &= ~AC_HIT;
|
||||
|
||||
if (this->gomaType == ENGOMA_NORMAL) {
|
||||
|
|
|
@ -461,8 +461,8 @@ void EnHintnuts_Freeze(EnHintnuts* this, PlayState* play) {
|
|||
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.info, true);
|
||||
if (this->collider.base.ac->id != ACTOR_EN_NUTSBALL) {
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
if (this->collider.base.otherAT->id != ACTOR_EN_NUTSBALL) {
|
||||
EnHintnuts_SetupBurrow(this);
|
||||
} else {
|
||||
EnHintnuts_HitByScrubProjectile1(this, play);
|
||||
|
|
|
@ -567,7 +567,7 @@ void EnHorse_UpdateIngoRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceIn
|
|||
|
||||
if (distSq < SQ(300.0f)) {
|
||||
playerDist = this->actor.xzDistToPlayer;
|
||||
if (playerDist < 130.0f || this->jntSph.elements[0].info.ocElemFlags & OCELEM_HIT) {
|
||||
if (playerDist < 130.0f || this->jntSph.elements[0].base.ocElemFlags & OCELEM_HIT) {
|
||||
if (Math_SinS(this->actor.yawTowardsPlayer - this->actor.world.rot.y) > 0.0f) {
|
||||
this->actor.world.rot.y = this->actor.world.rot.y - 280;
|
||||
} else {
|
||||
|
@ -3526,7 +3526,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) {
|
|||
this->rider->shape.rot.y = thisx->shape.rot.y;
|
||||
}
|
||||
}
|
||||
if (this->jntSph.elements[0].info.ocElemFlags & OCELEM_HIT) {
|
||||
if (this->jntSph.elements[0].base.ocElemFlags & OCELEM_HIT) {
|
||||
if (thisx->speedXZ > 6.0f) {
|
||||
thisx->speedXZ -= 1.0f;
|
||||
}
|
||||
|
|
|
@ -586,7 +586,7 @@ void func_80A75790(EnIk* this) {
|
|||
s16 yaw;
|
||||
s16 yawDiff;
|
||||
|
||||
yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->bodyCollider.base.ac->world.pos);
|
||||
yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->bodyCollider.base.otherAT->world.pos);
|
||||
this->unk_2F8 = 0;
|
||||
yawDiff = yaw - this->actor.shape.rot.y;
|
||||
if (ABS(yawDiff) <= 0x4000) {
|
||||
|
@ -683,7 +683,7 @@ void func_80A75C38(EnIk* this, PlayState* play) {
|
|||
}
|
||||
sp38 = this->actor.world.pos;
|
||||
sp38.y += 50.0f;
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
|
||||
this->unk_2FD = this->actor.colChkInfo.damageEffect;
|
||||
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
|
@ -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.at) {
|
||||
if (&player->actor == this->axeCollider.base.otherAC) {
|
||||
prevInvincibilityTimer = player->invincibilityTimer;
|
||||
if (player->invincibilityTimer <= 0) {
|
||||
if (player->invincibilityTimer < -39) {
|
||||
|
|
|
@ -356,7 +356,7 @@ void EnIshi_Wait(EnIshi* this, PlayState* play) {
|
|||
EnIshi_SpawnBugs(this, play);
|
||||
}
|
||||
} else if ((this->collider.base.acFlags & AC_HIT) && (type == ROCK_SMALL) &&
|
||||
this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_HAMMER | DMG_EXPLOSIVE)) {
|
||||
this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_HAMMER | DMG_EXPLOSIVE)) {
|
||||
EnIshi_DropCollectible(this, play);
|
||||
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, sBreakSfxDurations[type], sBreakSfxIds[type]);
|
||||
sFragmentSpawnFuncs[type](this, play);
|
||||
|
|
|
@ -295,7 +295,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
|
|||
this->actor.world.pos.z, this->actor.shape.rot.x,
|
||||
this->actor.shape.rot.y, this->actor.shape.rot.z, ENKANBAN_PIECE);
|
||||
if (piece != NULL) {
|
||||
ColliderInfo* hitItem = this->collider.info.acHitInfo;
|
||||
ColliderElement* hitItem = this->collider.elem.acHitInfo;
|
||||
s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
u8 i;
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ void EnKarebaba_ResetCollider(EnKarebaba* this) {
|
|||
this->bodyCollider.dim.height = 25;
|
||||
this->bodyCollider.base.colType = COLTYPE_HARD;
|
||||
this->bodyCollider.base.acFlags |= AC_HARD;
|
||||
this->bodyCollider.info.bumper.dmgFlags = DMG_DEFAULT;
|
||||
this->bodyCollider.elem.bumper.dmgFlags = DMG_DEFAULT;
|
||||
this->headCollider.dim.height = 25;
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ void EnKarebaba_SetupUpright(EnKarebaba* this) {
|
|||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->bodyCollider.base.colType = COLTYPE_HIT6;
|
||||
this->bodyCollider.base.acFlags &= ~AC_HARD;
|
||||
this->bodyCollider.info.bumper.dmgFlags =
|
||||
this->bodyCollider.elem.bumper.dmgFlags =
|
||||
!LINK_IS_ADULT ? ((DMG_SWORD | DMG_BOOMERANG) & ~DMG_JUMP_MASTER) : (DMG_SWORD | DMG_BOOMERANG);
|
||||
this->bodyCollider.dim.radius = 15;
|
||||
this->bodyCollider.dim.height = 80;
|
||||
|
|
|
@ -97,7 +97,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play2) {
|
|||
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_17;
|
||||
this->unk_1CA = 1;
|
||||
this->collider.info.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
|
||||
this->collider.elem.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
|
||||
this->unk_1C6 = 1;
|
||||
this->unk_1C9 = ((this->unk_1C7 == 1) ? 2 : 4);
|
||||
func_80A9EFE0(this, func_80A9F9B4);
|
||||
|
@ -196,11 +196,11 @@ void func_80A9F408(EnMThunder* this, PlayState* play) {
|
|||
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
|
||||
}
|
||||
if (player->unk_858 < 0.85f) {
|
||||
this->collider.info.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
|
||||
this->collider.elem.toucher.dmgFlags = D_80AA044C[this->unk_1C7];
|
||||
this->unk_1C6 = 1;
|
||||
this->unk_1C9 = ((this->unk_1C7 == 1) ? 2 : 4);
|
||||
} else {
|
||||
this->collider.info.toucher.dmgFlags = D_80AA0458[this->unk_1C7];
|
||||
this->collider.elem.toucher.dmgFlags = D_80AA0458[this->unk_1C7];
|
||||
this->unk_1C6 = 0;
|
||||
this->unk_1C9 = ((this->unk_1C7 == 1) ? 4 : 8);
|
||||
}
|
||||
|
|
|
@ -296,7 +296,7 @@ void EnMb_Init(Actor* thisx, PlayState* play) {
|
|||
this->actor.uncullZoneScale = 800.0f;
|
||||
this->actor.uncullZoneDownward = 1800.0f;
|
||||
this->playerDetectionRange = 710.0f;
|
||||
this->attackCollider.info.toucher.dmgFlags = DMG_UNBLOCKABLE;
|
||||
this->attackCollider.elem.toucher.dmgFlags = DMG_UNBLOCKABLE;
|
||||
|
||||
relYawFromPlayer =
|
||||
this->actor.world.rot.y - Math_Vec3f_Yaw(&this->actor.world.pos, &player->actor.world.pos);
|
||||
|
@ -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.at == &player->actor) {
|
||||
if (this->attackCollider.base.otherAC == &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.at == &player->actor) {
|
||||
if (this->attackCollider.base.otherAC == &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.at == &player->actor) {
|
||||
if (this->attackCollider.base.otherAC == &player->actor) {
|
||||
if (!endCharge && !(player->stateFlags2 & PLAYER_STATE2_7)) {
|
||||
if (player->invincibilityTimer < 0) {
|
||||
if (player->invincibilityTimer <= -40) {
|
||||
|
@ -1386,7 +1386,7 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
|
|||
}
|
||||
this->damageEffect = this->actor.colChkInfo.damageEffect;
|
||||
this->attack = ENMB_ATTACK_NONE;
|
||||
Actor_SetDropFlag(&this->actor, &this->hitbox.info, false);
|
||||
Actor_SetDropFlag(&this->actor, &this->hitbox.elem, false);
|
||||
if (this->actor.colChkInfo.damageEffect == ENMB_DMGEFF_STUN ||
|
||||
this->actor.colChkInfo.damageEffect == ENMB_DMGEFF_STUN_ICE) {
|
||||
if (this->state != ENMB_STATE_STUNNED) {
|
||||
|
|
|
@ -120,7 +120,7 @@ void func_80ABBBA8(EnNutsball* this, PlayState* play) {
|
|||
this->collider.base.atFlags &= ~AT_TYPE_ENEMY & ~AT_BOUNCED & ~AT_HIT;
|
||||
this->collider.base.atFlags |= AT_TYPE_PLAYER;
|
||||
|
||||
this->collider.info.toucher.dmgFlags = DMG_DEKU_STICK;
|
||||
this->collider.elem.toucher.dmgFlags = DMG_DEKU_STICK;
|
||||
Matrix_MtxFToYXZRotS(&player->shieldMf, &sp4C, 0);
|
||||
this->actor.world.rot.y = sp4C.y + 0x8000;
|
||||
this->timer = 30;
|
||||
|
|
|
@ -305,9 +305,9 @@ s32 EnNy_CollisionCheck(EnNy* this, PlayState* play) {
|
|||
} else {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
effectPos.x = this->collider.elements[0].info.bumper.hitPos.x;
|
||||
effectPos.y = this->collider.elements[0].info.bumper.hitPos.y;
|
||||
effectPos.z = this->collider.elements[0].info.bumper.hitPos.z;
|
||||
effectPos.x = this->collider.elements[0].base.bumper.hitPos.x;
|
||||
effectPos.y = this->collider.elements[0].base.bumper.hitPos.y;
|
||||
effectPos.z = this->collider.elements[0].base.bumper.hitPos.z;
|
||||
if ((this->unk_1E0 == 0.25f) && (this->unk_1D4 == 0xFF)) {
|
||||
switch (this->actor.colChkInfo.damageEffect) {
|
||||
case 0xE:
|
||||
|
|
|
@ -490,7 +490,7 @@ void EnOkuta_ProjectileFly(EnOkuta* this, PlayState* play) {
|
|||
this->collider.base.atFlags & AT_BOUNCED) {
|
||||
this->collider.base.atFlags &= ~(AT_HIT | AT_BOUNCED | AT_TYPE_ENEMY);
|
||||
this->collider.base.atFlags |= AT_TYPE_PLAYER;
|
||||
this->collider.info.toucher.dmgFlags = DMG_DEKU_STICK;
|
||||
this->collider.elem.toucher.dmgFlags = DMG_DEKU_STICK;
|
||||
Matrix_MtxFToYXZRotS(&player->shieldMf, &shieldRot, 0);
|
||||
this->actor.world.rot.y = shieldRot.y + 0x8000;
|
||||
this->timer = 30;
|
||||
|
@ -555,7 +555,7 @@ void EnOkuta_UpdateHeadScale(EnOkuta* this) {
|
|||
void EnOkuta_ColliderCheck(EnOkuta* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
this->actor.colChkInfo.health = 0;
|
||||
|
|
|
@ -231,7 +231,7 @@ void EnPeehat_Init(Actor* thisx, PlayState* play) {
|
|||
this->colCylinder.dim.radius = 25;
|
||||
this->colCylinder.dim.height = 15;
|
||||
this->colCylinder.dim.yShift = -5;
|
||||
this->colCylinder.info.bumper.dmgFlags = DMG_ARROW | DMG_SLINGSHOT;
|
||||
this->colCylinder.elem.bumper.dmgFlags = DMG_ARROW | DMG_SLINGSHOT;
|
||||
this->colQuad.base.atFlags = AT_ON | AT_TYPE_ENEMY;
|
||||
this->colQuad.base.acFlags = AC_ON | AC_TYPE_PLAYER;
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_PEAHAT_LARVA;
|
||||
|
@ -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.at) {
|
||||
if (!(this->colCylinder.base.acFlags & AC_HIT) && &player->actor == this->colQuad.base.otherAC) {
|
||||
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.at || this->colCylinder.base.acFlags & AC_HIT) {
|
||||
if (&player->actor != this->colQuad.base.otherAC || 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.at) {
|
||||
if (&player->actor == this->colQuad.base.otherAC) {
|
||||
EnPeehat_SetStateAttackRecoil(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,10 +263,10 @@ void EnPoField_SetupFlee(EnPoField* this) {
|
|||
|
||||
void EnPoField_SetupDamage(EnPoField* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gPoeFieldDamagedAnim, -6.0f);
|
||||
if (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
|
||||
if (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->collider.base.otherAT->world.rot.y;
|
||||
} else {
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 0x8000;
|
||||
}
|
||||
this->collider.base.acFlags &= ~(AC_HIT | AC_ON);
|
||||
this->actor.speedXZ = 5.0f;
|
||||
|
|
|
@ -209,8 +209,8 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) {
|
|||
func_80AD9AA8(this, play);
|
||||
} else {
|
||||
this->actor.flags &= ~(ACTOR_FLAG_9 | ACTOR_FLAG_14);
|
||||
this->collider.info.elemType = ELEMTYPE_UNK4;
|
||||
this->collider.info.bumper.dmgFlags |= DMG_DEKU_NUT;
|
||||
this->collider.elem.elemType = ELEMTYPE_UNK4;
|
||||
this->collider.elem.bumper.dmgFlags |= DMG_DEKU_NUT;
|
||||
this->collider.base.ocFlags1 = OC1_NONE;
|
||||
func_80AD9C24(this, NULL);
|
||||
}
|
||||
|
@ -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.ac != NULL) {
|
||||
this->actor.world.rot.y = (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT))
|
||||
? this->collider.base.ac->world.rot.y
|
||||
: Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
|
||||
if (this->collider.base.otherAT != 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;
|
||||
}
|
||||
if (this->unk_194 != 0) {
|
||||
this->actor.speedXZ = 10.0f;
|
||||
|
@ -744,7 +744,7 @@ void func_80ADAD54(EnPoSisters* this, PlayState* play) {
|
|||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->unk_22E.a = 0;
|
||||
this->collider.info.bumper.dmgFlags = DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_DEKU_NUT;
|
||||
this->collider.elem.bumper.dmgFlags = DMG_MAGIC_ICE | DMG_MAGIC_FIRE | DMG_DEKU_NUT;
|
||||
func_80AD93C4(this);
|
||||
} else {
|
||||
endFrame = this->skelAnime.endFrame;
|
||||
|
@ -757,7 +757,7 @@ void func_80ADAE6C(EnPoSisters* this, PlayState* play) {
|
|||
this->unk_22E.a = 255;
|
||||
if (this->unk_194 != 0) {
|
||||
this->unk_199 |= 1;
|
||||
this->collider.info.bumper.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE |
|
||||
this->collider.elem.bumper.dmgFlags = (DMG_SWORD | DMG_ARROW | DMG_HAMMER | DMG_MAGIC_ICE | DMG_MAGIC_FIRE |
|
||||
DMG_HOOKSHOT | DMG_EXPLOSIVE | DMG_DEKU_STICK);
|
||||
if (this->unk_19A != 0) {
|
||||
this->unk_19A--;
|
||||
|
@ -1134,7 +1134,7 @@ void func_80ADC10C(EnPoSisters* this, PlayState* play) {
|
|||
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
if (this->unk_195 != 0) {
|
||||
((EnPoSisters*)this->actor.parent)->unk_19C--;
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_PO_LAUGH2);
|
||||
|
|
|
@ -293,10 +293,10 @@ void func_80ADE28C(EnPoh* this) {
|
|||
} else {
|
||||
Animation_PlayOnce(&this->skelAnime, &gPoeComposerDamagedAnim);
|
||||
}
|
||||
if (this->colliderCyl.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->colliderCyl.base.ac->world.rot.y;
|
||||
if (this->colliderCyl.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->colliderCyl.base.otherAT->world.rot.y;
|
||||
} else {
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCyl.base.ac) + 0x8000;
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->colliderCyl.base.otherAT) + 0x8000;
|
||||
}
|
||||
this->colliderCyl.base.acFlags &= ~AC_ON;
|
||||
this->actor.speedXZ = 5.0f;
|
||||
|
|
|
@ -800,7 +800,7 @@ void EnRd_UpdateDamage(EnRd* this, PlayState* play) {
|
|||
this->damageEffect = this->actor.colChkInfo.damageEffect;
|
||||
|
||||
if (this->action != REDEAD_ACTION_RISE_FROM_COFFIN) {
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
if (player->unk_844 != 0) {
|
||||
this->unk_31D = player->unk_845;
|
||||
}
|
||||
|
|
|
@ -121,8 +121,8 @@ void EnReeba_Init(Actor* thisx, PlayState* play) {
|
|||
this->scale *= 1.5f;
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ リーバぼす登場 ☆☆☆☆☆ %f\n" VT_RST, this->scale);
|
||||
this->actor.colChkInfo.health = 20;
|
||||
this->collider.info.toucher.effect = 4;
|
||||
this->collider.info.toucher.damage = 16;
|
||||
this->collider.elem.toucher.effect = 4;
|
||||
this->collider.elem.toucher.damage = 16;
|
||||
Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY);
|
||||
}
|
||||
|
||||
|
@ -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.at == &player->actor) && !this->isBig && (this->actionfunc != func_80AE56E0)) {
|
||||
if ((this->collider.base.otherAC == &player->actor) && !this->isBig && (this->actionfunc != func_80AE56E0)) {
|
||||
this->actionfunc = func_80AE5688;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -417,9 +417,9 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
|
|||
this->collider2.base.acFlags &= ~AC_HIT;
|
||||
// "Kakin" (not sure what this means)
|
||||
osSyncPrintf(VT_FGCOL(GREEN) "カキン(%d)!!" VT_RST "\n", this->frameCount);
|
||||
hitPos.x = this->collider2.info.bumper.hitPos.x;
|
||||
hitPos.y = this->collider2.info.bumper.hitPos.y;
|
||||
hitPos.z = this->collider2.info.bumper.hitPos.z;
|
||||
hitPos.x = this->collider2.elem.bumper.hitPos.x;
|
||||
hitPos.y = this->collider2.elem.bumper.hitPos.y;
|
||||
hitPos.z = this->collider2.elem.bumper.hitPos.z;
|
||||
CollisionCheck_SpawnShieldParticlesMetal2(play, &hitPos);
|
||||
} else {
|
||||
if (this->collider1.base.acFlags & AC_HIT) {
|
||||
|
@ -427,9 +427,9 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
|
|||
|
||||
this->collider1.base.acFlags &= ~AC_HIT;
|
||||
if (this->actor.colChkInfo.damageEffect != 0) {
|
||||
hitPos.x = this->collider1.info.bumper.hitPos.x;
|
||||
hitPos.y = this->collider1.info.bumper.hitPos.y;
|
||||
hitPos.z = this->collider1.info.bumper.hitPos.z;
|
||||
hitPos.x = this->collider1.elem.bumper.hitPos.x;
|
||||
hitPos.y = this->collider1.elem.bumper.hitPos.y;
|
||||
hitPos.z = this->collider1.elem.bumper.hitPos.z;
|
||||
CollisionCheck_BlueBlood(play, NULL, &hitPos);
|
||||
}
|
||||
switch (this->actor.colChkInfo.damageEffect) {
|
||||
|
|
|
@ -388,7 +388,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) {
|
|||
FALLTHROUGH;
|
||||
case 15: // explosions, arrow, hammer, ice arrow, light arrow, spirit arrow, shadow arrow
|
||||
if (EnSb_IsVulnerable(this)) {
|
||||
hitY = this->collider.info.bumper.hitPos.y - this->actor.world.pos.y;
|
||||
hitY = this->collider.elem.bumper.hitPos.y - this->actor.world.pos.y;
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if ((hitY < 30.0f) && (hitY > 10.0f) && (yawDiff >= -0x1FFF) && (yawDiff < 0x2000)) {
|
||||
Actor_ApplyDamage(&this->actor);
|
||||
|
@ -406,7 +406,7 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) {
|
|||
case 1: // hookshot/longshot
|
||||
case 13: // all sword damage
|
||||
if (EnSb_IsVulnerable(this)) {
|
||||
hitY = this->collider.info.bumper.hitPos.y - this->actor.world.pos.y;
|
||||
hitY = this->collider.elem.bumper.hitPos.y - this->actor.world.pos.y;
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
if ((hitY < 30.0f) && (hitY > 10.0f) && (yawDiff >= -0x1FFF) && (yawDiff < 0x2000)) {
|
||||
Actor_ApplyDamage(&this->actor);
|
||||
|
@ -430,9 +430,9 @@ s32 EnSb_UpdateDamage(EnSb* this, PlayState* play) {
|
|||
|
||||
// if player attack didn't do damage, play recoil sound effect and spawn sparks
|
||||
if (!tookDamage) {
|
||||
hitPoint.x = this->collider.info.bumper.hitPos.x;
|
||||
hitPoint.y = this->collider.info.bumper.hitPos.y;
|
||||
hitPoint.z = this->collider.info.bumper.hitPos.z;
|
||||
hitPoint.x = this->collider.elem.bumper.hitPos.x;
|
||||
hitPoint.y = this->collider.elem.bumper.hitPos.y;
|
||||
hitPoint.z = this->collider.elem.bumper.hitPos.z;
|
||||
CollisionCheck_SpawnShieldParticlesMetal2(play, &hitPoint);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ void EnShopnuts_SpawnSalesman(EnShopnuts* this, PlayState* play) {
|
|||
void EnShopnuts_ColliderCheck(EnShopnuts* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
EnShopnuts_SetupSpawnSalesman(this);
|
||||
} else if (play->actorCtx.unk_02 != 0) {
|
||||
EnShopnuts_SetupSpawnSalesman(this);
|
||||
|
|
|
@ -459,7 +459,7 @@ void EnSkb_CheckDamage(EnSkb* this, PlayState* play) {
|
|||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
if (this->actor.colChkInfo.damageEffect != 6) {
|
||||
this->lastDamageEffect = this->actor.colChkInfo.damageEffect;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elements[1].info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elements[1].base, true);
|
||||
this->setColliderAT = false;
|
||||
if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
if (this->actionState != SKB_BEHAVIOR_STUNNED) {
|
||||
|
|
|
@ -581,9 +581,9 @@ s32 EnSkj_CollisionCheck(EnSkj* this, PlayState* play) {
|
|||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
switch (this->actor.colChkInfo.damageEffect) {
|
||||
case 0xF:
|
||||
effectPos.x = this->collider.info.bumper.hitPos.x;
|
||||
effectPos.y = this->collider.info.bumper.hitPos.y;
|
||||
effectPos.z = this->collider.info.bumper.hitPos.z;
|
||||
effectPos.x = this->collider.elem.bumper.hitPos.x;
|
||||
effectPos.y = this->collider.elem.bumper.hitPos.y;
|
||||
effectPos.z = this->collider.elem.bumper.hitPos.z;
|
||||
|
||||
EnSkj_SpawnBlood(play, &effectPos);
|
||||
EffectSsHitMark_SpawnFixedScale(play, 1, &effectPos);
|
||||
|
|
|
@ -200,15 +200,15 @@ void EnSsh_InitColliders(EnSsh* this, PlayState* play) {
|
|||
Collider_SetCylinder(play, &this->colCylinder[i], &this->actor, cylinders[i]);
|
||||
}
|
||||
|
||||
this->colCylinder[0].info.bumper.dmgFlags =
|
||||
this->colCylinder[0].elem.bumper.dmgFlags =
|
||||
DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT;
|
||||
this->colCylinder[1].info.bumper.dmgFlags =
|
||||
this->colCylinder[1].elem.bumper.dmgFlags =
|
||||
DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT) &
|
||||
~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE);
|
||||
this->colCylinder[2].base.colType = COLTYPE_METAL;
|
||||
this->colCylinder[2].info.bumperFlags = BUMP_ON | BUMP_HOOKABLE | BUMP_NO_AT_INFO;
|
||||
this->colCylinder[2].info.elemType = ELEMTYPE_UNK2;
|
||||
this->colCylinder[2].info.bumper.dmgFlags =
|
||||
this->colCylinder[2].elem.bumperFlags = BUMP_ON | BUMP_HOOKABLE | BUMP_NO_AT_INFO;
|
||||
this->colCylinder[2].elem.elemType = ELEMTYPE_UNK2;
|
||||
this->colCylinder[2].elem.bumper.dmgFlags =
|
||||
DMG_DEFAULT & ~(DMG_ARROW | DMG_MAGIC_FIRE | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_EXPLOSIVE | DMG_DEKU_NUT);
|
||||
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(2), &sColChkInfoInit);
|
||||
|
@ -434,17 +434,17 @@ void EnSsh_Sway(EnSsh* this) {
|
|||
}
|
||||
|
||||
void EnSsh_CheckBodyStickHit(EnSsh* this, PlayState* play) {
|
||||
ColliderInfo* info = &this->colCylinder[0].info;
|
||||
ColliderElement* info = &this->colCylinder[0].elem;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->unk_860 != 0) {
|
||||
info->bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
this->colCylinder[1].info.bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
this->colCylinder[2].info.bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
this->colCylinder[1].elem.bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
this->colCylinder[2].elem.bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
} else {
|
||||
info->bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
this->colCylinder[1].info.bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
this->colCylinder[2].info.bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
this->colCylinder[1].elem.bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
this->colCylinder[2].elem.bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -285,16 +285,16 @@ void EnSt_InitColliders(EnSt* this, PlayState* play) {
|
|||
Collider_SetCylinder(play, &this->colCylinder[i], &this->actor, cylinders[i]);
|
||||
}
|
||||
|
||||
this->colCylinder[0].info.bumper.dmgFlags =
|
||||
this->colCylinder[0].elem.bumper.dmgFlags =
|
||||
DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT;
|
||||
this->colCylinder[1].info.bumper.dmgFlags =
|
||||
this->colCylinder[1].elem.bumper.dmgFlags =
|
||||
DMG_DEFAULT &
|
||||
~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT) &
|
||||
~(DMG_MAGIC_LIGHT | DMG_MAGIC_ICE);
|
||||
this->colCylinder[2].base.colType = COLTYPE_METAL;
|
||||
this->colCylinder[2].info.bumperFlags = BUMP_ON | BUMP_HOOKABLE | BUMP_NO_AT_INFO;
|
||||
this->colCylinder[2].info.elemType = ELEMTYPE_UNK2;
|
||||
this->colCylinder[2].info.bumper.dmgFlags =
|
||||
this->colCylinder[2].elem.bumperFlags = BUMP_ON | BUMP_HOOKABLE | BUMP_NO_AT_INFO;
|
||||
this->colCylinder[2].elem.elemType = ELEMTYPE_UNK2;
|
||||
this->colCylinder[2].elem.bumper.dmgFlags =
|
||||
DMG_DEFAULT &
|
||||
~(DMG_MAGIC_FIRE | DMG_ARROW | DMG_HOOKSHOT | DMG_HAMMER_SWING | DMG_BOOMERANG | DMG_EXPLOSIVE | DMG_DEKU_NUT);
|
||||
|
||||
|
@ -305,17 +305,17 @@ void EnSt_InitColliders(EnSt* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnSt_CheckBodyStickHit(EnSt* this, PlayState* play) {
|
||||
ColliderInfo* body = &this->colCylinder[0].info;
|
||||
ColliderElement* body = &this->colCylinder[0].elem;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->unk_860 != 0) {
|
||||
body->bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
this->colCylinder[1].info.bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
this->colCylinder[2].info.bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
this->colCylinder[1].elem.bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
this->colCylinder[2].elem.bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
} else {
|
||||
body->bumper.dmgFlags &= ~DMG_DEKU_STICK;
|
||||
this->colCylinder[1].info.bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
this->colCylinder[2].info.bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
this->colCylinder[1].elem.bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
this->colCylinder[2].elem.bumper.dmgFlags |= DMG_DEKU_STICK;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -431,14 +431,14 @@ s32 EnSt_CheckHitBackside(EnSt* this, PlayState* play) {
|
|||
if (cyl->base.acFlags & AC_HIT) {
|
||||
cyl->base.acFlags &= ~AC_HIT;
|
||||
hit = true;
|
||||
flags |= cyl->info.acHitInfo->toucher.dmgFlags;
|
||||
flags |= cyl->elem.acHitInfo->toucher.dmgFlags;
|
||||
}
|
||||
|
||||
cyl = &this->colCylinder[1];
|
||||
if (cyl->base.acFlags & AC_HIT) {
|
||||
cyl->base.acFlags &= ~AC_HIT;
|
||||
hit = true;
|
||||
flags |= cyl->info.acHitInfo->toucher.dmgFlags;
|
||||
flags |= cyl->elem.acHitInfo->toucher.dmgFlags;
|
||||
}
|
||||
|
||||
if (!hit) {
|
||||
|
|
|
@ -282,7 +282,7 @@ void EnSw_Init(Actor* thisx, PlayState* play) {
|
|||
this->actor.scale.x = 0.0f;
|
||||
FALLTHROUGH;
|
||||
case 1:
|
||||
this->collider.elements[0].info.toucher.damage *= 2;
|
||||
this->collider.elements[0].base.toucher.damage *= 2;
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_GOLD_SKULLTULA;
|
||||
this->actor.colChkInfo.health *= 2;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
|
@ -537,15 +537,15 @@ void func_80B0D590(EnSw* this, PlayState* play) {
|
|||
|
||||
if (((this->actor.params & 0xE000) >> 0xD) == 2) {
|
||||
if (this->actor.scale.x < 0.0139999995f) {
|
||||
this->collider.elements[0].info.toucherFlags = TOUCH_NONE;
|
||||
this->collider.elements[0].info.bumperFlags = BUMP_NONE;
|
||||
this->collider.elements[0].info.ocElemFlags = OCELEM_NONE;
|
||||
this->collider.elements[0].base.toucherFlags = TOUCH_NONE;
|
||||
this->collider.elements[0].base.bumperFlags = BUMP_NONE;
|
||||
this->collider.elements[0].base.ocElemFlags = OCELEM_NONE;
|
||||
}
|
||||
|
||||
if (this->actor.scale.x >= 0.0139999995f) {
|
||||
this->collider.elements[0].info.toucherFlags = TOUCH_ON;
|
||||
this->collider.elements[0].info.bumperFlags = BUMP_ON;
|
||||
this->collider.elements[0].info.ocElemFlags = OCELEM_ON;
|
||||
this->collider.elements[0].base.toucherFlags = TOUCH_ON;
|
||||
this->collider.elements[0].base.bumperFlags = BUMP_ON;
|
||||
this->collider.elements[0].base.ocElemFlags = OCELEM_ON;
|
||||
}
|
||||
|
||||
Math_ApproachF(&this->actor.scale.x, !IS_DAY ? 0.02f : 0.0f, 0.2f, 0.01f);
|
||||
|
|
|
@ -898,7 +898,7 @@ void EnTest_SetupSlashDown(EnTest* this) {
|
|||
this->unk_7C8 = 0x10;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnTest_SetupAction(this, EnTest_SlashDown);
|
||||
this->swordCollider.info.toucher.damage = 16;
|
||||
this->swordCollider.elem.toucher.damage = 16;
|
||||
|
||||
if (this->unk_7DE != 0) {
|
||||
this->unk_7DE = 3;
|
||||
|
@ -995,7 +995,7 @@ void EnTest_SetupSlashUp(EnTest* this) {
|
|||
Animation_PlayOnce(&this->skelAnime, &gStalfosUpSlashAnim);
|
||||
this->swordCollider.base.atFlags &= ~AT_BOUNCED;
|
||||
this->unk_7C8 = 0x11;
|
||||
this->swordCollider.info.toucher.damage = 16;
|
||||
this->swordCollider.elem.toucher.damage = 16;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnTest_SetupAction(this, EnTest_SlashUp);
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ void EnTest_SetupJumpslash(EnTest* this) {
|
|||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
this->swordCollider.base.atFlags &= ~AT_BOUNCED;
|
||||
EnTest_SetupAction(this, EnTest_Jumpslash);
|
||||
this->swordCollider.info.toucher.damage = 32;
|
||||
this->swordCollider.elem.toucher.damage = 32;
|
||||
|
||||
if (this->unk_7DE != 0) {
|
||||
this->unk_7DE = 3;
|
||||
|
@ -1670,7 +1670,7 @@ void EnTest_UpdateDamage(EnTest* this, PlayState* play) {
|
|||
}
|
||||
this->unk_7DC = player->unk_845;
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, false);
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false);
|
||||
Audio_StopSfxByPosAndId(&this->actor.projectedPos, NA_SE_EN_STAL_WARAU);
|
||||
|
||||
if ((this->actor.colChkInfo.damageEffect == STALFOS_DMGEFF_STUN) ||
|
||||
|
|
|
@ -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.at) {
|
||||
if (&player->actor == this->collider.base.otherAC) {
|
||||
if (!(this->collider.base.atFlags & AT_BOUNCED)) {
|
||||
Audio_PlayActorSfx2(&player->actor, NA_SE_PL_BODY_HIT);
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ void EnTite_CheckDamage(Actor* thisx, PlayState* play) {
|
|||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
if (thisx->colChkInfo.damageEffect != 0xE) { // Immune to fire magic
|
||||
this->damageEffect = thisx->colChkInfo.damageEffect;
|
||||
Actor_SetDropFlag(thisx, &this->collider.elements[0].info, false);
|
||||
Actor_SetDropFlag(thisx, &this->collider.elements[0].base, false);
|
||||
// Stun if Tektite hit by nut, boomerang, hookshot, ice arrow or ice magic
|
||||
if ((thisx->colChkInfo.damageEffect == 1) || (thisx->colChkInfo.damageEffect == 0xF)) {
|
||||
if (this->action != TEKTITE_STUNNED) {
|
||||
|
|
|
@ -104,8 +104,8 @@ void EnTorch2_Init(Actor* thisx, PlayState* play2) {
|
|||
this->meleeWeaponQuads[0].base.atFlags = this->meleeWeaponQuads[1].base.atFlags = AT_ON | AT_TYPE_ENEMY;
|
||||
this->meleeWeaponQuads[0].base.acFlags = this->meleeWeaponQuads[1].base.acFlags = AC_ON | AC_HARD | AC_TYPE_PLAYER;
|
||||
this->meleeWeaponQuads[0].base.colType = this->meleeWeaponQuads[1].base.colType = COLTYPE_METAL;
|
||||
this->meleeWeaponQuads[0].info.toucher.damage = this->meleeWeaponQuads[1].info.toucher.damage = 8;
|
||||
this->meleeWeaponQuads[0].info.bumperFlags = this->meleeWeaponQuads[1].info.bumperFlags = BUMP_ON;
|
||||
this->meleeWeaponQuads[0].elem.toucher.damage = this->meleeWeaponQuads[1].elem.toucher.damage = 8;
|
||||
this->meleeWeaponQuads[0].elem.bumperFlags = this->meleeWeaponQuads[1].elem.bumperFlags = BUMP_ON;
|
||||
this->shieldQuad.base.atFlags = AT_ON | AT_TYPE_ENEMY;
|
||||
this->shieldQuad.base.acFlags = AC_ON | AC_HARD | AC_TYPE_PLAYER;
|
||||
this->actor.colChkInfo.damageTable = &sDamageTable;
|
||||
|
@ -599,7 +599,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
|||
this->unk_8A8 = 6.0f;
|
||||
this->unk_8A4 = 8.0f;
|
||||
this->unk_8A2 = this->actor.yawTowardsPlayer + 0x8000;
|
||||
Actor_SetDropFlag(&this->actor, &this->cylinder.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->cylinder.elem, true);
|
||||
this->stateFlags3 &= ~PLAYER_STATE3_2;
|
||||
this->stateFlags3 |= PLAYER_STATE3_0;
|
||||
sActionState = ENTORCH2_DAMAGE;
|
||||
|
@ -698,10 +698,10 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
|||
}
|
||||
if (this->invincibilityTimer != 0) {
|
||||
this->cylinder.base.colType = COLTYPE_NONE;
|
||||
this->cylinder.info.elemType = ELEMTYPE_UNK5;
|
||||
this->cylinder.elem.elemType = ELEMTYPE_UNK5;
|
||||
} else {
|
||||
this->cylinder.base.colType = COLTYPE_HIT5;
|
||||
this->cylinder.info.elemType = ELEMTYPE_UNK1;
|
||||
this->cylinder.elem.elemType = ELEMTYPE_UNK1;
|
||||
}
|
||||
/*
|
||||
* Handles the jump movement onto Link's sword. Dark Link doesn't move during the
|
||||
|
|
|
@ -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.at) {
|
||||
if (&player->actor == this->collider.base.otherAC) {
|
||||
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.at) {
|
||||
if (&player->actor == this->collider.base.otherAC) {
|
||||
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.at) {
|
||||
if (&player->actor == this->collider.base.otherAC) {
|
||||
this->timer = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.oc->world.pos, &thisx->world.pos);
|
||||
thisx->world.rot.y + Math_Vec3f_Yaw(&this->collider.base.otherOC->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.oc->world.pos) - thisx->world.rot.y;
|
||||
Math_Vec3f_Yaw(&thisx->world.pos, &this->collider.base.otherOC->world.pos) - thisx->world.rot.y;
|
||||
if (ABS(angleToCollidedActor) < 0x1000) {
|
||||
this->vContinue = 0.0f;
|
||||
}
|
||||
|
|
|
@ -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.at == &player->actor) {
|
||||
if (this->collider.base.otherAC == &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);
|
||||
|
|
|
@ -258,7 +258,7 @@ void EnVali_SetupStunned(EnVali* this) {
|
|||
this->timer = 80;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, 80);
|
||||
this->bodyCollider.info.bumper.effect = 0;
|
||||
this->bodyCollider.elem.bumper.effect = 0;
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
|
||||
this->actor.velocity.y = 1.0f;
|
||||
this->actionFunc = EnVali_Stunned;
|
||||
|
@ -448,7 +448,7 @@ void EnVali_Stunned(EnVali* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->timer == 0) {
|
||||
this->bodyCollider.info.bumper.effect = 1; // Shock?
|
||||
this->bodyCollider.elem.bumper.effect = 1; // Shock?
|
||||
EnVali_SetupFloatIdle(this);
|
||||
}
|
||||
}
|
||||
|
@ -496,7 +496,7 @@ void EnVali_ReturnToLurk(EnVali* this, PlayState* play) {
|
|||
void EnVali_UpdateDamage(EnVali* this, PlayState* play) {
|
||||
if (this->bodyCollider.base.acFlags & AC_HIT) {
|
||||
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, true);
|
||||
|
||||
if ((this->actor.colChkInfo.damageEffect != BARI_DMGEFF_NONE) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (Actor_ApplyDamage(&this->actor) == 0) {
|
||||
|
|
|
@ -219,10 +219,10 @@ void EnWallmas_SetupReturnToCeiling(EnWallmas* this) {
|
|||
|
||||
void EnWallmas_SetupTakeDamage(EnWallmas* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gWallmasterDamageAnim, -3.0f);
|
||||
if (this->collider.info.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->collider.base.ac->world.rot.y;
|
||||
if (this->collider.elem.acHitInfo->toucher.dmgFlags & (DMG_ARROW | DMG_SLINGSHOT)) {
|
||||
this->actor.world.rot.y = this->collider.base.otherAT->world.rot.y;
|
||||
} else {
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.ac) + 0x8000;
|
||||
this->actor.world.rot.y = Actor_WorldYawTowardActor(&this->actor, this->collider.base.otherAT) + 0x8000;
|
||||
}
|
||||
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x14);
|
||||
|
@ -503,7 +503,7 @@ void EnWallmas_Stun(EnWallmas* this, PlayState* play) {
|
|||
void EnWallmas_ColUpdate(EnWallmas* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (Actor_ApplyDamage(&this->actor) == 0) {
|
||||
Enemy_StartFinishingBlow(play, &this->actor);
|
||||
|
|
|
@ -561,7 +561,7 @@ void func_80B3349C(EnWeiyer* this, PlayState* play) {
|
|||
void func_80B3368C(EnWeiyer* this, PlayState* play) {
|
||||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->collider.elem, true);
|
||||
|
||||
if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) {
|
||||
if (this->actor.colChkInfo.damageEffect == 1) {
|
||||
|
|
|
@ -241,7 +241,7 @@ void EnWf_Init(Actor* thisx, PlayState* play) {
|
|||
SkelAnime_InitFlex(play, &this->skelAnime, &gWolfosWhiteSkel, &gWolfosWaitingAnim, this->jointTable,
|
||||
this->morphTable, WOLFOS_LIMB_MAX);
|
||||
Actor_SetScale(thisx, 0.01f);
|
||||
this->colliderSpheres.elements[0].info.toucher.damage = this->colliderSpheres.elements[1].info.toucher.damage =
|
||||
this->colliderSpheres.elements[0].base.toucher.damage = this->colliderSpheres.elements[1].base.toucher.damage =
|
||||
8;
|
||||
thisx->naviEnemyId = NAVI_ENEMY_WHITE_WOLFOS;
|
||||
}
|
||||
|
@ -1266,7 +1266,7 @@ void EnWf_UpdateDamage(EnWf* this, PlayState* play) {
|
|||
|
||||
if (this->actor.colChkInfo.damageEffect != ENWF_DMGEFF_ICE_MAGIC) {
|
||||
this->damageEffect = this->actor.colChkInfo.damageEffect;
|
||||
Actor_SetDropFlag(&this->actor, &this->colliderCylinderBody.info, true);
|
||||
Actor_SetDropFlag(&this->actor, &this->colliderCylinderBody.elem, true);
|
||||
this->slashStatus = 0;
|
||||
|
||||
if ((this->actor.colChkInfo.damageEffect == ENWF_DMGEFF_STUN) ||
|
||||
|
|
|
@ -159,7 +159,7 @@ void EnWonderItem_Init(Actor* thisx, PlayState* play) {
|
|||
colTypeIndex = this->actor.world.rot.z & 0xFF;
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->collider.info.bumper.dmgFlags = damageFlags[colTypeIndex];
|
||||
this->collider.elem.bumper.dmgFlags = damageFlags[colTypeIndex];
|
||||
this->collider.dim.radius = 20;
|
||||
this->collider.dim.height = 30;
|
||||
this->updateFunc = EnWonderItem_InteractSwitch;
|
||||
|
@ -188,7 +188,7 @@ void EnWonderItem_Init(Actor* thisx, PlayState* play) {
|
|||
case WONDERITEM_BOMB_SOLDIER:
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->collider.info.bumper.dmgFlags = DMG_SLINGSHOT;
|
||||
this->collider.elem.bumper.dmgFlags = DMG_SLINGSHOT;
|
||||
this->unkPos = this->actor.world.pos;
|
||||
this->collider.dim.radius = 35;
|
||||
this->collider.dim.height = 75;
|
||||
|
|
|
@ -128,9 +128,9 @@ void func_80B42F74(EnYabusameMark* this, PlayState* play) {
|
|||
if (this->collider.base.acFlags & AC_HIT) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
arrowHitPos.x = this->collider.info.bumper.hitPos.x;
|
||||
arrowHitPos.y = this->collider.info.bumper.hitPos.y;
|
||||
arrowHitPos.z = this->collider.info.bumper.hitPos.z;
|
||||
arrowHitPos.x = this->collider.elem.bumper.hitPos.x;
|
||||
arrowHitPos.y = this->collider.elem.bumper.hitPos.y;
|
||||
arrowHitPos.z = this->collider.elem.bumper.hitPos.z;
|
||||
|
||||
effectVelocity.y = 15.0f;
|
||||
|
||||
|
|
|
@ -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.oc->id == ACTOR_EN_YUKABYUN))) ||
|
||||
((this->collider.base.ocFlags1 & OC1_HIT) && !(this->collider.base.otherOC->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;
|
||||
|
|
|
@ -2000,7 +2000,7 @@ void EnZf_UpdateDamage(EnZf* this, PlayState* play) {
|
|||
(D_80B4A1B4 != this->actor.params)) &&
|
||||
(this->actor.colChkInfo.damageEffect != ENZF_DMGEFF_IMMUNE)) {
|
||||
this->damageEffect = this->actor.colChkInfo.damageEffect;
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, false);
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.elem, false);
|
||||
|
||||
if ((this->actor.colChkInfo.damageEffect == ENZF_DMGEFF_STUN) ||
|
||||
(this->actor.colChkInfo.damageEffect == ENZF_DMGEFF_ICE)) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue