diff --git a/src/game/behaviors/celebration_star.inc.c b/src/game/behaviors/celebration_star.inc.c index 85f8964b..375dcc35 100644 --- a/src/game/behaviors/celebration_star.inc.c +++ b/src/game/behaviors/celebration_star.inc.c @@ -1,10 +1,10 @@ // celebration_star.c.inc void bhv_celebration_star_init(void) { - o->oHomeX = gMarioObject->header.gfx.pos[0]; - o->oPosY = gMarioObject->header.gfx.pos[1] + 30.0f; - o->oHomeZ = gMarioObject->header.gfx.pos[2]; - o->oMoveAngleYaw = gMarioObject->header.gfx.angle[1] + 0x8000; + o->oHomeX = o->parentObj->header.gfx.pos[0]; + o->oPosY = o->parentObj->header.gfx.pos[1] + 30.0f; + o->oHomeZ = o->parentObj->header.gfx.pos[2]; + o->oMoveAngleYaw = o->parentObj->header.gfx.angle[1] + 0x8000; o->oCelebStarDiameterOfRotation = 100; #if BUGFIX_STAR_BOWSER_KEY if (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2) { @@ -58,7 +58,7 @@ void celeb_star_act_face_camera(void) { #endif o->oFaceAngleYaw += 0x1000; } else { - o->oFaceAngleYaw = gMarioObject->header.gfx.angle[1]; + o->oFaceAngleYaw = o->parentObj->header.gfx.angle[1]; } if (o->oTimer == 59) diff --git a/src/game/interaction.c b/src/game/interaction.c index 403ae0c1..3c65b85f 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -859,7 +859,12 @@ u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct O starGrabAction = ACT_FALL_AFTER_STAR_GRAB; } - spawn_object(o, MODEL_NONE, bhvStarKeyCollectionPuffSpawner); + for (int i = 0; i < MAX_PLAYERS; i++) { + struct MarioState* marioState = &gMarioStates[i]; + if (!is_player_active(marioState)) { continue; } + if (marioState->marioObj == NULL) { continue; } + spawn_object(marioState->marioObj, MODEL_NONE, bhvStarKeyCollectionPuffSpawner); + } o->oInteractStatus = INT_STATUS_INTERACTED; m->interactObj = o; diff --git a/src/game/mario_actions_cutscene.c b/src/game/mario_actions_cutscene.c index 0d9bf062..ab213cc4 100644 --- a/src/game/mario_actions_cutscene.c +++ b/src/game/mario_actions_cutscene.c @@ -28,6 +28,7 @@ #include "seq_ids.h" #include "sound_init.h" #include "thread6.h" +#include "obj_behaviors.h" #include "../../include/libc/stdlib.h" #include "pc/pc_main.h" #include "pc/network/network.h" @@ -647,7 +648,15 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) { if (m->actionState == 0) { switch (++m->actionTimer) { case 1: - spawn_object(m->marioObj, MODEL_STAR, bhvCelebrationStar); + for (int i = 0; i < MAX_PLAYERS; i++) { + struct MarioState* marioState = &gMarioStates[i]; + if (!is_player_active(marioState)) { continue; } + if (marioState->marioObj == NULL) { continue; } + struct Object* celebStar = spawn_object(marioState->marioObj, MODEL_STAR, bhvCelebrationStar); + if (m != marioState && celebStar != NULL) { + celebStar->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; + } + } disable_background_sound(); if (m->actionArg & 1) { play_course_clear(); diff --git a/src/pc/controller/controller_keyboard_debug.c b/src/pc/controller/controller_keyboard_debug.c index 19aa6295..5075b250 100644 --- a/src/pc/controller/controller_keyboard_debug.c +++ b/src/pc/controller/controller_keyboard_debug.c @@ -5,7 +5,7 @@ #ifdef DEBUG -static u8 warpToLevel = LEVEL_CCM; +static u8 warpToLevel = LEVEL_BOB; #define SCANCODE_0 0x0B #define SCANCODE_3 0x04