Skip to content

Commit

Permalink
Document Player Knockback related functions (zeldaret#1601)
Browse files Browse the repository at this point in the history
* document knockback related functions

* rotation -> yRot

* implement some changes

* Renames and comments

* mq bss

* format

* Intangibility and Invulnerability

* bss

* .bss

* add #pragma increment_block_number to z_en_item00.c

* .bss
  • Loading branch information
mzxrules committed Sep 23, 2024
1 parent 0f72540 commit 56981d5
Show file tree
Hide file tree
Showing 62 changed files with 298 additions and 187 deletions.
10 changes: 5 additions & 5 deletions include/z64actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -838,11 +838,11 @@ void Actor_SetClosestSecretDistance(Actor* actor, struct PlayState* play);
s32 Actor_IsMounted(struct PlayState* play, Actor* horse);
u32 Actor_SetRideActor(struct PlayState* play, Actor* horse, s32 mountSide);
s32 Actor_NotMounted(struct PlayState* play, Actor* horse);
void func_8002F698(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6);
void func_8002F6D4(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F71C(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
void func_8002F758(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5);
void func_8002F7A0(struct PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4);
void Actor_SetPlayerKnockback(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type, u32 damage);
void Actor_SetPlayerKnockbackLarge(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage);
void Actor_SetPlayerKnockbackLargeNoDamage(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity);
void Actor_SetPlayerKnockbackSmall(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage);
void Actor_SetPlayerKnockbackSmallNoDamage(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity);
void Player_PlaySfx(struct Player* player, u16 sfxId);
void Actor_PlaySfx(Actor* actor, u16 sfxId);
void Actor_PlaySfx_SurfaceBomb(struct PlayState* play, Actor* actor);
Expand Down
29 changes: 22 additions & 7 deletions include/z64player.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,21 @@ typedef enum PlayerStickDirection {
/* 3 */ PLAYER_STICK_DIR_RIGHT
} PlayerStickDirection;

typedef enum {
/* 0 */ PLAYER_KNOCKBACK_NONE, // No knockback
/* 1 */ PLAYER_KNOCKBACK_SMALL, // A small hop, remains standing up
/* 2 */ PLAYER_KNOCKBACK_LARGE, // Sent flying in the air and lands laying down on the floor
/* 3 */ PLAYER_KNOCKBACK_LARGE_SHOCK // Same as`PLAYER_KNOCKBACK_LARGE` with a shock effect
} PlayerKnockbackType;

typedef enum {
/* 0 */ PLAYER_HIT_RESPONSE_NONE,
/* 1 */ PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
/* 2 */ PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL,
/* 3 */ PLAYER_HIT_RESPONSE_ICE_TRAP,
/* 4 */ PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK
} PlayerDamageResponseType;

typedef struct PlayerAgeProperties {
/* 0x00 */ f32 ceilingCheckHeight;
/* 0x04 */ f32 unk_04;
Expand Down Expand Up @@ -875,7 +890,7 @@ typedef struct Player {
/* 0x088C */ u8 ledgeClimbType;
/* 0x088D */ u8 ledgeClimbDelayTimer;
/* 0x088E */ u8 unk_88E;
/* 0x088F */ u8 unk_88F;
/* 0x088F */ u8 damageFlickerAnimCounter; // Used to flicker Link after taking damage
/* 0x0890 */ u8 unk_890;
/* 0x0891 */ u8 bodyShockTimer;
/* 0x0892 */ u8 unk_892;
Expand All @@ -886,11 +901,11 @@ typedef struct Player {
/* 0x089A */ s16 floorPitchAlt; // the calculation for this value is bugged and doesn't represent anything meaningful
/* 0x089C */ s16 unk_89C;
/* 0x089E */ u16 floorSfxOffset;
/* 0x08A0 */ u8 unk_8A0;
/* 0x08A1 */ u8 unk_8A1;
/* 0x08A2 */ s16 unk_8A2;
/* 0x08A4 */ f32 unk_8A4;
/* 0x08A8 */ f32 unk_8A8;
/* 0x08A0 */ u8 knockbackDamage;
/* 0x08A1 */ u8 knockbackType;
/* 0x08A2 */ s16 knockbackRot;
/* 0x08A4 */ f32 knockbackSpeed;
/* 0x08A8 */ f32 knockbackYVelocity;
/* 0x08AC */ f32 pushedSpeed; // Pushing player, examples include water currents, floor conveyors, climbing sloped surfaces
/* 0x08B0 */ s16 pushedYaw; // Yaw direction of player being pushed
/* 0x08B4 */ WeaponInfo meleeWeaponInfo[3];
Expand All @@ -901,7 +916,7 @@ typedef struct Player {
/* 0x0A61 */ u8 bodyFlameTimers[PLAYER_BODYPART_MAX]; // one flame per body part
/* 0x0A73 */ u8 unk_A73;
/* 0x0A74 */ AfterPutAwayFunc afterPutAwayFunc; // See `Player_SetupWaitForPutAway` and `Player_Action_WaitForPutAway`
/* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame)
/* 0x0A78 */ s8 invincibilityTimer; // prevents damage when nonzero. Positive values are intangibility, negative are invulnerability
/* 0x0A79 */ u8 floorTypeTimer; // counts up every frame the current floor type is the same as the last frame
/* 0x0A7A */ u8 floorProperty;
/* 0x0A7B */ u8 prevFloorType;
Expand Down
2 changes: 1 addition & 1 deletion src/boot/z_std_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#endif

#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:108"
"ntsc-1.2:102"

StackEntry sDmaMgrStackInfo;
OSMesgQueue sDmaMgrMsgQueue;
Expand Down
4 changes: 2 additions & 2 deletions src/code/fault_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
*/
#if PLATFORM_GC

#pragma increment_block_number "gc-eu:208 gc-eu-mq:208 gc-eu-mq-dbg:192 gc-jp:208 gc-jp-ce:208 gc-jp-mq:208 gc-us:208" \
"gc-us-mq:208"
#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-eu-mq-dbg:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192" \
"gc-us-mq:192"

#include "global.h"
#include "alloca.h"
Expand Down
2 changes: 1 addition & 1 deletion src/code/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern struct IrqMgr gIrqMgr;
#endif

#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:166"
"ntsc-1.2:160"

extern u8 _buffersSegmentEnd[];

Expand Down
77 changes: 63 additions & 14 deletions src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1901,30 +1901,79 @@ s32 Actor_NotMounted(PlayState* play, Actor* horse) {
}
}

void func_8002F698(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5, u32 arg6) {
/**
* Sets the player's knockback properties
*
* @param play
* @param actor source actor applying knockback damage
* @param speed
* @param rot the direction the player will be pushed
* @param yVelocity
* @param type PlayerKnockbackType
* @param damage additional amount of damage to deal to the player
*/
void Actor_SetPlayerKnockback(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type, u32 damage) {
Player* player = GET_PLAYER(play);

player->unk_8A0 = arg6;
player->unk_8A1 = arg5;
player->unk_8A4 = arg2;
player->unk_8A2 = arg3;
player->unk_8A8 = arg4;
player->knockbackDamage = damage;
player->knockbackType = type;
player->knockbackSpeed = speed;
player->knockbackRot = rot;
player->knockbackYVelocity = yVelocity;
}

void func_8002F6D4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
func_8002F698(play, actor, arg2, arg3, arg4, 2, arg5);
/**
* Knocks the player to the ground
*
* @param play
* @param actor source actor applying knockback damage
* @param speed
* @param rot the direction the player will be pushed
* @param yVelocity
* @param damage additional amount of damage to deal to the player
*/
void Actor_SetPlayerKnockbackLarge(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage) {
Actor_SetPlayerKnockback(play, actor, speed, rot, yVelocity, PLAYER_KNOCKBACK_LARGE, damage);
}

void func_8002F71C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
func_8002F6D4(play, actor, arg2, arg3, arg4, 0);
/**
* Knocks the player to the ground, without applying additional damage
*
* @param play
* @param actor source actor applying knockback damage
* @param speed
* @param rot the direction the player will be pushed
* @param yVelocity
*/
void Actor_SetPlayerKnockbackLargeNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
Actor_SetPlayerKnockbackLarge(play, actor, speed, rot, yVelocity, 0);
}

void func_8002F758(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5) {
func_8002F698(play, actor, arg2, arg3, arg4, 1, arg5);
/**
* Knocks the player back while keeping them on their feet
*
* @param play
* @param actor
* @param speed overridden
* @param rot the direction the player will be pushed
* @param yVelocity overridden
* @param damage additional amount of damage to deal to the player
*/
void Actor_SetPlayerKnockbackSmall(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage) {
Actor_SetPlayerKnockback(play, actor, speed, rot, yVelocity, PLAYER_KNOCKBACK_SMALL, damage);
}

void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) {
func_8002F758(play, actor, arg2, arg3, arg4, 0);
/**
* Knocks the player back while keeping them on their feet, without applying additional damage
*
* @param play
* @param actor
* @param speed overridden
* @param rot the direction the player will be pushed
* @param yVelocity overridden
*/
void Actor_SetPlayerKnockbackSmallNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
Actor_SetPlayerKnockbackSmall(play, actor, speed, rot, yVelocity, 0);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_bgcheck.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "global.h"
#include "terminal.h"

#pragma increment_block_number "ntsc-1.2:152"
#pragma increment_block_number "ntsc-1.2:148"

u16 DynaSSNodeList_GetNextNodeIdx(DynaSSNodeList* nodeList);
void BgCheck_GetStaticLookupIndicesFromPos(CollisionContext* colCtx, Vec3f* pos, Vec3i* sector);
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -3638,7 +3638,7 @@ s32 Camera_KeepOn3(Camera* camera) {
}

#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:110"
"ntsc-1.2:104"

s32 Camera_KeepOn4(Camera* camera) {
static Vec3f D_8015BD50;
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_collision_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "overlays/effects/ovl_Effect_Ss_HitMark/z_eff_ss_hitmark.h"

#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:224"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:216"

typedef s32 (*ColChkResetFunc)(PlayState*, Collider*);
typedef void (*ColChkApplyFunc)(PlayState*, CollisionCheckContext*, Collider*);
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_common_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "versions.h"

#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:224"
"ntsc-1.2:192"

ALIGNED(16) SaveContext gSaveContext;
u32 D_8015FA88;
Expand Down
2 changes: 1 addition & 1 deletion src/code/z_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ u16 gCamAtSplinePointsAppliedFrame;
u16 gCamEyePointAppliedFrame;
u16 gCamAtPointAppliedFrame;

#pragma increment_block_number "gc-eu:192 gc-eu-mq:192 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
#pragma increment_block_number "gc-eu:192 gc-eu-mq:176 gc-jp:192 gc-jp-ce:192 gc-jp-mq:192 gc-us:192 gc-us-mq:192" \
"ntsc-1.2:96"

// Cam ID to return to when a scripted cutscene is finished
Expand Down
3 changes: 3 additions & 0 deletions src/code/z_en_item00.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h"

#pragma increment_block_number \
"gc-eu:0 gc-eu-mq:0 gc-eu-mq-dbg:0 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128"

#define FLAGS 0

void EnItem00_Init(Actor* thisx, PlayState* play);
Expand Down
5 changes: 2 additions & 3 deletions src/code/z_kankyo.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
#include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.h"

#pragma increment_block_number "gc-eu:128 gc-eu-mq:128 gc-jp:128 gc-jp-ce:128 gc-jp-mq:128 gc-us:128 gc-us-mq:128" \
"ntsc-1.2:0"
#pragma increment_block_number "gc-eu:0 gc-eu-mq:0 gc-jp:0 gc-jp-ce:0 gc-jp-mq:0 gc-us:0 gc-us-mq:0 ntsc-1.2:0"

typedef enum LightningBoltState {
/* 0x00 */ LIGHTNING_BOLT_START,
Expand Down Expand Up @@ -213,7 +212,7 @@ s16 sLightningFlashAlpha;
s16 sSunDepthTestX;
s16 sSunDepthTestY;

#pragma increment_block_number "gc-eu:112 gc-eu-mq:112 gc-jp:96 gc-jp-ce:96 gc-jp-mq:96 gc-us:96 gc-us-mq:96" \
#pragma increment_block_number "gc-eu:240 gc-eu-mq:240 gc-jp:216 gc-jp-ce:216 gc-jp-mq:216 gc-us:216 gc-us-mq:216" \
"ntsc-1.2:224"

LightNode* sNGameOverLightNode;
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void BgHakaTubo_Idle(BgHakaTubo* this, PlayState* play) {
// Colliding with flame circle
if (this->flamesCollider.base.atFlags & AT_HIT) {
this->flamesCollider.base.atFlags &= ~AT_HIT;
func_8002F71C(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 5.0f);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 5.0f);
}
// Colliding with collider inside the pot
if (this->potCollider.base.acFlags & AC_HIT) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ void BgHidanCurtain_Update(Actor* thisx, PlayState* play2) {
} else {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
func_8002F71C(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 1.0f);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 1.0f);
}
if ((this->type == 4) || (this->type == 5)) {
this->actor.world.pos.y = (2.0f * this->actor.home.pos.y) - hcParams->riseDist - this->actor.world.pos.y;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void BgHidanFirewall_Collide(BgHidanFirewall* this, PlayState* play) {
phi_a3 = this->actor.shape.rot.y + 0x8000;
}

func_8002F71C(play, &this->actor, 5.0f, phi_a3, 1.0f);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, phi_a3, 1.0f);
}

void BgHidanFirewall_ColliderFollowPlayer(BgHidanFirewall* this, PlayState* play) {
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void BgHidanFwbig_Update(Actor* thisx, PlayState* play) {

if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
func_8002F71C(play, &this->actor, 5.0f, this->actor.world.rot.y, 1.0f);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.world.rot.y, 1.0f);
if (this->direction != 0) {
this->actionFunc = BgHidanFwbig_Lower;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void func_8088D750(BgHidanSekizou* this, PlayState* play) {
phi_a3 = -0x4000;
}
}
func_8002F71C(play, &this->dyna.actor, 5.0f, phi_a3, 1.0f);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, phi_a3, 1.0f);
}

void BgHidanSekizou_Update(Actor* thisx, PlayState* play2) {
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void BgJyaGoroiwa_Move(BgJyaGoroiwa* this, PlayState* play) {
thisx->world.rot.y += 0x8000;
}

func_8002F6D4(play, thisx, 2.0f, thisx->yawTowardsPlayer, 0.0f, 0);
Actor_SetPlayerKnockbackLarge(play, thisx, 2.0f, thisx->yawTowardsPlayer, 0.0f, 0);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);

this->yOffsetSpeed = 10.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ void func_8089B4C8(BgJyaZurerukabe* this, PlayState* play) {
case 3:
case 5:
if (fabsf(D_8089B9C0[D_8089BA30[i]]) > 1.0f) {
func_8002F6D4(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
Actor_SetPlayerKnockbackLarge(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
}
break;
case 1:
case 4:
if (fabsf(D_8089B9C0[D_8089BA30[i]] - D_8089B9C0[D_8089BA30[i + 1]]) > 1.0f) {
func_8002F6D4(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
Actor_SetPlayerKnockbackLarge(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void BgYdanMaruta_Destroy(Actor* thisx, PlayState* play) {

void func_808BEFF4(BgYdanMaruta* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
func_8002F71C(play, &this->dyna.actor, 7.0f, this->dyna.actor.shape.rot.y, 6.0f);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 7.0f, this->dyna.actor.shape.rot.y, 6.0f);
}
this->dyna.actor.shape.rot.x += 0x360;
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base);
Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ void BossFd_UpdateEffects(BossFd* this, PlayState* play) {
diff.z = player->actor.world.pos.z - effect->pos.z;
if ((this->timers[3] == 0) && (sqrtf(SQ(diff.x) + SQ(diff.y) + SQ(diff.z)) < 20.0f)) {
this->timers[3] = 50;
func_8002F6D4(play, NULL, 5.0f, effect->kbAngle, 0.0f, 0x30);
Actor_SetPlayerKnockbackLarge(play, NULL, 5.0f, effect->kbAngle, 0.0f, 0x30);
if (!player->bodyIsBurning) {
s16 i2;

Expand Down
2 changes: 1 addition & 1 deletion src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void BossFd2_Emerge(BossFd2* this, PlayState* play) {
case 2:
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x7D0);
if ((this->timers[0] == 1) && (this->actor.xzDistToPlayer < 120.0f)) {
func_8002F6D4(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 2.0f, 0x20);
Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 2.0f, 0x20);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
if (Animation_OnFrame(&this->skelAnime, this->fwork[FD2_END_FRAME])) {
Expand Down
7 changes: 4 additions & 3 deletions src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3981,7 +3981,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
} else {
if (sqrtf(SQ(xDistFromLink) + SQ(yDistFromLink) + SQ(zDistFromLink)) <= 25.0f) {
spBA = 5;
func_8002F6D4(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x30);
Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x30);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_GANON_HIT_THUNDER);
ganondorf->timers[2] = 20;

Expand Down Expand Up @@ -4453,7 +4453,7 @@ void func_808E2544(Actor* thisx, PlayState* play) {
this->actor.speed = 0.0f;

if (dorf->timers[2] == 0) {
func_8002F6D4(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x50);
Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x50);
SfxSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 40, NA_SE_EN_GANON_HIT_THUNDER);
dorf->timers[2] = 20;

Expand Down Expand Up @@ -4775,7 +4775,8 @@ void BossGanon_UpdateEffects(PlayState* play) {

if (((eff->scale * 150.0f) < distToPlayer) && (distToPlayer < (eff->scale * 300.0f))) {
eff->timer = 150;
func_8002F6D4(play, &sGanondorf->actor, 7.0f, sGanondorf->actor.yawTowardsPlayer, 0.0f, 0x20);
Actor_SetPlayerKnockbackLarge(play, &sGanondorf->actor, 7.0f,
sGanondorf->actor.yawTowardsPlayer, 0.0f, 0x20);
}
}
}
Expand Down
Loading

0 comments on commit 56981d5

Please sign in to comment.