mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-29 07:23:01 +00:00
fix the palette editor hat in hand outside menus (#81)
This commit is contained in:
parent
dc02aa9881
commit
838604a761
2 changed files with 5 additions and 4 deletions
|
@ -10874,7 +10874,7 @@ void cutscene_palette_editor(struct Camera *c) {
|
||||||
if (!pressed && m->action != ACT_TAKING_OFF_CAP && m->action != ACT_PUTTING_ON_CAP) {
|
if (!pressed && m->action != ACT_TAKING_OFF_CAP && m->action != ACT_PUTTING_ON_CAP) {
|
||||||
if (m->flags & MARIO_CAP_ON_HEAD) {
|
if (m->flags & MARIO_CAP_ON_HEAD) {
|
||||||
if (m->action == ACT_IDLE) {
|
if (m->action == ACT_IDLE) {
|
||||||
set_mario_action(m, ACT_TAKING_OFF_CAP, 0);
|
set_mario_action(m, ACT_TAKING_OFF_CAP, 1); // Add palette editor action arg
|
||||||
} else {
|
} else {
|
||||||
cutscene_take_cap_off(m);
|
cutscene_take_cap_off(m);
|
||||||
gCamera->paletteEditorCap = true;
|
gCamera->paletteEditorCap = true;
|
||||||
|
|
|
@ -1882,20 +1882,21 @@ s32 act_putting_on_cap(struct MarioState *m) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// coop custom action
|
// coop custom action
|
||||||
|
// actionArg == 1: the action was inited from CUTSCENE_PALETTE_EDITOR
|
||||||
s32 act_taking_off_cap(struct MarioState *m) {
|
s32 act_taking_off_cap(struct MarioState *m) {
|
||||||
s16 animFrame = set_character_animation(m, CHAR_ANIM_TAKE_CAP_OFF_THEN_ON);
|
s16 animFrame = set_character_animation(m, CHAR_ANIM_TAKE_CAP_OFF_THEN_ON);
|
||||||
switch (animFrame) {
|
switch (animFrame) {
|
||||||
case 0:
|
case 0:
|
||||||
if (gCamera->cutscene != CUTSCENE_PALETTE_EDITOR) {
|
if (m->actionArg != 1) {
|
||||||
enable_time_stop_if_alone();
|
enable_time_stop_if_alone();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
cutscene_take_cap_off(m);
|
cutscene_take_cap_off(m);
|
||||||
if (gCamera->cutscene == CUTSCENE_PALETTE_EDITOR) { gCamera->paletteEditorCap = true; }
|
if (m->actionArg == 1) { gCamera->paletteEditorCap = true; }
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (animFrame >= 30) {
|
if (animFrame >= 30 || gCamera->cutscene != CUTSCENE_PALETTE_EDITOR) {
|
||||||
set_mario_action(m, ACT_IDLE, 0);
|
set_mario_action(m, ACT_IDLE, 0);
|
||||||
disable_time_stop();
|
disable_time_stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue