From 6122c4b313e411836406f72136a9a258fbbd1128 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sat, 19 Sep 2020 10:03:36 -0700 Subject: [PATCH] Prevented star from spawning mid-level-change Now CCM's slide star spawns correctly. --- src/game/behaviors/spawn_star.inc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index 151027e4e..9e39a9a9c 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -126,12 +126,13 @@ struct Object *spawn_star(struct Object *sp30, f32 sp34, f32 sp38, f32 sp3C) { } struct Object* spawn_default_star(f32 x, f32 y, f32 z) { - if (gSpawnedStarDefault) { return NULL; } + if (sCurrPlayMode != PLAY_MODE_NORMAL && sCurrPlayMode != PLAY_MODE_PAUSED) { return NULL; } + if (gSpawnedStarDefault == (1 + o->oBehParams)) { return NULL; } struct Object *star; u32 behParams = o->oBehParams; star = spawn_star(star, x, y, z); star->oBehParams2ndByte = 0; - gSpawnedStarDefault = TRUE; + gSpawnedStarDefault = (1 + o->oBehParams); network_send_spawn_star(star, 0, x, y, z, behParams); return star; }