Fix 100 coin stars spawning inside ceilings + being able to spawn multiple 100 coin stars (#541)

* Going below 100 coins and getting 100 coins again will no longer result in multiple 100 coin stars spawning

* 100 coin stars can no longer clip into ceilings

* Renamed set_home_to_mario to spawned_star_set_target_above_mario since it's a more descriptive name of what it does
This commit is contained in:
Reonu authored and GitHub committed 2022-12-06 18:44:16 +01:00
1 parent 1098ea95ea
commit 22b3c9ba08
4 files changed
+16 -4

No files matched your search

+2 -1
View File
@@ -737,8 +737,9 @@ u32 interact_coin(struct MarioState *m, UNUSED u32 interactType, struct Object *
#ifdef X_COIN_STAR
if (COURSE_IS_MAIN_COURSE(gCurrCourseNum) && m->numCoins - obj->oDamageOrCoinValue < X_COIN_STAR
&& m->numCoins >= X_COIN_STAR) {
&& m->numCoins >= X_COIN_STAR && !g100CoinStarSpawned) {
bhv_spawn_star_no_level_exit(STAR_BP_ACT_100_COINS);
g100CoinStarSpawned = TRUE;
}
#endif
#if ENABLE_RUMBLE