This commit is contained in:
Dragorn421 2025-07-15 01:53:10 -04:00 committed by GitHub
commit 5c8ce3d472
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
49 changed files with 168 additions and 183 deletions

View File

@ -704,11 +704,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 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 Actor_SetPlayerBump(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type, u32 damage);
void Actor_SetPlayerBumpKnockdown(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage);
void Actor_SetPlayerBumpKnockdownNoDamage(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity);
void Actor_SetPlayerBumpKnockback(struct PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage);
void Actor_SetPlayerBumpKnockbackNoDamage(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);

View File

@ -643,17 +643,17 @@ typedef enum PlayerStickDirection {
/* 3 */ PLAYER_STICK_DIR_RIGHT
} PlayerStickDirection;
typedef enum PlayerKnockbackType {
/* 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_ELECTRIFIED // Same as`PLAYER_KNOCKBACK_LARGE` with a shock effect
} PlayerKnockbackType;
typedef enum PlayerBumpType {
/* 0 */ PLAYER_BUMP_NONE, // No knockback
/* 1 */ PLAYER_BUMP_KNOCKBACK, // A small hop, remains standing up
/* 2 */ PLAYER_BUMP_KNOCKDOWN, // Sent flying in the air and lands laying down on the floor
/* 3 */ PLAYER_BUMP_KNOCKDOWN_ELECTRIFIED // Same as`PLAYER_BUMP_KNOCKDOWN` with an electric shock effect
} PlayerBumpType;
typedef enum PlayerHitResponseType {
/* 0 */ PLAYER_HIT_RESPONSE_NONE,
/* 1 */ PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
/* 2 */ PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL,
/* 1 */ PLAYER_HIT_RESPONSE_KNOCKDOWN,
/* 2 */ PLAYER_HIT_RESPONSE_KNOCKBACK,
/* 3 */ PLAYER_HIT_RESPONSE_FROZEN,
/* 4 */ PLAYER_HIT_RESPONSE_ELECTRIFIED
} PlayerHitResponseType;
@ -961,11 +961,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 knockbackDamage;
/* 0x08A1 */ u8 knockbackType;
/* 0x08A2 */ s16 knockbackRot;
/* 0x08A4 */ f32 knockbackSpeed;
/* 0x08A8 */ f32 knockbackYVelocity;
/* 0x08A0 */ u8 bumpDamage;
/* 0x08A1 */ u8 bumpType;
/* 0x08A2 */ s16 bumpRot;
/* 0x08A4 */ f32 bumpSpeed;
/* 0x08A8 */ f32 bumpYVelocity;
/* 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];

View File

@ -1952,78 +1952,63 @@ s32 Actor_NotMounted(PlayState* play, Actor* horse) {
}
/**
* Sets the player's knockback properties
* Sets the player's bump (knockback/knockdown) 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 actor source actor applying bump
* @param rot the direction the player will be pushed in
* @param type see `PlayerBumpType`
* @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) {
void Actor_SetPlayerBump(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 type, u32 damage) {
Player* player = GET_PLAYER(play);
player->knockbackDamage = damage;
player->knockbackType = type;
player->knockbackSpeed = speed;
player->knockbackRot = rot;
player->knockbackYVelocity = yVelocity;
player->bumpDamage = damage;
player->bumpType = type;
player->bumpSpeed = speed;
player->bumpRot = rot;
player->bumpYVelocity = yVelocity;
}
/**
* Knocks the player to the ground
* Knocks the player down 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 actor source actor applying bump
* @param rot the direction the player will be pushed in
* @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 Actor_SetPlayerBumpKnockdown(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage) {
Actor_SetPlayerBump(play, actor, speed, rot, yVelocity, PLAYER_BUMP_KNOCKDOWN, damage);
}
/**
* Knocks the player to the ground, without applying additional damage
* Knocks the player down 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
* @param actor source actor applying bump
* @param rot the direction the player will be pushed in
*/
void Actor_SetPlayerKnockbackLargeNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
Actor_SetPlayerKnockbackLarge(play, actor, speed, rot, yVelocity, 0);
void Actor_SetPlayerBumpKnockdownNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
Actor_SetPlayerBumpKnockdown(play, actor, speed, rot, yVelocity, 0);
}
/**
* Knocks the player back while keeping them on their feet
* 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 actor source actor applying bump
* @param rot the direction the player will be pushed in
* @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 Actor_SetPlayerBumpKnockback(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity, u32 damage) {
Actor_SetPlayerBump(play, actor, speed, rot, yVelocity, PLAYER_BUMP_KNOCKBACK, damage);
}
/**
* Knocks the player back while keeping them on their feet, without applying additional damage
* Knocks the player back while keeping them on their feet, without applying additional damage.
*
* @param play
* @param actor
* @param speed overridden
* @param actor source actor applying bump
* @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);
void Actor_SetPlayerBumpKnockbackNoDamage(PlayState* play, Actor* actor, f32 speed, s16 rot, f32 yVelocity) {
Actor_SetPlayerBumpKnockback(play, actor, speed, rot, yVelocity, 0);
}
/**

View File

@ -126,7 +126,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;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer, 5.0f);
Actor_SetPlayerBumpKnockdownNoDamage(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) {

View File

@ -225,7 +225,7 @@ void BgHidanCurtain_Update(Actor* thisx, PlayState* play2) {
} else {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 1.0f);
Actor_SetPlayerBumpKnockdownNoDamage(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;

View File

@ -142,7 +142,7 @@ void BgHidanFirewall_Collide(BgHidanFirewall* this, PlayState* play) {
phi_a3 = this->actor.shape.rot.y + 0x8000;
}
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, phi_a3, 1.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 5.0f, phi_a3, 1.0f);
}
void BgHidanFirewall_ColliderFollowPlayer(BgHidanFirewall* this, PlayState* play) {

View File

@ -235,7 +235,7 @@ void BgHidanFwbig_Update(Actor* thisx, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.world.rot.y, 1.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 5.0f, this->actor.world.rot.y, 1.0f);
if (this->direction != 0) {
this->actionFunc = BgHidanFwbig_Lower;
}

View File

@ -271,7 +271,7 @@ void func_8088D750(BgHidanSekizou* this, PlayState* play) {
phi_a3 = -0x4000;
}
}
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, phi_a3, 1.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->dyna.actor, 5.0f, phi_a3, 1.0f);
}
void BgHidanSekizou_Update(Actor* thisx, PlayState* play2) {

View File

@ -160,7 +160,7 @@ void BgJyaGoroiwa_Move(BgJyaGoroiwa* this, PlayState* play) {
thisx->world.rot.y += 0x8000;
}
Actor_SetPlayerKnockbackLarge(play, thisx, 2.0f, thisx->yawTowardsPlayer, 0.0f, 0);
Actor_SetPlayerBumpKnockdown(play, thisx, 2.0f, thisx->yawTowardsPlayer, 0.0f, 0);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
this->yOffsetSpeed = 10.0f;

View File

@ -108,13 +108,13 @@ void func_8089B4C8(BgJyaZurerukabe* this, PlayState* play) {
case 3:
case 5:
if (fabsf(D_8089B9C0[D_8089BA30[i]]) > 1.0f) {
Actor_SetPlayerKnockbackLarge(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
Actor_SetPlayerBumpKnockdown(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) {
Actor_SetPlayerKnockbackLarge(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
Actor_SetPlayerBumpKnockdown(play, &this->dyna.actor, 1.5f, this->dyna.actor.shape.rot.y, 0.0f, 0);
}
break;
}

View File

@ -145,7 +145,7 @@ void BgYdanMaruta_Destroy(Actor* thisx, PlayState* play) {
void func_808BEFF4(BgYdanMaruta* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 7.0f, this->dyna.actor.shape.rot.y, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(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);

View File

@ -1495,7 +1495,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;
Actor_SetPlayerKnockbackLarge(play, NULL, 5.0f, effect->kbAngle, 0.0f, 0x30);
Actor_SetPlayerBumpKnockdown(play, NULL, 5.0f, effect->kbAngle, 0.0f, 0x30);
if (!player->bodyIsBurning) {
s16 i2;

View File

@ -315,7 +315,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)) {
Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 2.0f, 0x20);
Actor_SetPlayerBumpKnockdown(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])) {

View File

@ -4009,7 +4009,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
} else {
if (sqrtf(SQ(xDistFromLink) + SQ(yDistFromLink) + SQ(zDistFromLink)) <= 25.0f) {
spBA = 5;
Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x30);
Actor_SetPlayerBumpKnockdown(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;
@ -4481,7 +4481,7 @@ void func_808E2544(Actor* thisx, PlayState* play) {
this->actor.speed = 0.0f;
if (dorf->timers[2] == 0) {
Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f, 0x50);
Actor_SetPlayerBumpKnockdown(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;
@ -4803,8 +4803,8 @@ void BossGanon_UpdateEffects(PlayState* play) {
if (((eff->scale * 150.0f) < distToPlayer) && (distToPlayer < (eff->scale * 300.0f))) {
eff->timer = 150;
Actor_SetPlayerKnockbackLarge(play, &sGanondorf->actor, 7.0f,
sGanondorf->actor.yawTowardsPlayer, 0.0f, 0x20);
Actor_SetPlayerBumpKnockdown(play, &sGanondorf->actor, 7.0f, sGanondorf->actor.yawTowardsPlayer,
0.0f, 0x20);
}
}
}

View File

@ -2191,8 +2191,8 @@ void func_80902348(BossGanon2* this, PlayState* play) {
phi_v0_2 = 0;
}
Actor_SetPlayerKnockbackLarge(play, &this->actor, 15.0f, this->actor.yawTowardsPlayer + phi_v0_2, 2.0f,
0);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 15.0f, this->actor.yawTowardsPlayer + phi_v0_2, 2.0f,
0);
sZelda->unk_3C8 = 8;
this->unk_316 = 10;
break;
@ -2218,7 +2218,7 @@ void func_80902348(BossGanon2* this, PlayState* play) {
}
player->bodyIsBurning = true;
Actor_SetPlayerKnockbackLarge(play, &this->actor, 10.0f, Math_Atan2S(temp_f12, temp_f2), 0.0f, 0x10);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 10.0f, Math_Atan2S(temp_f12, temp_f2), 0.0f, 0x10);
sZelda->unk_3C8 = 8;
}
}

View File

@ -854,8 +854,8 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
player->actor.parent = NULL;
player->csAction = PLAYER_CSACTION_NONE;
if (this->timers[0] == 0) {
Actor_SetPlayerKnockbackLarge(play, &this->actor, 20.0f, this->actor.shape.rot.y + 0x8000,
10.0f, 0);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 20.0f, this->actor.shape.rot.y + 0x8000,
10.0f, 0);
}
}
this->timers[0] = 75;

View File

@ -793,7 +793,7 @@ void BossSst_HeadCharge(BossSst* this, PlayState* play) {
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
sHands[LEFT]->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
sHands[RIGHT]->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
}
}
@ -1548,7 +1548,7 @@ void BossSst_HandSlam(BossSst* this, PlayState* play) {
player->actor.world.pos.z = (Math_CosS(this->actor.yawTowardsPlayer) * 100.0f) + this->actor.world.pos.z;
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 0.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 0.0f);
}
Math_ScaledStepToS(&this->actor.shape.rot.x, 0, 0x200);
@ -1608,8 +1608,8 @@ void BossSst_HandSweep(BossSst* this, PlayState* play) {
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
this->ready = true;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f,
this->actor.shape.rot.y - (this->vParity * 0x3800), 0.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 5.0f,
this->actor.shape.rot.y - (this->vParity * 0x3800), 0.0f);
Player_PlaySfx(player, NA_SE_PL_BODY_HIT);
newTargetYaw = this->actor.shape.rot.y - (this->vParity * 0x1400);
if (((s16)(newTargetYaw - this->targetYaw) * this->vParity) > 0) {
@ -1668,7 +1668,7 @@ void BossSst_HandPunch(BossSst* this, PlayState* play) {
BossSst_HandSetupRetreat(this);
} else if (this->colliderJntSph.base.atFlags & AT_HIT) {
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
BossSst_HandSetupRetreat(this);
}
@ -1986,7 +1986,7 @@ void BossSst_HandSwing(BossSst* this, PlayState* play) {
BossSst_HandReleasePlayer(this, play, false);
player->actor.world.pos.x += 70.0f * Math_SinS(this->actor.shape.rot.y);
player->actor.world.pos.z += 70.0f * Math_CosS(this->actor.shape.rot.y);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 15.0f, this->actor.shape.rot.y, 2.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 15.0f, this->actor.shape.rot.y, 2.0f);
Player_PlaySfx(player, NA_SE_PL_BODY_HIT);
}
@ -2108,7 +2108,7 @@ void BossSst_HandReadyCharge(BossSst* this, PlayState* play) {
this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
OTHER_HAND(this)->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
sHead->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
}
}
@ -2458,7 +2458,7 @@ void BossSst_HandReleasePlayer(BossSst* this, PlayState* play, s32 dropPlayer) {
this->colliderJntSph.base.ocFlags1 |= OC1_ON;
OTHER_HAND(this)->colliderJntSph.base.ocFlags1 |= OC1_ON;
if (dropPlayer) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 0.0f, this->actor.shape.rot.y, 0.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 0.0f, this->actor.shape.rot.y, 0.0f);
}
}
}

View File

@ -832,7 +832,7 @@ s32 BossTw_BeamHitPlayerCheck(BossTw* this, PlayState* play) {
if (sTwinrovaPtr->timers[2] == 0) {
sTwinrovaPtr->timers[2] = 150;
this->beamDist = sqrtf(SQ(offset.x) + SQ(offset.y) + SQ(offset.z));
Actor_SetPlayerKnockbackLarge(play, &this->actor, 3.0f, this->actor.shape.rot.y, 0.0f, 0x20);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 3.0f, this->actor.shape.rot.y, 0.0f, 0x20);
if (this->actor.params == TW_KOTAKE) {
if (sFreezeState == 0) {

View File

@ -1098,7 +1098,7 @@ void BossVa_BodyPhase1(BossVa* this, PlayState* play) {
if (this->bodyCollider.base.atFlags & AT_HIT) {
this->bodyCollider.base.atFlags &= ~AT_HIT;
if (this->bodyCollider.base.at == &player->actor) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
}
}
@ -1190,7 +1190,7 @@ void BossVa_BodyPhase2(BossVa* this, PlayState* play) {
sPhase2Timer = (sPhase2Timer + 0x18) & 0xFFF0;
if (this->bodyCollider.base.at == &player->actor) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
}
@ -1266,7 +1266,7 @@ void BossVa_BodyPhase3(BossVa* this, PlayState* play) {
if (this->bodyCollider.base.atFlags & AT_HIT) {
this->bodyCollider.base.atFlags &= ~AT_HIT;
if (this->bodyCollider.base.at == &player->actor) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
this->actor.world.rot.y += (s16)Rand_CenteredFloat(0x2EE0) + 0x8000;
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
@ -1387,7 +1387,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
if (this->bodyCollider.base.atFlags & AT_HIT) {
this->bodyCollider.base.atFlags &= ~AT_HIT;
if (this->bodyCollider.base.at == &player->actor) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
this->actor.world.rot.y += (s16)Rand_CenteredFloat(0x2EE0) + 0x8000;
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
}
@ -2574,8 +2574,8 @@ void BossVa_BariPhase3Attack(BossVa* this, PlayState* play) {
this->vaBariUnused.y += this->vaBariUnused.z;
if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderJntSph.base.atFlags & AT_HIT)) {
if ((this->colliderLightning.base.at == &player->actor) || (this->colliderJntSph.base.at == &player->actor)) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer,
8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer,
8.0f);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
this->colliderJntSph.base.at = NULL;
this->colliderLightning.base.at = NULL;
@ -2670,8 +2670,8 @@ void BossVa_BariPhase2Attack(BossVa* this, PlayState* play) {
if ((this->colliderLightning.base.atFlags & AT_HIT) || (this->colliderJntSph.base.atFlags & AT_HIT)) {
if ((this->colliderLightning.base.at == &player->actor) || (this->colliderJntSph.base.at == &player->actor)) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer,
8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, GET_BODY(this)->actor.yawTowardsPlayer,
8.0f);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
this->colliderJntSph.base.at = NULL;
this->colliderLightning.base.at = NULL;

View File

@ -203,7 +203,7 @@ void DemoKekkai_Update(Actor* thisx, PlayState* play2) {
if (this->energyAlpha > 0.99f) {
if ((this->collider1.base.atFlags & AT_HIT) || (this->collider2.base.atFlags & AT_HIT)) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
}
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider1.base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider1.base);
@ -261,7 +261,7 @@ void DemoKekkai_TrialBarrierIdle(Actor* thisx, PlayState* play) {
DemoKekkai* this = (DemoKekkai*)thisx;
if (this->collider1.base.atFlags & AT_HIT) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 5.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 5.0f);
}
CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider1.base);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider1.base);

View File

@ -366,7 +366,7 @@ void DoorKiller_FallOver(DoorKiller* this, PlayState* play) {
if ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) &&
(playerPosRelToDoor.z < 100.0f) && (playerPosRelToDoor.z > 0.0f)) {
this->hasHitPlayerOrGround |= 1;
Actor_SetPlayerKnockbackLarge(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f, 0x10);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f, 0x10);
Actor_PlaySfx(&this->actor, NA_SE_EN_KDOOR_HIT);
Player_PlaySfx(player, NA_SE_PL_BODY_HIT);
}

View File

@ -379,7 +379,7 @@ void EnAttackNiw_Update(Actor* thisx, PlayState* play) {
(player->invincibilityTimer == 0)
#endif
) {
Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.world.rot.y, 0.0f, 0x10);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 2.0f, this->actor.world.rot.y, 0.0f, 0x10);
cucco->timer9 = 0x46;
}
}

View File

@ -326,7 +326,7 @@ void EnBa_SwingAtPlayer(EnBa* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
if (this->collider.base.at == &player->actor) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
}
}

View File

@ -184,7 +184,7 @@ void func_809BC598(EnBdfire* this, PlayState* play) {
player->bodyFlameTimers[i] = Rand_S16Offset(0, 200);
}
player->bodyIsBurning = true;
Actor_SetPlayerKnockbackLarge(play, &this->actor, 20.0f, this->actor.world.rot.y, 0.0f, 8);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 20.0f, this->actor.world.rot.y, 0.0f, 8);
PRINTF("POWER\n");
}
}

View File

@ -751,7 +751,7 @@ void func_809BE798(EnBigokuta* this, PlayState* play) {
} else {
effectRot = -0x6000;
}
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 10.0f, this->actor.world.rot.y + effectRot, 5.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 10.0f, this->actor.world.rot.y + effectRot, 5.0f);
if (this->actionFunc == func_809BDC08) {
func_809BD4A4(this);
this->unk_196 = 40;

View File

@ -160,8 +160,8 @@ void EnBrob_Idle(EnBrob* this, PlayState* play) {
}
if (this->timer == 0) {
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer,
1.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer,
1.0f);
EnBrob_SetupMoveUp(this, play);
} else if (this->dyna.actor.xzDistToPlayer < 300.0f) {
EnBrob_SetupMoveUp(this, play);
@ -287,8 +287,8 @@ void EnBrob_Update(Actor* thisx, PlayState* play2) {
if (this->actionFunc == EnBrob_MoveUp && !(this->colliders[0].base.atFlags & AT_BOUNCED) &&
!(this->colliders[1].base.atFlags & AT_BOUNCED)) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer,
1.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->dyna.actor, 5.0f, this->dyna.actor.yawTowardsPlayer,
1.0f);
} else if (this->actionFunc != EnBrob_MoveUp) {
EnBrob_SetupShock(this);
}

View File

@ -128,7 +128,7 @@ void EnBubble_DamagePlayer(EnBubble* this, PlayState* play) {
s32 damage = -this->colliderJntSph.elements[0].base.atDmgInfo.damage;
play->damagePlayer(play, damage);
Actor_SetPlayerKnockbackSmallNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
Actor_SetPlayerBumpKnockbackNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
}
s32 EnBubble_Explosion(EnBubble* this, PlayState* play) {

View File

@ -166,7 +166,7 @@ void EnBx_Update(Actor* thisx, PlayState* play) {
play->damagePlayer(play, -4);
}
}
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, tmp32, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 6.0f, tmp32, 6.0f);
player->invincibilityTimer = tmp33;
}

View File

@ -360,7 +360,7 @@ void EnDh_Attack(EnDh* this, PlayState* play) {
this->actionState++;
} else if (this->colliderJntSph.base.atFlags & AT_HIT) {
this->colliderJntSph.base.atFlags &= ~AT_HIT;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.shape.rot.y, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, this->actor.shape.rot.y, 8.0f);
}
break;
case 3:

View File

@ -351,7 +351,7 @@ void EnExRuppy_WaitToBlowUp(EnExRuppy* this, PlayState* play) {
explosionScaleStep = 6;
}
EffectSsBomb2_SpawnLayered(play, &this->actor.world.pos, &velocity, &accel, explosionScale, explosionScaleStep);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f);
Actor_PlaySfx(&this->actor, NA_SE_IT_BOMB_EXPLOSION);
Actor_Kill(&this->actor);
}

View File

@ -327,8 +327,8 @@ s32 EnFd_ColliderCheck(EnFd* this, PlayState* play) {
}
this->attackTimer = 30;
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, this->actor.speed + 2.0f,
this->actor.yawTowardsPlayer, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, this->actor.speed + 2.0f, this->actor.yawTowardsPlayer,
6.0f);
}
return false;
}

View File

@ -549,8 +549,8 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
if ((bossGnd->flyMode >= GND_FLY_VOLLEY) && (this->work[FHGFIRE_RETURN_COUNT] >= 2)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_FANTOM_LAUGH);
}
Actor_SetPlayerKnockback(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f,
PLAYER_KNOCKBACK_LARGE_ELECTRIFIED, 0x10);
Actor_SetPlayerBump(play, &this->actor, 3.0f, this->actor.world.rot.y, 0.0f,
PLAYER_BUMP_KNOCKDOWN_ELECTRIFIED, 0x10);
}
break;
case FHGFIRE_LIGHT_BLUE:

View File

@ -382,7 +382,7 @@ void EnFireRock_Update(Actor* thisx, PlayState* play) {
this->collider.base.atFlags &= ~AT_HIT;
if (this->collider.base.at == playerActor) {
if (!(player->stateFlags1 & PLAYER_STATE1_26)) {
Actor_SetPlayerKnockbackSmall(play, thisx, 2.0f, -player->actor.world.rot.y, 3.0f, 4);
Actor_SetPlayerBumpKnockback(play, thisx, 2.0f, -player->actor.world.rot.y, 3.0f, 4);
}
return;
}

View File

@ -942,7 +942,7 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) {
} else if (this->swordCollider.base.atFlags & AT_HIT) {
this->swordCollider.base.atFlags &= ~AT_HIT;
if (&player->actor == this->swordCollider.base.at) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f);
this->spinAttackState = 2;
Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_24);
Message_StartTextbox(play, 0x6003, &this->actor);

View File

@ -731,7 +731,7 @@ void EnGo_StopRolling(EnGo* this, PlayState* play) {
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
play->damagePlayer(play, -4);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
this->unk_20E = 0x10;
}
}

View File

@ -922,7 +922,7 @@ s32 func_80A44AB0(EnGo2* this, PlayState* play) {
arg2 = this->actionFunc == EnGo2_ContinueRolling ? 1.5f : this->actor.speed * 1.5f;
play->damagePlayer(play, -4);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, arg2, this->actor.yawTowardsPlayer, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, arg2, this->actor.yawTowardsPlayer, 6.0f);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
this->collider.base.ocFlags1 &= ~OC1_TYPE_PLAYER;
}

View File

@ -625,7 +625,7 @@ void EnGoroiwa_Roll(EnGoroiwa* this, PlayState* play) {
EnGoroiwa_FaceNextWaypoint(this, play);
}
}
Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 0);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 0);
PRINTF_COLOR_CYAN();
PRINTF(T("Player ぶっ飛ばし\n", "Player knocked down\n"));
PRINTF_RST();
@ -711,7 +711,7 @@ void EnGoroiwa_SetupMoveUp(EnGoroiwa* this) {
void EnGoroiwa_MoveUp(EnGoroiwa* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
if ((this->actor.home.rot.z & 1) == 1) {
this->collisionDisabledTimer = 50;
@ -736,7 +736,7 @@ void EnGoroiwa_SetupMoveDown(EnGoroiwa* this) {
void EnGoroiwa_MoveDown(EnGoroiwa* this, PlayState* play) {
if (this->collider.base.atFlags & AT_HIT) {
this->collider.base.atFlags &= ~AT_HIT;
Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4);
Player_PlaySfx(GET_PLAYER(play), NA_SE_PL_BODY_HIT);
if ((this->actor.home.rot.z & 1) == 1) {
this->collisionDisabledTimer = 50;

View File

@ -336,7 +336,7 @@ void EnHonotrap_SetupFlameDrop(EnHonotrap* this) {
void EnHonotrap_FlameDrop(EnHonotrap* this, PlayState* play) {
if ((this->collider.cyl.base.atFlags & AT_HIT) || (this->timer <= 0)) {
if ((this->collider.cyl.base.atFlags & AT_HIT) && !(this->collider.cyl.base.atFlags & AT_BOUNCED)) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 0.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 0.0f);
}
this->actor.velocity.x = this->actor.velocity.y = this->actor.velocity.z = 0.0f;
EnHonotrap_SetupFlameVanish(this);

View File

@ -850,7 +850,7 @@ void EnIk_UpdateEnemy(Actor* thisx, PlayState* play) {
}
}
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 8.0f, this->actor.yawTowardsPlayer, 8.0f);
player->invincibilityTimer = prevInvincibilityTimer;
}
}

View File

@ -626,7 +626,7 @@ void EnMb_Stunned(EnMb* this, PlayState* play) {
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
this->attack = ENMB_ATTACK_NONE;
}
@ -746,7 +746,7 @@ void EnMb_SpearPatrolEndCharge(EnMb* this, PlayState* play) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
}
#endif
@ -864,9 +864,9 @@ void EnMb_ClubAttack(EnMb* this, PlayState* play) {
}
}
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor,
(650.0f - this->actor.xzDistToPlayer) * 0.04f + 4.0f,
this->actor.world.rot.y, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor,
(650.0f - this->actor.xzDistToPlayer) * 0.04f + 4.0f,
this->actor.world.rot.y, 8.0f);
player->invincibilityTimer = prevPlayerInvincibilityTimer;
}
@ -973,20 +973,20 @@ void EnMb_SpearPatrolPrepareAndCharge(EnMb* this, PlayState* play) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
this->attackCollider.base.atFlags &= ~AT_HIT;
player->actor.parent = NULL;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#elif OOT_VERSION < NTSC_1_2
player->stateFlags2 &= ~PLAYER_STATE2_7;
this->attackCollider.base.atFlags &= ~AT_HIT;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#else
this->attackCollider.base.atFlags &= ~AT_HIT;
if (player->stateFlags2 & PLAYER_STATE2_7) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
}
#endif
}
@ -1055,20 +1055,20 @@ void EnMb_SpearPatrolImmediateCharge(EnMb* this, PlayState* play) {
this->attackCollider.base.atFlags &= ~AT_HIT;
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#elif OOT_VERSION < NTSC_1_2
this->attackCollider.base.atFlags &= ~AT_HIT;
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
#else
this->attackCollider.base.atFlags &= ~AT_HIT;
if (player->stateFlags2 & PLAYER_STATE2_7) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
}
#endif
this->attack = ENMB_ATTACK_NONE;
@ -1355,7 +1355,7 @@ void EnMb_SpearDead(EnMb* this, PlayState* play) {
if ((player->stateFlags2 & PLAYER_STATE2_7) && player->actor.parent == &this->actor) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
this->attack = ENMB_ATTACK_NONE;
}
#else
@ -1363,7 +1363,7 @@ void EnMb_SpearDead(EnMb* this, PlayState* play) {
player->stateFlags2 &= ~PLAYER_STATE2_7;
player->actor.parent = NULL;
player->av2.actionVar2 = 200;
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.world.rot.y, 4.0f);
this->attack = ENMB_ATTACK_NONE;
}
#endif
@ -1449,7 +1449,7 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
#if OOT_VERSION >= PAL_1_0
player->av2.actionVar2 = 200;
#endif
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 6.0f, this->actor.world.rot.y, 6.0f);
}
this->damageReaction = this->actor.colChkInfo.damageReaction;
this->attack = ENMB_ATTACK_NONE;

View File

@ -476,7 +476,7 @@ void func_80AAE294(EnMm* this, PlayState* play) {
}
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 4.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 3.0f, this->actor.yawTowardsPlayer, 4.0f);
}
}
}

View File

@ -1093,7 +1093,7 @@ void EnNiw_Update(Actor* thisx, PlayState* play) {
if (this->unk_2A8 != 0 && thisx->xyzDistToPlayerSq < SQ(dist) && player->invincibilityTimer == 0)
#endif
{
Actor_SetPlayerKnockbackLarge(play, &this->actor, 2.0f, thisx->world.rot.y, 0.0f, 0x10);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 2.0f, thisx->world.rot.y, 0.0f, 0x10);
}
func_80AB747C(this, play);

View File

@ -210,9 +210,9 @@ void func_80ACE5C8(EnPart* this, PlayState* play) {
play->damagePlayer(play, -8);
}
}
Actor_SetPlayerKnockbackLargeNoDamage(play, this->actor.parent,
(650.0f - this->actor.parent->xzDistToPlayer) * 0.04f + 4.0f,
this->actor.parent->world.rot.y, 8.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, this->actor.parent,
(650.0f - this->actor.parent->xzDistToPlayer) * 0.04f + 4.0f,
this->actor.parent->world.rot.y, 8.0f);
player->invincibilityTimer = prevInvincibilityTimer;
this->timer = 1;
}

View File

@ -345,7 +345,7 @@ void EnRr_SetupReleasePlayer(EnRr* this, PlayState* play) {
break;
}
PRINTF(VT_FGCOL(YELLOW) "%s[%d] : Rr_Catch_Cancel" VT_RST "\n", "../z_en_rr.c", 650);
Actor_SetPlayerKnockbackLarge(play, &this->actor, 4.0f, this->actor.shape.rot.y, 12.0f, 8);
Actor_SetPlayerBumpKnockdown(play, &this->actor, 4.0f, this->actor.shape.rot.y, 12.0f, 8);
if (this->actor.colorFilterTimer == 0) {
this->actionFunc = EnRr_Approach;
Actor_PlaySfx(&this->actor, NA_SE_EN_LIKE_THROW);

View File

@ -486,7 +486,7 @@ s32 EnSsh_CheckHitPlayer(EnSsh* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_STALTU_ROLL);
Actor_PlaySfx(&this->actor, NA_SE_VO_ST_ATTACK);
play->damagePlayer(play, -8);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
this->hitCount--;
return true;
}

View File

@ -425,7 +425,7 @@ s32 EnSt_CheckHitPlayer(EnSt* this, PlayState* play) {
this->gaveDamageSpinTimer = 30;
play->damagePlayer(play, -8);
Actor_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT);
Actor_SetPlayerKnockbackLargeNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
Actor_SetPlayerBumpKnockdownNoDamage(play, &this->actor, 4.0f, this->actor.yawTowardsPlayer, 6.0f);
return true;
}

View File

@ -602,11 +602,11 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
if (!Actor_ApplyDamage(&this->actor)) {
func_800F5B58();
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE);
this->knockbackType = PLAYER_KNOCKBACK_LARGE;
this->knockbackSpeed = 6.0f;
this->knockbackYVelocity = 6.0f;
this->knockbackDamage = this->actor.colChkInfo.damage;
this->knockbackRot = this->actor.yawTowardsPlayer + 0x8000;
this->bumpType = PLAYER_BUMP_KNOCKDOWN;
this->bumpSpeed = 6.0f;
this->bumpYVelocity = 6.0f;
this->bumpDamage = this->actor.colChkInfo.damage;
this->bumpRot = this->actor.yawTowardsPlayer + 0x8000;
sDeathFlag++;
sActionState = ENTORCH2_DEATH;
Enemy_StartFinishingBlow(play, &this->actor);
@ -622,11 +622,11 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
}
} else {
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
this->knockbackDamage = this->actor.colChkInfo.damage;
this->knockbackType = PLAYER_KNOCKBACK_SMALL;
this->knockbackYVelocity = 6.0f;
this->knockbackSpeed = 8.0f;
this->knockbackRot = this->actor.yawTowardsPlayer + 0x8000;
this->bumpDamage = this->actor.colChkInfo.damage;
this->bumpType = PLAYER_BUMP_KNOCKBACK;
this->bumpYVelocity = 6.0f;
this->bumpSpeed = 8.0f;
this->bumpRot = this->actor.yawTowardsPlayer + 0x8000;
Actor_SetDropFlag(&this->actor, &this->cylinder.elem, true);
this->stateFlags3 &= ~PLAYER_STATE3_2;
this->stateFlags3 |= PLAYER_STATE3_0;
@ -639,7 +639,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
}
}
this->actor.colChkInfo.damage = 0;
this->knockbackDamage = 0;
this->bumpDamage = 0;
}
// Handles being frozen by a deku nut

View File

@ -188,7 +188,7 @@ void EnTrap_Update(Actor* thisx, PlayState* play) {
angleToKnockPlayer = thisx->yawTowardsPlayer;
}
play->damagePlayer(play, -4);
Actor_SetPlayerKnockbackSmallNoDamage(play, thisx, 6.0f, angleToKnockPlayer, 6.0f);
Actor_SetPlayerBumpKnockbackNoDamage(play, thisx, 6.0f, angleToKnockPlayer, 6.0f);
this->playerDmgTimer = 15;
}
if (thisx->params & SPIKETRAP_MODE_LINEAR) {

View File

@ -4673,8 +4673,8 @@ void func_80837C0C(PlayState* play, Player* this, s32 hitResponseType, f32 speed
anim = &gPlayerAnim_link_swimer_swim_hit;
Player_PlayVoiceSfx(this, NA_SE_VO_LI_DAMAGE_S);
} else if ((hitResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE) ||
(hitResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL) ||
} else if ((hitResponseType == PLAYER_HIT_RESPONSE_KNOCKDOWN) ||
(hitResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK) ||
!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
(this->stateFlags1 & (PLAYER_STATE1_13 | PLAYER_STATE1_14 | PLAYER_STATE1_21))) {
Player_SetupAction(play, this, Player_Action_8084377C, 0);
@ -4684,7 +4684,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 hitResponseType, f32 speed
Player_RequestRumble(this, 255, 20, 150, 0);
func_80832224(this);
if (hitResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL) {
if (hitResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK) {
this->av2.actionVar2 = 4;
this->actor.speed = 3.0f;
@ -4857,23 +4857,23 @@ s32 func_808382DC(Player* this, PlayState* play) {
Player_PlayVoiceSfx(this, NA_SE_VO_LI_TAKEN_AWAY);
play->haltAllActors = true;
Sfx_PlaySfxCentered(NA_SE_OC_ABYSS);
} else if ((this->knockbackType != PLAYER_KNOCKBACK_NONE) &&
((this->knockbackType >= PLAYER_KNOCKBACK_LARGE) || (this->invincibilityTimer == 0))) {
} else if ((this->bumpType != PLAYER_BUMP_NONE) &&
((this->bumpType >= PLAYER_BUMP_KNOCKDOWN) || (this->invincibilityTimer == 0))) {
u8 knockbackResponse[] = {
PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL,
PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
PLAYER_HIT_RESPONSE_KNOCKBACK,
PLAYER_HIT_RESPONSE_KNOCKDOWN,
PLAYER_HIT_RESPONSE_KNOCKDOWN,
};
func_80838280(this);
if (this->knockbackType == PLAYER_KNOCKBACK_LARGE_ELECTRIFIED) {
if (this->bumpType == PLAYER_BUMP_KNOCKDOWN_ELECTRIFIED) {
this->bodyShockTimer = 40;
}
this->actor.colChkInfo.damage += this->knockbackDamage;
func_80837C0C(play, this, knockbackResponse[this->knockbackType - 1], this->knockbackSpeed,
this->knockbackYVelocity, this->knockbackRot, 20);
this->actor.colChkInfo.damage += this->bumpDamage;
func_80837C0C(play, this, knockbackResponse[this->bumpType - 1], this->bumpSpeed, this->bumpYVelocity,
this->bumpRot, 20);
} else {
sp64 = (this->shieldQuad.base.acFlags & AC_BOUNCED) != 0;
@ -4943,7 +4943,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_ELECTRIC) {
sp4C = PLAYER_HIT_RESPONSE_ELECTRIFIED;
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_KNOCKBACK) {
sp4C = PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE;
sp4C = PLAYER_HIT_RESPONSE_KNOCKDOWN;
} else {
func_80838280(this);
sp4C = PLAYER_HIT_RESPONSE_NONE;
@ -9302,14 +9302,14 @@ void Player_Action_8084377C(Player* this, PlayState* play) {
func_808382BC(this);
if (!(this->stateFlags1 & PLAYER_STATE1_29) && (this->av2.actionVar2 == 0) &&
(this->knockbackType != PLAYER_KNOCKBACK_NONE)) {
s16 temp = this->actor.shape.rot.y - this->knockbackRot;
(this->bumpType != PLAYER_BUMP_NONE)) {
s16 temp = this->actor.shape.rot.y - this->bumpRot;
this->yaw = this->actor.shape.rot.y = this->knockbackRot;
this->speedXZ = this->knockbackSpeed;
this->yaw = this->actor.shape.rot.y = this->bumpRot;
this->speedXZ = this->bumpSpeed;
if (ABS(temp) > 0x4000) {
this->actor.shape.rot.y = this->knockbackRot + 0x8000;
this->actor.shape.rot.y = this->bumpRot + 0x8000;
}
if (this->actor.velocity.y < 0.0f) {
@ -9325,7 +9325,7 @@ void Player_Action_8084377C(Player* this, PlayState* play) {
func_80853080(this, play);
}
} else if ((this->stateFlags1 & PLAYER_STATE1_29) ||
(!(this->cylinder.base.acFlags & AC_HIT) && (this->knockbackType == PLAYER_KNOCKBACK_NONE))) {
(!(this->cylinder.base.acFlags & AC_HIT) && (this->bumpType == PLAYER_BUMP_NONE))) {
if (this->stateFlags1 & PLAYER_STATE1_29) {
this->av2.actionVar2++;
} else {
@ -9790,7 +9790,7 @@ void Player_Action_80844A44(Player* this, PlayState* play) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
this->actor.colChkInfo.damage = 0x10;
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE, 4.0f, 5.0f, this->actor.shape.rot.y, 20);
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_KNOCKDOWN, 4.0f, 5.0f, this->actor.shape.rot.y, 20);
}
}
@ -10616,7 +10616,7 @@ void Player_StartMode_Grotto(PlayState* play, Player* this) {
}
void Player_StartMode_KnockedOver(PlayState* play, Player* this) {
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE, 2.0f, 2.0f, this->actor.shape.rot.y + 0x8000, 0);
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_KNOCKDOWN, 2.0f, 2.0f, this->actor.shape.rot.y + 0x8000, 0);
}
void Player_StartMode_WarpSong(PlayState* play, Player* this) {
@ -12030,7 +12030,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
temp_f0 = this->actor.world.pos.y - this->actor.prevPos.y;
this->doorType = PLAYER_DOORTYPE_NONE;
this->knockbackType = PLAYER_KNOCKBACK_NONE;
this->bumpType = PLAYER_BUMP_NONE;
this->autoLockOnActor = NULL;
phi_f12 =