mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-12-22 16:30:23 +00:00
Fixed manta ring spawning and likely other object desync bugs
This commit is contained in:
parent
520cff93d9
commit
da95b3febe
2 changed files with 4 additions and 4 deletions
|
@ -89,12 +89,12 @@ static void manta_ray_act_spawn_ring(void) {
|
|||
struct Object *ringManager = o->parentObj;
|
||||
struct Object *ring;
|
||||
|
||||
if (o->oTimer == 300) {
|
||||
if (!sync_object_is_owned_locally(o->oSyncID)) { return; }
|
||||
|
||||
if (o->oTimer >= 300) {
|
||||
o->oTimer = 0;
|
||||
}
|
||||
|
||||
if (!sync_object_is_owned_locally(o->oSyncID)) { return; }
|
||||
|
||||
if (o->oTimer == 0 || o->oTimer == 50 || o->oTimer == 150 || o->oTimer == 200 || o->oTimer == 250) {
|
||||
ring = spawn_object(o, MODEL_WATER_RING, bhvMantaRayWaterRing);
|
||||
if (ring != NULL) {
|
||||
|
|
|
@ -355,7 +355,7 @@ bool sync_object_should_own(u32 syncId) {
|
|||
|
||||
// check distance
|
||||
for (s32 i = 0; i < MAX_PLAYERS; i++) {
|
||||
if (i != 0 && !is_player_active(&gMarioStates[i])) { continue; }
|
||||
if (i != 0 && !is_player_in_local_area(&gMarioStates[i])) { continue; }
|
||||
if (player_distance(&gMarioStates[0], so->o) > player_distance(&gMarioStates[i], so->o)) { return false; }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue