mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-19 11:42:39 +00:00
Made celebration star appear above correct player
Celebration sparkles appear around all players
This commit is contained in:
parent
c013f9d16a
commit
bbdc3180cd
4 changed files with 22 additions and 8 deletions
|
@ -1,10 +1,10 @@
|
||||||
// celebration_star.c.inc
|
// celebration_star.c.inc
|
||||||
|
|
||||||
void bhv_celebration_star_init(void) {
|
void bhv_celebration_star_init(void) {
|
||||||
o->oHomeX = gMarioObject->header.gfx.pos[0];
|
o->oHomeX = o->parentObj->header.gfx.pos[0];
|
||||||
o->oPosY = gMarioObject->header.gfx.pos[1] + 30.0f;
|
o->oPosY = o->parentObj->header.gfx.pos[1] + 30.0f;
|
||||||
o->oHomeZ = gMarioObject->header.gfx.pos[2];
|
o->oHomeZ = o->parentObj->header.gfx.pos[2];
|
||||||
o->oMoveAngleYaw = gMarioObject->header.gfx.angle[1] + 0x8000;
|
o->oMoveAngleYaw = o->parentObj->header.gfx.angle[1] + 0x8000;
|
||||||
o->oCelebStarDiameterOfRotation = 100;
|
o->oCelebStarDiameterOfRotation = 100;
|
||||||
#if BUGFIX_STAR_BOWSER_KEY
|
#if BUGFIX_STAR_BOWSER_KEY
|
||||||
if (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2) {
|
if (gCurrLevelNum == LEVEL_BOWSER_1 || gCurrLevelNum == LEVEL_BOWSER_2) {
|
||||||
|
@ -58,7 +58,7 @@ void celeb_star_act_face_camera(void) {
|
||||||
#endif
|
#endif
|
||||||
o->oFaceAngleYaw += 0x1000;
|
o->oFaceAngleYaw += 0x1000;
|
||||||
} else {
|
} else {
|
||||||
o->oFaceAngleYaw = gMarioObject->header.gfx.angle[1];
|
o->oFaceAngleYaw = o->parentObj->header.gfx.angle[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o->oTimer == 59)
|
if (o->oTimer == 59)
|
||||||
|
|
|
@ -859,7 +859,12 @@ u32 interact_star_or_key(struct MarioState *m, UNUSED u32 interactType, struct O
|
||||||
starGrabAction = ACT_FALL_AFTER_STAR_GRAB;
|
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;
|
o->oInteractStatus = INT_STATUS_INTERACTED;
|
||||||
m->interactObj = o;
|
m->interactObj = o;
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "seq_ids.h"
|
#include "seq_ids.h"
|
||||||
#include "sound_init.h"
|
#include "sound_init.h"
|
||||||
#include "thread6.h"
|
#include "thread6.h"
|
||||||
|
#include "obj_behaviors.h"
|
||||||
#include "../../include/libc/stdlib.h"
|
#include "../../include/libc/stdlib.h"
|
||||||
#include "pc/pc_main.h"
|
#include "pc/pc_main.h"
|
||||||
#include "pc/network/network.h"
|
#include "pc/network/network.h"
|
||||||
|
@ -647,7 +648,15 @@ void general_star_dance_handler(struct MarioState *m, s32 isInWater) {
|
||||||
if (m->actionState == 0) {
|
if (m->actionState == 0) {
|
||||||
switch (++m->actionTimer) {
|
switch (++m->actionTimer) {
|
||||||
case 1:
|
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();
|
disable_background_sound();
|
||||||
if (m->actionArg & 1) {
|
if (m->actionArg & 1) {
|
||||||
play_course_clear();
|
play_course_clear();
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
static u8 warpToLevel = LEVEL_CCM;
|
static u8 warpToLevel = LEVEL_BOB;
|
||||||
|
|
||||||
#define SCANCODE_0 0x0B
|
#define SCANCODE_0 0x0B
|
||||||
#define SCANCODE_3 0x04
|
#define SCANCODE_3 0x04
|
||||||
|
|
Loading…
Reference in a new issue