mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-22 12:05:11 +00:00
Resync bouncing fireball to only have one owner
This commit is contained in:
parent
3721877b6a
commit
8fb46314fa
1 changed files with 7 additions and 1 deletions
|
@ -27,9 +27,15 @@ void bhv_bouncing_fireball_flame_loop(void) {
|
|||
o->oInteractStatus = 0;
|
||||
}
|
||||
|
||||
void bhv_bouncing_fireball_override_ownership(u8* shouldOverride, u8* shouldOwn) {
|
||||
*shouldOverride = TRUE;
|
||||
*shouldOwn = (get_network_player_smallest_global() == gNetworkPlayerLocal);
|
||||
}
|
||||
|
||||
void bhv_bouncing_fireball_loop(void) {
|
||||
if (!network_sync_object_initialized(o)) {
|
||||
network_init_object(o, SYNC_DISTANCE_ONLY_EVENTS);
|
||||
struct SyncObject* so = network_init_object(o, SYNC_DISTANCE_ONLY_EVENTS);
|
||||
so->override_ownership = bhv_bouncing_fireball_override_ownership;
|
||||
network_init_object_field(o, &o->oAction);
|
||||
network_init_object_field(o, &o->oPrevAction);
|
||||
network_init_object_field(o, &o->oTimer);
|
||||
|
|
Loading…
Reference in a new issue