From d19b7802d375cfff0ec863fc6af8244fabfbf815 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 26 Mar 2023 22:05:22 -0700 Subject: [PATCH] Fixed bug in romhacks where coins re-appear when re-entering --- src/game/behaviors/coin.inc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/behaviors/coin.inc.c b/src/game/behaviors/coin.inc.c index ece556e1..4733bcd7 100644 --- a/src/game/behaviors/coin.inc.c +++ b/src/game/behaviors/coin.inc.c @@ -110,6 +110,12 @@ void bhv_coin_loop(void) { } void bhv_coin_formation_spawn_loop(void) { + + // give yellow coins a sync id to fix romhack coin formations + if (!gNetworkAreaLoaded && o->oSyncID == 0) { + sync_object_init(o, SYNC_DISTANCE_ONLY_EVENTS); + } + if (o->oTimer == 0) { cur_obj_set_behavior(bhvYellowCoin); obj_set_hitbox(o, &sYellowCoinHitbox);