mirror of https://github.com/zeldaret/oot.git
Reevaluate player hit response names (#2640)
* PlayerHitResponseType * PLAYER_HIT_RESPONSE_ICE_TRAP -> FROZEN * PLAYER_KNOCKBACK_LARGE_SHOCK, PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK -> PLAYER_KNOCKBACK_LARGE_ELECTRIFIED, PLAYER_HIT_RESPONSE_ELECTRIFIED * damageResponseType -> hitResponseType
This commit is contained in:
parent
d44c341c2d
commit
88f452af10
|
@ -647,16 +647,16 @@ 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_SHOCK // Same as`PLAYER_KNOCKBACK_LARGE` with a shock effect
|
||||
/* 3 */ PLAYER_KNOCKBACK_LARGE_ELECTRIFIED // Same as`PLAYER_KNOCKBACK_LARGE` with a shock effect
|
||||
} PlayerKnockbackType;
|
||||
|
||||
typedef enum PlayerDamageResponseType {
|
||||
typedef enum PlayerHitResponseType {
|
||||
/* 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;
|
||||
/* 3 */ PLAYER_HIT_RESPONSE_FROZEN,
|
||||
/* 4 */ PLAYER_HIT_RESPONSE_ELECTRIFIED
|
||||
} PlayerHitResponseType;
|
||||
|
||||
typedef struct PlayerAgeProperties {
|
||||
/* 0x00 */ f32 ceilingCheckHeight;
|
||||
|
|
|
@ -550,7 +550,7 @@ void EnFhgFire_EnergyBall(EnFhgFire* this, PlayState* play) {
|
|||
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_SHOCK, 0x10);
|
||||
PLAYER_KNOCKBACK_LARGE_ELECTRIFIED, 0x10);
|
||||
}
|
||||
break;
|
||||
case FHGFIRE_LIGHT_BLUE:
|
||||
|
|
|
@ -4619,7 +4619,7 @@ static LinkAnimationHeader* D_808544B0[] = {
|
|||
&gPlayerAnim_link_normal_back_hit, &gPlayerAnim_link_anchor_back_hitR,
|
||||
};
|
||||
|
||||
void func_80837C0C(PlayState* play, Player* this, s32 damageResponseType, f32 speed, f32 yVelocity, s16 yRot,
|
||||
void func_80837C0C(PlayState* play, Player* this, s32 hitResponseType, f32 speed, f32 yVelocity, s16 yRot,
|
||||
s32 invincibilityTimer) {
|
||||
LinkAnimationHeader* anim = NULL;
|
||||
LinkAnimationHeader** sp28;
|
||||
|
@ -4642,7 +4642,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 damageResponseType, f32 sp
|
|||
|
||||
Player_SetIntangibility(this, invincibilityTimer);
|
||||
|
||||
if (damageResponseType == PLAYER_HIT_RESPONSE_ICE_TRAP) {
|
||||
if (hitResponseType == PLAYER_HIT_RESPONSE_FROZEN) {
|
||||
Player_SetupAction(play, this, Player_Action_8084FB10, 0);
|
||||
|
||||
anim = &gPlayerAnim_link_normal_ice_down;
|
||||
|
@ -4652,7 +4652,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 damageResponseType, f32 sp
|
|||
|
||||
Player_PlaySfx(this, NA_SE_PL_FREEZE_S);
|
||||
Player_PlayVoiceSfx(this, NA_SE_VO_LI_FREEZE);
|
||||
} else if (damageResponseType == PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK) {
|
||||
} else if (hitResponseType == PLAYER_HIT_RESPONSE_ELECTRIFIED) {
|
||||
Player_SetupAction(play, this, Player_Action_8084FBF4, 0);
|
||||
|
||||
Player_RequestRumble(this, 255, 80, 150, 0);
|
||||
|
@ -4673,8 +4673,8 @@ void func_80837C0C(PlayState* play, Player* this, s32 damageResponseType, f32 sp
|
|||
anim = &gPlayerAnim_link_swimer_swim_hit;
|
||||
|
||||
Player_PlayVoiceSfx(this, NA_SE_VO_LI_DAMAGE_S);
|
||||
} else if ((damageResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE) ||
|
||||
(damageResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL) ||
|
||||
} else if ((hitResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE) ||
|
||||
(hitResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL) ||
|
||||
!(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 damageResponseType, f32 sp
|
|||
Player_RequestRumble(this, 255, 20, 150, 0);
|
||||
func_80832224(this);
|
||||
|
||||
if (damageResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL) {
|
||||
if (hitResponseType == PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL) {
|
||||
this->av2.actionVar2 = 4;
|
||||
|
||||
this->actor.speed = 3.0f;
|
||||
|
@ -4867,7 +4867,7 @@ s32 func_808382DC(Player* this, PlayState* play) {
|
|||
|
||||
func_80838280(this);
|
||||
|
||||
if (this->knockbackType == PLAYER_KNOCKBACK_LARGE_SHOCK) {
|
||||
if (this->knockbackType == PLAYER_KNOCKBACK_LARGE_ELECTRIFIED) {
|
||||
this->bodyShockTimer = 40;
|
||||
}
|
||||
|
||||
|
@ -4939,9 +4939,9 @@ s32 func_808382DC(Player* this, PlayState* play) {
|
|||
if (this->stateFlags1 & PLAYER_STATE1_27) {
|
||||
sp4C = PLAYER_HIT_RESPONSE_NONE;
|
||||
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_ICE) {
|
||||
sp4C = PLAYER_HIT_RESPONSE_ICE_TRAP;
|
||||
sp4C = PLAYER_HIT_RESPONSE_FROZEN;
|
||||
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_ELECTRIC) {
|
||||
sp4C = PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK;
|
||||
sp4C = PLAYER_HIT_RESPONSE_ELECTRIFIED;
|
||||
} else if (this->actor.colChkInfo.acHitSpecialEffect == HIT_SPECIAL_EFFECT_KNOCKBACK) {
|
||||
sp4C = PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE;
|
||||
} else {
|
||||
|
@ -9147,8 +9147,7 @@ s32 func_80842DF4(PlayState* play, Player* this) {
|
|||
|
||||
if (this->actor.colChkInfo.atHitBacklash == HIT_BACKLASH_ELECTRIC) {
|
||||
this->actor.colChkInfo.damage = 8;
|
||||
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK, 0.0f, 0.0f, this->actor.shape.rot.y,
|
||||
20);
|
||||
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_ELECTRIFIED, 0.0f, 0.0f, this->actor.shape.rot.y, 20);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -13905,7 +13904,7 @@ void Player_Action_8084E6D4(Player* this, PlayState* play) {
|
|||
func_8083C0E8(this, play);
|
||||
} else {
|
||||
this->actor.colChkInfo.damage = 0;
|
||||
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_ICE_TRAP, 0.0f, 0.0f, 0, 20);
|
||||
func_80837C0C(play, this, PLAYER_HIT_RESPONSE_FROZEN, 0.0f, 0.0f, 0, 20);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue