diff --git a/include/config/config_objects.h b/include/config/config_objects.h index 6f2a9952..72c37f63 100644 --- a/include/config/config_objects.h +++ b/include/config/config_objects.h @@ -24,6 +24,11 @@ */ // #define BLUE_COIN_SWITCH_RETRY +/** + * Allow previewing blue coin locations from a blue coin switch when Mario is standing on the blue coin switch. + */ +// #define BLUE_COIN_SWITCH_PREVIEW + /**************** * -- GOOMBA -- ****************/ diff --git a/src/game/behaviors/blue_coin.inc.c b/src/game/behaviors/blue_coin.inc.c index 72591253..189cd2d8 100644 --- a/src/game/behaviors/blue_coin.inc.c +++ b/src/game/behaviors/blue_coin.inc.c @@ -34,15 +34,20 @@ void bhv_hidden_blue_coin_loop(void) { o->oAction = HIDDEN_BLUE_COIN_ACT_ACTIVE; } +#ifdef BLUE_COIN_SWITCH_PREVIEW + if (gMarioObject->platform == blueCoinSwitch) { + cur_obj_enable_rendering(); + } else { + cur_obj_disable_rendering(); + } +#endif + break; case HIDDEN_BLUE_COIN_ACT_ACTIVE: // Become tangible cur_obj_enable_rendering(); cur_obj_become_tangible(); -#ifdef BLUE_COIN_SWITCH_RETRY - o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; -#endif // Delete the coin once collected if (o->oInteractStatus & INT_STATUS_INTERACTED) { @@ -55,6 +60,7 @@ void bhv_hidden_blue_coin_loop(void) { if (cur_obj_wait_then_blink(200, 20)) { #ifdef BLUE_COIN_SWITCH_RETRY o->oAction = HIDDEN_BLUE_COIN_ACT_INACTIVE; + o->header.gfx.node.flags &= ~GRAPH_RENDER_INVISIBLE; #else obj_mark_for_deletion(o); #endif