mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-05-02 15:01:49 +00:00
Prevent LLL puzzle from dropping more coins on late join
This commit is contained in:
parent
84ab07bde6
commit
5455f59ad5
2 changed files with 11 additions and 1 deletions
|
|
@ -129,6 +129,15 @@ void bhv_lll_bowser_puzzle_loop(void) {
|
|||
struct Object* player = nearest_player_to_object(o);
|
||||
int distanceToPlayer = dist_between_objects(o, player);
|
||||
|
||||
if (!network_sync_object_initialized(o)) {
|
||||
struct SyncObject *so = network_init_object(o, SYNC_DISTANCE_ONLY_EVENTS);
|
||||
if (so) {
|
||||
network_init_object_field(o, &o->oAction);
|
||||
network_init_object_field(o, &o->oPrevAction);
|
||||
network_init_object_field(o, &o->oBowserPuzzleCompletionFlags);
|
||||
}
|
||||
}
|
||||
|
||||
switch (o->oAction) {
|
||||
case BOWSER_PUZZLE_ACT_SPAWN_PIECES:
|
||||
bhv_lll_bowser_puzzle_spawn_pieces(480.0f);
|
||||
|
|
@ -145,6 +154,7 @@ void bhv_lll_bowser_puzzle_loop(void) {
|
|||
|
||||
// Go to next action so we don't spawn 5 coins ever again.
|
||||
o->oAction++;
|
||||
network_send_object(o);
|
||||
}
|
||||
break;
|
||||
case BOWSER_PUZZLE_ACT_DONE:
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static void debug_warp_level1() {
|
|||
}
|
||||
|
||||
static void debug_warp_level2() {
|
||||
dynos_warp_to_level(LEVEL_WDW, 1, 1);
|
||||
dynos_warp_to_level(LEVEL_LLL, 1, 1);
|
||||
}
|
||||
|
||||
static void debug_grand_star(void) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue