Synchronize burning player smoke + misc version improvements

This commit is contained in:
MysterD 2020-10-10 15:49:17 -07:00
parent da7f7fca4f
commit 30ac923861
4 changed files with 23 additions and 12 deletions

View File

@ -53,7 +53,7 @@ void bhv_bbh_tilting_trap_platform_loop(void) {
if (o->oAction == BBH_TILTING_TRAP_PLATFORM_ACT_MARIO_ON) {
#else
if (gMarioObject->platform == o) {
if (cur_obj_is_any_player_on_platform()) {
#endif
o->oAngleVelPitch = (s32)(distanceToPlayer * coss(angleToPlayer));
o->oFaceAnglePitch += o->oAngleVelPitch;

View File

@ -93,17 +93,17 @@ void dorrie_act_lower_head(void) {
if (cur_obj_init_anim_check_frame(2, 35)) {
cur_obj_reverse_animation();
#ifdef VERSION_JP
/*#ifdef VERSION_JP
if (o->oTimer > 150) {
dorrie_begin_head_raise(FALSE);
} else if (gMarioObject->platform == o) {
} else if (cur_obj_is_any_player_on_platform()) {
if (o->oDorrieForwardDistToMario > 830.0f && set_mario_npc_dialog(&gMarioStates[0], 2, dorrie_act_lower_head_continue_dialog) == 1) {
dorrie_begin_head_raise(TRUE);
} else if (o->oDorrieForwardDistToMario > 320.0f) {
o->oTimer = 0;
}
}
#else
#else*/
if (cur_obj_is_any_player_on_platform()) {
if (gMarioStates[0].marioObj->platform == o
&& o->oDorrieOffsetY == -17.0f && distanceToLocalPlayer > 780.0f
@ -116,7 +116,7 @@ void dorrie_act_lower_head(void) {
} else if (o->oTimer > 150) {
dorrie_begin_head_raise(FALSE);
}
#endif
//#endif
} else {
o->oDorrieNeckAngle += 0x115;

View File

@ -112,6 +112,7 @@ void exclamation_box_act_3(void) {
}
void exclamation_box_spawn_contents(struct Struct802C0DF0 *a0, u8 a1) {
struct Object* player = nearest_player_to_object(o);
struct Object *sp1C = NULL;
if (o->oExclamationBoxForce) {
@ -123,7 +124,7 @@ void exclamation_box_spawn_contents(struct Struct802C0DF0 *a0, u8 a1) {
sp1C = spawn_object(o, a0->model, a0->behavior);
sp1C->oVelY = 20.0f;
sp1C->oForwardVel = 3.0f;
sp1C->oMoveAngleYaw = gMarioObject->oMoveAngleYaw;
sp1C->oMoveAngleYaw = player->oMoveAngleYaw;
o->oBehParams |= a0->unk2 << 24;
if (a0->model == 122)
o->oFlags |= 0x4000;

View File

@ -16,10 +16,15 @@ void bhv_black_smoke_bowser_loop(void) {
}
void bhv_black_smoke_mario_loop(void) {
if (o->parentObj == NULL) {
obj_mark_for_deletion(o);
return;
}
if (o->oTimer == 0) {
cur_obj_set_pos_relative(gMarioObject, 0, 0, -30.0f);
cur_obj_set_pos_relative(o->parentObj, 0, 0, -30.0f);
o->oForwardVel = random_float() * 2 + 0.5;
o->oMoveAngleYaw = (gMarioObject->oMoveAngleYaw + 0x7000) + random_float() * 8192.0f;
o->oMoveAngleYaw = (o->parentObj->oMoveAngleYaw + 0x7000) + random_float() * 8192.0f;
o->oVelY = 8;
}
o->oMoveAngleYaw += o->oAngleVelYaw;
@ -27,15 +32,20 @@ void bhv_black_smoke_mario_loop(void) {
}
void bhv_flame_mario_loop(void) {
if (o->parentObj == NULL || o->parentObj->behavior != bhvMario) {
obj_mark_for_deletion(o);
return;
}
cur_obj_scale(2.0f);
if (o->oTimer != 0)
if (o->oTimer & 1)
spawn_object(o, MODEL_BURN_SMOKE, bhvBlackSmokeMario);
gMarioObject->prevObj = o; // weird?
spawn_object(o->parentObj, MODEL_BURN_SMOKE, bhvBlackSmokeMario);
o->parentObj->prevObj = o; // weird?
obj_set_parent_relative_pos(o, 40, -120, 0);
if (!(gMarioObject->oMarioParticleFlags & 0x800)) {
if (!(o->parentObj->oMarioParticleFlags & 0x800)) {
o->parentObj->oActiveParticleFlags &= ~0x800;
obj_mark_for_deletion(o);
gMarioObject->prevObj = NULL;
o->parentObj->prevObj = NULL;
}
}