Some work on d_a_e_wb (#2639)

* Some work d_a_e_wb

* Match more in e_wb
This commit is contained in:
hatal175 2025-09-10 07:45:07 +03:00 committed by GitHub
parent bfeb1c048b
commit 84eed3ea68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 1468 additions and 641 deletions

View File

@ -550,18 +550,22 @@ b_path = .bss:0x000000C0; // type:object size:0x60 scope:global align:4 data:flo
@5743 = .bss:0x00000120; // type:object size:0xC scope:local
b_path2 = .bss:0x0000012C; // type:object size:0x60 scope:global align:4 data:float
@6258 = .bss:0x0000018C; // type:object size:0xC scope:local
init$3541 = .bss:0x00000198; // type:object size:0x1 scope:local
arrow_rd_pos$6257 = .bss:0x0000019C; // type:object size:0xC scope:local
@6279 = .bss:0x000001A8; // type:object size:0xC scope:local
saku_p = .bss:0x000001B4; // type:object size:0xC scope:global
@6280 = .bss:0x000001C0; // type:object size:0xC scope:local
saku_p2 = .bss:0x000001CC; // type:object size:0xC scope:global
@6285 = .bss:0x000001D8; // type:object size:0xC scope:local
init$3568 = .bss:0x000001E4; // type:object size:0x1 scope:local
@6288 = .bss:0x000001E8; // type:object size:0xC scope:local
ikki_pos$6284 = .bss:0x000001F4; // type:object size:0x18 scope:local
@6400 = .bss:0x0000020C; // type:object size:0xC scope:local
init$3681 = .bss:0x00000218; // type:object size:0x1 scope:local
@6403 = .bss:0x0000021C; // type:object size:0xC scope:local
f_pos$6399 = .bss:0x00000228; // type:object size:0x18 scope:local
@6612 = .bss:0x00000240; // type:object size:0xC scope:local
init$3883 = .bss:0x0000024C; // type:object size:0x1 scope:local
@6615 = .bss:0x00000250; // type:object size:0xC scope:local
ikki2_pos$6611 = .bss:0x0000025C; // type:object size:0x18 scope:local
@7515 = .bss:0x00000274; // type:object size:0xC scope:local

View File

@ -57,9 +57,6 @@ enum daE_WB_ACT {
};
struct himo_s {
/* 807E1CCC */ ~himo_s();
/* 807E1D2C */ himo_s();
/* 0x0 */ cXyz field_0x0[16];
};
@ -71,9 +68,8 @@ struct himo_s {
*
* @details
*
*/
class e_wb_class : public fopEn_enemy_c {
*/
class e_wb_class {
public:
BOOL checkWait();
void setPlayerRideNow();
@ -86,8 +82,8 @@ public:
MtxP getRideMtx() { return mpModelMorf->getModel()->getAnmMtx(15); }
f32 nowAnimeFrame() const { return mpModelMorf->getFrame(); }
s16 getWaitRollAngle() const { return mWaitRollAngle; }
bool checkGetOff() const { return speedF < 3.0f; }
f32 rideSpeedRate() const { return speedF / mSpeedRate; }
bool checkGetOff() const { return mEnemy.speedF < 3.0f; }
f32 rideSpeedRate() const { return mEnemy.speedF / mSpeedRate; }
f32 getAnimeFrameRate() { return mpModelMorf->getFrame() / mpModelMorf->getEndFrame(); }
BOOL checkAnmLoopFrame() { return mpModelMorf->checkFrame(0.0f); }
@ -100,6 +96,7 @@ public:
}
public:
/* 0x0000 */ fopEn_enemy_c mEnemy;
/* 0x05AC */ request_of_phase_process_class mPhase;
/* 0x05B4 */ s16 mActionMode;
/* 0x05B8 */ char* mResName;
@ -120,7 +117,7 @@ public:
/* 0x068C */ s8 field_0x68c;
/* 0x068E */ s16 field_0x68e;
/* 0x0690 */ s16 mActionID;
/* 0x0692 */ u16 field_0x692;
/* 0x0692 */ s16 field_0x692;
/* 0x0694 */ int mShadowKey;
/* 0x0698 */ s16 field_0x698;
/* 0x069A */ s16 field_0x69a;
@ -244,7 +241,7 @@ public:
/* イノシシ - Wild Boar */
/* 0x00 */ // vtable
/* 0x04 */ s8 field_0x04;
/* 0x04 */ s8 mId;
/* 0x08 */ f32 base_size; // 基本サイズ - Base Size
/* 0x0C */ f32 leader_size_ratio; // リーダーサイズ比 - Leader Size Ratio
/* 0x10 */ f32 movement_speed; // 移動速度 - Movement Speed

View File

@ -476,7 +476,7 @@ public:
ERFLG0_BEE_FOLLOW = 0x400000,
ERFLG0_UNK_200000 = 0x200000,
ERFLG0_UNK_100000 = 0x100000,
ERFLG0_UNK_80000 = 0x80000,
ERFLG0_SINGLE_BOAR_AVOID = 0x80000,
ERFLG0_FISHING_ROD_GET_FISH = 0x40000,
ERFLG0_UNK_20000 = 0x20000,
ERFLG0_UNK_10000 = 0x10000,
@ -941,6 +941,7 @@ public:
void onLeafSe() { onEndResetFlg0(ERFLG0_UNK_200000); }
void onWolfFchainPull() { onEndResetFlg0(ERFLG0_WOLF_FCHAIN_PULL); }
void onFishingRodGetFish() { onEndResetFlg0(ERFLG0_FISHING_ROD_GET_FISH); }
void onSingleBoarAvoid() { onEndResetFlg0(ERFLG0_SINGLE_BOAR_AVOID); }
void onShieldBackBone() { onEndResetFlg1(ERFLG1_GANON_FINISH); }
void onWolfEyeKeep() { onEndResetFlg1(ERFLG1_WOLF_EYE_KEEP); }
void onPortalWarpMidnaAtnKeep() { onEndResetFlg2(ERFLG2_PORTAL_WARP_MIDNA_ATN_KEEP); }

View File

@ -459,7 +459,7 @@ int daAlink_c::checkDemoAction() {
static_cast<daHorse_c*>(rideAc_p)->onRideFlg();
mZ2Link.setRiding(true);
} else {
static_cast<e_wb_class*>(rideAc_p)->setPlayerRide();
((e_wb_class*)rideAc_p)->setPlayerRide();
}
}

View File

@ -172,17 +172,19 @@ void daAlink_c::commonInitForceRideRein() {
/* 800ECAAC-800ECB58 0E73EC 00AC+00 1/1 0/0 0/0 .text initForceRideBoar__9daAlink_cFv */
int daAlink_c::initForceRideBoar() {
e_wb_class* e_wb = (e_wb_class*)fopAcIt_Judge((fopAcIt_JudgeFunc)daAlink_searchBoar, NULL);
fopAc_ac_c* e_wb_actor = (fopAc_ac_c*)e_wb;
if (e_wb == NULL) {
return 0;
}
commonInitForceRideRein();
e_wb->current.pos = current.pos;
e_wb->shape_angle.y = shape_angle.y;
e_wb->current.angle.y = shape_angle.y;
e_wb_actor->current.pos = current.pos;
e_wb_actor->shape_angle.y = shape_angle.y;
e_wb_actor->current.angle.y = shape_angle.y;
mRideStatus = 2;
mRideAcKeep.setData(e_wb);
mRideAcKeep.setData(e_wb_actor);
field_0x384c = (cXyz*)&l_boarBaseAnime;
e_wb->setPlayerRide();
return 1;
@ -390,7 +392,7 @@ void daAlink_c::setHorseStirrup() {
/* 800ED4B8-800ED4DC 0E7DF8 0024+00 1/1 0/0 0/0 .text changeBoarRunRide__9daAlink_cFv */
void daAlink_c::changeBoarRunRide() {
static_cast<e_wb_class*>(mRideAcKeep.getActor())->setRunRideMode();
((e_wb_class*)mRideAcKeep.getActor())->setRunRideMode();
}
/* 800ED4DC-800ED78C 0E7E1C 02B0+00 7/7 0/0 0/0 .text setSyncHorsePos__9daAlink_cFv */
@ -462,7 +464,7 @@ int daAlink_c::setSyncHorsePos() {
/* 800ED78C-800ED90C 0E80CC 0180+00 4/4 0/0 0/0 .text setSyncBoarPos__9daAlink_cFv */
int daAlink_c::setSyncBoarPos() {
e_wb_class* e_wb_p = static_cast<e_wb_class*>(mRideAcKeep.getActor());
e_wb_class* e_wb_p = (e_wb_class*)mRideAcKeep.getActor();
if (e_wb_p == NULL) {
if (mProcID == PROC_DEAD || mProcID == PROC_GET_ITEM) {
return 1;
@ -509,7 +511,7 @@ int daAlink_c::setSyncBoarPos() {
/* 800ED90C-800EDA24 0E824C 0118+00 1/1 0/0 0/0 .text setSyncBoarRunPos__9daAlink_cFv */
int daAlink_c::setSyncBoarRunPos() {
e_wb_class* e_wb_p = static_cast<e_wb_class*>(mRideAcKeep.getActor());
e_wb_class* e_wb_p = (e_wb_class*)mRideAcKeep.getActor();
if (e_wb_p == NULL || e_wb_p->checkDownDamage()) {
boarForceGetOff();
return 0;
@ -864,14 +866,15 @@ int daAlink_c::setSyncHorse(int param_0) {
/* 800EE64C-800EE918 0E8F8C 02CC+00 1/1 0/0 0/0 .text setSyncBoar__9daAlink_cFi */
int daAlink_c::setSyncBoar(int param_0) {
e_wb_class* e_wb_p = static_cast<e_wb_class*>(mRideAcKeep.getActor());
e_wb_class* e_wb_p = (e_wb_class*)mRideAcKeep.getActor();
fopAc_ac_c* e_wb_actor = (fopAc_ac_c*)e_wb_p;
BOOL mode_1 = checkModeFlg(1);
if (!setSyncBoarPos()) {
return 0;
}
if (fabsf(e_wb_p->speedF) < 0.001f && mode_1 && checkInputOnR() && e_wb_p->checkWait() &&
if (fabsf(e_wb_actor->speedF) < 0.001f && mode_1 && checkInputOnR() && e_wb_p->checkWait() &&
mProcID != PROC_HORSE_SUBJECTIVITY && field_0x3004 == 0)
{
int direction = getDirectionFromShapeAngle();
@ -1242,8 +1245,8 @@ int daAlink_c::checkNextActionHorse() {
BOOL daAlink_c::checkHorseGetOff() {
return (checkHorseRide() && dComIfGp_getHorseActor() != NULL &&
dComIfGp_getHorseActor()->checkGetOff()) ||
(checkBoarRide() && static_cast<e_wb_class*>(mRideAcKeep.getActor()) != NULL &&
static_cast<e_wb_class*>(mRideAcKeep.getActor())->checkGetOff());
(checkBoarRide() && ((e_wb_class*)mRideAcKeep.getActor()) != NULL &&
((e_wb_class*)mRideAcKeep.getActor())->checkGetOff());
}
/* 800EF6B0-800EF884 0E9FF0 01D4+00 3/3 0/0 0/0 .text checkHorseGetOffAndSetDoStatus__9daAlink_cFv
@ -1760,7 +1763,7 @@ int daAlink_c::procHorseWait() {
if (temp_r28 > 0x800 && temp_r28 < 0x5000 && temp_f31 < 360000.0f) {
setBStatus(0x2E);
} else if (checkEndResetFlg0(ERFLG0_UNK_80000)) {
} else if (checkEndResetFlg0(ERFLG0_SINGLE_BOAR_AVOID)) {
set3DStatus(0x2D, 5);
setBStatus(0x2E);
}

View File

@ -755,10 +755,10 @@ static fpc_ProcID search_wb(e_rd_class* i_this, s16 param_2) {
if (target_info_count != 0) {
cXyz sp54, sp60;
e_wb_class* bullbo;
fopAc_ac_c* bullbo;
int i = 0;
while (i < target_info_count) {
bullbo = (e_wb_class*)target_info[i];
bullbo = (fopAc_ac_c*)target_info[i];
sp54.x = bullbo->current.pos.x - a_this->eyePos.x;
sp54.y = (bullbo->current.pos.y + 50.0f) - a_this->eyePos.y;
sp54.z = bullbo->current.pos.z - a_this->eyePos.z;
@ -1807,7 +1807,8 @@ static void e_rd_wb_search(e_rd_class* i_this) {
cXyz sp54, sp60;
f32 fVar1 = 0.0f;
s8 bVar1 = 0;
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
fopAc_ac_c* bullbo_actor = fopAcM_SearchByID(i_this->mWbActorID);
e_wb_class* bullbo = (e_wb_class*)bullbo_actor;
if (bullbo == NULL) {
bVar1 = 1;
} else {
@ -1849,7 +1850,7 @@ static void e_rd_wb_search(e_rd_class* i_this) {
i_this->field_0x9c8 = 11;
if (i_this->field_0x990[0] == 0) {
i_this->mMode = 2;
if (bullbo->speedF > 5.0f) {
if (bullbo_actor->speedF > 5.0f) {
anm_init(i_this, BCK_RD_SIGN, 3.0f, 2, 1.0f);
i_this->mSound.startCreatureVoice(Z2SE_EN_RD_V_CALLING, -1);
i_this->field_0x990[0] = cM_rndF(20.0f) + 30.0f;
@ -1860,13 +1861,13 @@ static void e_rd_wb_search(e_rd_class* i_this) {
break;
case 2:
sp54 = bullbo->current.pos - a_this->current.pos;
sp54 = bullbo_actor->current.pos - a_this->current.pos;
cLib_addCalcAngleS2(&a_this->current.angle.y, cM_atan2s(sp54.x, sp54.z), 4, 0x800);
i_this->field_0x9c8 = 11;
if (i_this->field_0x990[0] == 0 && bullbo->speedF < 1.0f) {
if (i_this->field_0x990[0] == 0 && bullbo_actor->speedF < 1.0f) {
cXyz sp6c, sp78;
cMtx_YrotS(*calc_mtx, bullbo->shape_angle.y);
cMtx_YrotS(*calc_mtx, bullbo_actor->shape_angle.y);
sp54.x = 100.0f;
sp54.y = 0.0f;
if (i_this->field_0x9be == 1) {
@ -1876,11 +1877,11 @@ static void e_rd_wb_search(e_rd_class* i_this) {
}
MtxPosition(&sp54, &sp60);
sp6c = (bullbo->current.pos + sp60) - a_this->current.pos;
sp6c = (bullbo_actor->current.pos + sp60) - a_this->current.pos;
sp54.x = -100.0f;
MtxPosition(&sp54, &sp60);
sp78 = (bullbo->current.pos + sp60) - a_this->current.pos;
sp78 = (bullbo_actor->current.pos + sp60) - a_this->current.pos;
if (sp6c.abs() < sp78.abs()) {
i_this->field_0x9bd = 0;
sp60 = sp6c + a_this->current.pos;
@ -1898,7 +1899,7 @@ static void e_rd_wb_search(e_rd_class* i_this) {
case 3:
fVar1 = l_HIO.dash_speed * 1.5f;
cMtx_YrotS(*calc_mtx, bullbo->shape_angle.y);
cMtx_YrotS(*calc_mtx, bullbo_actor->shape_angle.y);
if (i_this->field_0x9bd == 0) {
sp54.x = 100.0f;
@ -1913,7 +1914,7 @@ static void e_rd_wb_search(e_rd_class* i_this) {
}
MtxPosition(&sp54, &sp60);
sp60 += bullbo->current.pos;
sp60 += bullbo_actor->current.pos;
sp54 = sp60 - a_this->current.pos;
i_this->field_0x5cc = cM_atan2s(sp54.x, sp54.z);
cLib_addCalcAngleS2(&a_this->current.angle.y, i_this->field_0x5cc, 2, 0x400);
@ -1932,7 +1933,7 @@ static void e_rd_wb_search(e_rd_class* i_this) {
break;
case 4:
cMtx_YrotS(*calc_mtx, bullbo->shape_angle.y);
cMtx_YrotS(*calc_mtx, bullbo_actor->shape_angle.y);
sp54.x = 0.0f;
sp54.y = 0.0f;
if (i_this->field_0x9be == 1) {
@ -1942,7 +1943,7 @@ static void e_rd_wb_search(e_rd_class* i_this) {
}
MtxPosition(&sp54, &i_this->field_0x5c0);
i_this->field_0x5c0 += bullbo->current.pos;
i_this->field_0x5c0 += bullbo_actor->current.pos;
sp54 = i_this->field_0x5c0 - a_this->current.pos;
cLib_addCalcAngleS2(&a_this->current.angle.y, (s16)cM_atan2s(sp54.x, sp54.z), 2, 0x1000);
@ -1983,7 +1984,7 @@ static void e_rd_wb_search(e_rd_class* i_this) {
}
cLib_addCalc2(&a_this->speedF, fVar1, 1.0f, 3.0f);
i_this->field_0x9d4 = bullbo->eyePos;
i_this->field_0x9d4 = bullbo_actor->eyePos;
}
}
@ -2307,11 +2308,13 @@ static void e_rd_wb_run(e_rd_class* i_this) {
/* 8050A3EC-8050A578 005A6C 018C+00 1/1 0/0 0/0 .text s_wbrun_sub__FPvPv */
static void* s_wbrun_sub(void* i_actor, void* i_data) {
e_wb_class* bullbo = (e_wb_class*)i_actor;
if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_WB && bullbo->field_0x79d == 0) {
cXyz sp24(bullbo->current.pos - ((fopAc_ac_c*)i_data)->current.pos);
if (sp24.abs() > KREG_F(11) + 7000.0f) {
return i_actor;
if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_WB) {
e_wb_class* bullbo = (e_wb_class*)i_actor;
if (bullbo->field_0x79d == 0) {
cXyz sp24(bullbo->mEnemy.current.pos - ((fopAc_ac_c*)i_data)->current.pos);
if (sp24.abs() > KREG_F(11) + 7000.0f) {
return i_actor;
}
}
}
@ -3977,7 +3980,7 @@ static void big_damage(e_rd_class* i_this) {
a_this->speed.y = l_HIO.jump_y + 2.0f;
if (i_this->field_0x9bc == 2) {
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
fopAc_ac_c* bullbo = fopAcM_SearchByID(i_this->mWbActorID);
if (bullbo != NULL && bullbo->speedF >= 20.0f) {
i_this->field_0x9ec = bullbo->speedF;
if (i_this->field_0x9ec > 40.0f) {
@ -4083,11 +4086,11 @@ static void part_break(e_rd_class* i_this) {
static void damage_check(e_rd_class* i_this) {
fopEn_enemy_c* a_this = (fopEn_enemy_c*)&i_this->actor;
daPy_py_c* player = (daPy_py_c*)dComIfGp_getPlayer(0);
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
e_wb_class* bullbo_p = bullbo;
fopAc_ac_c* bullbo = fopAcM_SearchByID(i_this->mWbActorID);
e_wb_class* bullbo_p = (e_wb_class*)bullbo;
int iVar1;
if (i_this->field_0x9bc == 2 && bullbo != NULL && (bullbo->field_0x6be & 0xC0) != 0) {
if (i_this->field_0x9bc == 2 && bullbo != NULL && (bullbo_p->field_0x6be & 0xC0) != 0) {
if (i_this->mAction == ACTION_IKKI2_END) {
i_this->mMode = 10;
return;
@ -4097,7 +4100,7 @@ static void damage_check(e_rd_class* i_this) {
i_this->mMode = 0;
i_this->field_0x998 = 1000;
if ((bullbo->field_0x6be & 0x80) != 0) {
if ((bullbo_p->field_0x6be & 0x80) != 0) {
i_this->field_0xa0e = a_this->shape_angle.y + 0x8000 + (s16)cM_rndFX(3000.0f);
i_this->field_0x9f6 = (s16)cM_rndFX(1000.0f);
} else {
@ -4129,20 +4132,20 @@ static void damage_check(e_rd_class* i_this) {
if (dComIfGp_getHorseActor()->speedF > 20.0f || sVar1 > 0x7800 || sVar1 < -0x7800) {
cc_at_check(a_this, &i_this->mAtInfo);
dScnPly_c::setPauseTimer(0);
bullbo->field_0x79e++;
if (bullbo->field_0x79e >= 3) {
bullbo_p->field_0x79e++;
if (bullbo_p->field_0x79e >= 3) {
mDoAud_bgmStop(30);
i_this->mAction = ACTION_IKKI2_END;
i_this->mMode = 0;
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_DAMAGE_L, -1);
} else {
bullbo->field_0x169e = 25;
bullbo_p->field_0x169e = 25;
anm_init(i_this, e_rdb_class::BCK_RB_RDAMAGEB, 2.0f, 0, 1.0f);
i_this->mSound.startCreatureVoice(Z2SE_EN_RDB_V_DAMAGE, -1);
}
uVar1 = 3;
bullbo->field_0x69e = 100;
bullbo_p->field_0x69e = 100;
dComIfGs_onSaveDunSwitch(7);
} else {
uVar1 = 2;
@ -4150,7 +4153,7 @@ static void damage_check(e_rd_class* i_this) {
}
cXyz sp34, sp40;
cMtx_YrotS(*calc_mtx, bullbo_p->shape_angle.y);
cMtx_YrotS(*calc_mtx, bullbo->shape_angle.y);
sp34.set(0.0f, nREG_F(9) + 150.0f, nREG_F(10) + 200.0f);
MtxPosition(&sp34, &sp40);
@ -4164,11 +4167,11 @@ static void damage_check(e_rd_class* i_this) {
}
anm_init(i_this, e_rdb_class::BCK_RB_RGUARD_F, 2.0f, 0, 1.0f);
bullbo->field_0x169e = 25;
bullbo_p->field_0x169e = 25;
dScnPly_c::setPauseTimer(0);
cXyz sp58, sp64;
cMtx_YrotS(*calc_mtx, bullbo_p->shape_angle.y);
cMtx_YrotS(*calc_mtx, bullbo->shape_angle.y);
if ((s16)(a_this->shape_angle.y - i_this->mPlayerAngleY) < 0) {
sp58.set(100.0f, nREG_F(9) + 150.0f, nREG_F(10) + 400.0f);
@ -4261,17 +4264,17 @@ static void damage_check(e_rd_class* i_this) {
if (i_this->mBossMode != 0 && bullbo != NULL) {
i_this->field_0x998 = 20;
if (i_this->mBossMode == 2) {
bullbo->field_0x79e++;
if (bullbo->field_0x79e == 1) {
bullbo_p->field_0x79e++;
if (bullbo_p->field_0x79e == 1) {
a_this->health = 0;
/* dSv_event_flag_c::M_055 - Main Event - Did damage at least once during joust/one-on-one battle */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x58]);
part_break(i_this);
bullbo->field_0x169e = 20;
bullbo_p->field_0x169e = 20;
dScnPly_c::setPauseTimer(0);
}
if (l_HIO.one_hit_kill != 0 || bullbo->field_0x79e >= 2) {
if (l_HIO.one_hit_kill != 0 || bullbo_p->field_0x79e >= 2) {
mDoAud_bgmStop(30);
i_this->mAction = ACTION_IKKI_END;
i_this->mMode = 0;
@ -4296,30 +4299,30 @@ static void damage_check(e_rd_class* i_this) {
}
}
bullbo->field_0x79e++;
bullbo->field_0x79f++;
bullbo_p->field_0x79e++;
bullbo_p->field_0x79f++;
part_break(i_this);
if (bullbo->field_0x79e == 1 || bullbo->field_0x79e == 2 || bullbo->field_0x79e == 3 ||
bullbo->field_0x79e == 4 || bullbo->field_0x79e == 6) {
if (bullbo_p->field_0x79e == 1 || bullbo_p->field_0x79e == 2 || bullbo_p->field_0x79e == 3 ||
bullbo_p->field_0x79e == 4 || bullbo_p->field_0x79e == 6) {
part_break(i_this);
}
s8 sVar2 = 8 - bullbo->field_0x79e;
s8 sVar2 = 8 - bullbo_p->field_0x79e;
if (sVar2 > 8) {
sVar2 = 8;
}
dComIfGs_BossLife_public_Set(sVar2);
if (bullbo->field_0x79e == 5) {
if (bullbo_p->field_0x79e == 5) {
Z2GetAudioMgr()->changeSubBgmStatus(2);
}
if (bullbo->field_0x79e >= 8) {
if (bullbo_p->field_0x79e >= 8) {
i_this->mAction = ACTION_KIBA_END;
i_this->mMode = 0;
mDoAud_seStart(Z2SE_EN_RDB_V_FAINT, 0, 0, 0);
bullbo->mActionID = 31;
bullbo->mActionMode = 0;
bullbo_p->mActionID = 31;
bullbo_p->mActionMode = 0;
mDoAud_bgmStop(30);
return;
}
@ -5173,17 +5176,18 @@ static void action(e_rd_class* i_this) {
cLib_addCalc0(&i_this->field_0x9f0, 1.0f, 7.0f);
}
} else {
a_this->attention_info.distances[2] = 34;
e_wb_class* bullbo = (e_wb_class*)fopAcM_SearchByID(i_this->mWbActorID);
a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 34;
fopAc_ac_c* bullboActor = fopAcM_SearchByID(i_this->mWbActorID);
e_wb_class* bullbo = (e_wb_class*)bullboActor;
if (bullbo == NULL) {
i_this->mAction = ACTION_NORMAL;
i_this->mMode = 0;
return;
}
a_this->speedF = bullbo->speedF;
a_this->speedF = bullboActor->speedF;
if (daPy_getPlayerActorClass()->checkHorseRide() && dComIfGp_getHorseActor()->speedF >= 30.0f) {
a_this->speed = bullbo->speed;
a_this->speed = bullboActor->speed;
a_this->speed.y = 0.0f;
} else {
a_this->speed.set(0.0f, 0.0f, 0.0f);
@ -5204,7 +5208,7 @@ static void action(e_rd_class* i_this) {
if (i_this->field_0x9bc == 2) {
a_this->current.pos = i_this->field_0x9b0;
a_this->current.angle = bullbo->shape_angle;
a_this->current.angle = bullboActor->shape_angle;
a_this->shape_angle = a_this->current.angle;
sp25c.x = 10.0f;
@ -5231,7 +5235,7 @@ static void action(e_rd_class* i_this) {
i_this->field_0x9bc = 2;
}
cLib_addCalcAngleS2(&a_this->current.angle.y, bullbo->shape_angle.y, 4, 0x800);
cLib_addCalcAngleS2(&a_this->current.angle.y, bullboActor->shape_angle.y, 4, 0x800);
}
i_this->field_0x9c0 += i_this->field_0x9c4;

View File

@ -598,7 +598,7 @@ static void e_rdb_end(e_rdb_class* i_this) {
break;
case 10:
if ((((actor->mActionID == 102 && actor->speedF > 40.0f) &&
if ((((actor->mActionID == 102 && actor->mEnemy.speedF > 40.0f) &&
player->current.pos.x > 1470.0f && player->current.pos.x < 2130.0f)) &&
((player->current.pos.z < 200.0f) &&
(player->shape_angle.y > 0x7000 || player->shape_angle.y < -0x7000)))

File diff suppressed because it is too large Load Diff

View File

@ -186,7 +186,7 @@ void daObjCRVFENCE_c::NormalAction() {
if (wb_p != NULL && wb_p->mActionID == ACT_PL_RIDE2) {
fopAcM_OffStatus(this, fopAcM_STATUS_UNK_000100);
fopAcM_seStartCurrent(this, Z2SE_OBJ_SAKU_BREAK, 0);
cXyz sp5c(fopAcM_GetPosition(wb_p));
cXyz sp5c(fopAcM_GetPosition(&wb_p->mEnemy));
Mtx mtx;
mDoMtx_inverse(field_0x65c->getBaseTRMtx(), mtx);
mDoMtx_stack_c::copy(mtx);