mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-27 08:10:31 +00:00
Fix bombers code crash.
This commit is contained in:
parent
837ef4dde6
commit
f4cae758b5
@ -237,16 +237,16 @@ void func_809C4BC4(EnBomBowlMan* this, PlayState* play) {
|
|||||||
code = gSaveContext.save.saveInfo.bomberCode[i];
|
code = gSaveContext.save.saveInfo.bomberCode[i];
|
||||||
if (code == 1) {
|
if (code == 1) {
|
||||||
Math_Vec3f_Copy(&this->actor.world.pos, &D_809C61A0[i]);
|
Math_Vec3f_Copy(&this->actor.world.pos, &D_809C61A0[i]);
|
||||||
this->unk_2D8[code] = this;
|
this->unk_2DC[code - 1] = this;
|
||||||
} else {
|
} else {
|
||||||
Math_Vec3f_Copy(&sp7C, &D_809C61A0[i]);
|
Math_Vec3f_Copy(&sp7C, &D_809C61A0[i]);
|
||||||
bomBowlMan = (EnBomBowlMan*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_BOM_BOWL_MAN,
|
bomBowlMan = (EnBomBowlMan*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_BOM_BOWL_MAN,
|
||||||
sp7C.x, sp7C.y, sp7C.z, 0, this->actor.world.rot.y, 0, code);
|
sp7C.x, sp7C.y, sp7C.z, 0, this->actor.world.rot.y, 0, code);
|
||||||
if (bomBowlMan != NULL) {
|
if (bomBowlMan != NULL) {
|
||||||
if (i == 2) {
|
if (i == 2) {
|
||||||
this->unk_2D8[0] = bomBowlMan;
|
this->unk_2D8 = bomBowlMan;
|
||||||
}
|
}
|
||||||
this->unk_2D8[code] = bomBowlMan;
|
this->unk_2DC[code - 1] = bomBowlMan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,7 +268,7 @@ void func_809C4BC4(EnBomBowlMan* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
|
void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
|
||||||
Math_SmoothStepToS(&this->unk_290, this->unk_2D4, 1, 5000, 0);
|
Math_SmoothStepToS(&this->unk_290, this->unk_2D4, 1, 0x1388, 0);
|
||||||
|
|
||||||
if (this->unk_2B8 == 0) {
|
if (this->unk_2B8 == 0) {
|
||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
@ -308,7 +308,7 @@ void func_809C4DA4(EnBomBowlMan* this, PlayState* play) {
|
|||||||
this->unk_2C0 = 1;
|
this->unk_2C0 = 1;
|
||||||
D_809C6104 = 1;
|
D_809C6104 = 1;
|
||||||
Camera_SetTargetActor(Play_GetCamera(play, CutsceneManager_GetCurrentSubCamId(this->csId1)),
|
Camera_SetTargetActor(Play_GetCamera(play, CutsceneManager_GetCurrentSubCamId(this->csId1)),
|
||||||
&this->unk_2D8[0]->actor);
|
&this->unk_2D8->actor);
|
||||||
this->unk_2D4 = 0;
|
this->unk_2D4 = 0;
|
||||||
this->unk_2BC = 10;
|
this->unk_2BC = 10;
|
||||||
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_17, 1.0f);
|
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_17, 1.0f);
|
||||||
@ -537,7 +537,7 @@ void func_809C5738(EnBomBowlMan* this, PlayState* play) {
|
|||||||
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_18, 1.0f);
|
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_18, 1.0f);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Math_SmoothStepToS(&this->actor.world.rot.y, yaw, 1, 2000, 10);
|
Math_SmoothStepToS(&this->actor.world.rot.y, yaw, 1, 0x7D0, 0xA);
|
||||||
Math_ApproachF(&this->actor.world.pos.x, this->unk_2A0.x, 0.5f, 6.0f);
|
Math_ApproachF(&this->actor.world.pos.x, this->unk_2A0.x, 0.5f, 6.0f);
|
||||||
Math_ApproachF(&this->actor.world.pos.z, this->unk_2A0.z, 0.5f, 6.0f);
|
Math_ApproachF(&this->actor.world.pos.z, this->unk_2A0.z, 0.5f, 6.0f);
|
||||||
if ((sqrtf(SQ(this->actor.world.pos.x - this->unk_2A0.x) + SQ(this->actor.world.pos.z - this->unk_2A0.z)) <
|
if ((sqrtf(SQ(this->actor.world.pos.x - this->unk_2A0.x) + SQ(this->actor.world.pos.z - this->unk_2A0.z)) <
|
||||||
@ -642,7 +642,7 @@ void func_809C5BF4(EnBomBowlMan* this, PlayState* play) {
|
|||||||
Player* player = GET_PLAYER(play);
|
Player* player = GET_PLAYER(play);
|
||||||
|
|
||||||
Message_CloseTextbox(play);
|
Message_CloseTextbox(play);
|
||||||
Camera_SetTargetActor(subCam, &this->unk_2D8[0]->actor);
|
Camera_SetTargetActor(subCam, &this->unk_2D8->actor);
|
||||||
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_13, 1.0f);
|
EnBomBowlMan_ChangeAnim(this, ENBOMBOWLMAN_ANIM_13, 1.0f);
|
||||||
D_809C6100 = 0;
|
D_809C6100 = 0;
|
||||||
if (player->transformation == PLAYER_FORM_HUMAN) {
|
if (player->transformation == PLAYER_FORM_HUMAN) {
|
||||||
@ -656,8 +656,7 @@ void func_809C5BF4(EnBomBowlMan* this, PlayState* play) {
|
|||||||
this->actionFunc = func_809C4DA4;
|
this->actionFunc = func_809C4DA4;
|
||||||
} else {
|
} else {
|
||||||
s32 idx = D_809C6100 - 1;
|
s32 idx = D_809C6100 - 1;
|
||||||
|
Camera_SetTargetActor(subCam, &this->unk_2DC[idx]->actor);
|
||||||
Camera_SetTargetActor(subCam, &this->unk_2D8[1 + idx]->actor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ typedef struct EnBomBowlMan {
|
|||||||
/* 0x2D2 */ s16 csId2;
|
/* 0x2D2 */ s16 csId2;
|
||||||
/* 0x2D4 */ s16 unk_2D4;
|
/* 0x2D4 */ s16 unk_2D4;
|
||||||
/* 0x2D6 */ s16 csId3;
|
/* 0x2D6 */ s16 csId3;
|
||||||
/* 0x2D8 */ struct EnBomBowlMan* unk_2D8[5];
|
/* 0x2D8 */ struct EnBomBowlMan* unk_2D8;
|
||||||
/* 0x2EC */ UNK_TYPE1 unk2EC[0x4];
|
/* 0x2DC */ struct EnBomBowlMan* unk_2DC[5];
|
||||||
/* 0x2F0 */ s16 unk_2F0;
|
/* 0x2F0 */ s16 unk_2F0;
|
||||||
/* 0x2F2 */ s16 unk_2F2;
|
/* 0x2F2 */ s16 unk_2F2;
|
||||||
/* 0x2F4 */ s16 unk_2F4;
|
/* 0x2F4 */ s16 unk_2F4;
|
||||||
|
Loading…
Reference in New Issue
Block a user