diff --git a/src/game/behaviors/boo.inc.c b/src/game/behaviors/boo.inc.c index a2b8b3eb..d6f5c039 100644 --- a/src/game/behaviors/boo.inc.c +++ b/src/game/behaviors/boo.inc.c @@ -40,7 +40,6 @@ struct SyncObject* boo_network_init_object(void) { network_init_object_field(o, &o->oInteractType); network_init_object_field(o, &o->oOpacity); network_init_object_field(o, &o->oRoom); - network_init_object_field(o, &o->oIntangibleTimer); return so; } diff --git a/src/game/behaviors/mips.inc.c b/src/game/behaviors/mips.inc.c index ac64c89a..39e7ebdf 100644 --- a/src/game/behaviors/mips.inc.c +++ b/src/game/behaviors/mips.inc.c @@ -61,7 +61,6 @@ void bhv_mips_init(void) { network_init_object_field(o, &o->oBehParams2ndByte); network_init_object_field(o, &o->oHeldState); network_init_object_field(o, &o->oFlags); - network_init_object_field(o, &o->oIntangibleTimer); so->on_received_pre = bhv_mips_on_received_pre; so->on_received_post = bhv_mips_on_received_post; } diff --git a/src/game/behaviors/piranha_plant.inc.c b/src/game/behaviors/piranha_plant.inc.c index 2054baf7..a6d26513 100644 --- a/src/game/behaviors/piranha_plant.inc.c +++ b/src/game/behaviors/piranha_plant.inc.c @@ -238,7 +238,6 @@ void piranha_plant_act_respawn(void) { } else { o->oPiranhaPlantScale = 1.0f; o->oAction = PIRANHA_PLANT_ACT_IDLE; - if (network_owns_object(o)) { network_send_object(o); } } cur_obj_scale(o->oPiranhaPlantScale); } @@ -283,7 +282,6 @@ void piranha_plant_act_biting(void) { if (distanceToPlayer > 500.0f) { if (cur_obj_check_if_near_animation_end()) { o->oAction = PIRANHA_PLANT_ACT_STOPPED_BITING; - if (network_owns_object(o)) { network_send_object(o); } } } @@ -292,7 +290,6 @@ void piranha_plant_act_biting(void) { if (o->oInteractStatus & INT_STATUS_INTERACTED) { if (marioState->flags & MARIO_METAL_CAP) { o->oAction = PIRANHA_PLANT_ACT_ATTACKED; - if (network_owns_object(o)) { network_send_object(o); } } } } @@ -323,7 +320,6 @@ void piranha_plant_act_stopped_biting(void) { if (cur_obj_check_if_near_animation_end()) { o->oAction = PIRANHA_PLANT_ACT_SLEEPING; - if (network_owns_object(o)) { network_send_object(o); } } /** @@ -336,7 +332,6 @@ void piranha_plant_act_stopped_biting(void) { if (o->oDistanceToMario < 400.0f) { if (mario_moving_fast_enough_to_make_piranha_plant_bite()) { o->oAction = PIRANHA_PLANT_ACT_BITING; - if (network_owns_object(o)) { network_send_object(o); } } } } @@ -361,7 +356,7 @@ void (*TablePiranhaPlantActions[])(void) = { */ void bhv_piranha_plant_loop(void) { if (!network_sync_object_initialized(o)) { - network_init_object(o, SYNC_DISTANCE_ONLY_EVENTS); + network_init_object(o, 2000.0f); network_init_object_field(o, &o->oAction); network_init_object_field(o, &o->oInteractStatus); network_init_object_field(o, &o->oInteractType); diff --git a/src/pc/network/packets/packet_object.c b/src/pc/network/packets/packet_object.c index 8be668c1..785a6ce9 100644 --- a/src/pc/network/packets/packet_object.c +++ b/src/pc/network/packets/packet_object.c @@ -222,6 +222,7 @@ static void packet_write_object_standard_fields(struct Packet* p, struct Object* packet_write(p, &o->oTimer, sizeof(u32)); packet_write(p, &o->activeFlags, sizeof(s16)); packet_write(p, &o->header.gfx.node.flags, sizeof(s16)); + packet_write(p, &o->oIntangibleTimer, sizeof(s32)); } static void packet_read_object_standard_fields(struct Packet* p, struct Object* o) { @@ -242,6 +243,7 @@ static void packet_read_object_standard_fields(struct Packet* p, struct Object* packet_read(p, &o->oTimer, sizeof(u32)); packet_read(p, &o->activeFlags, sizeof(u16)); packet_read(p, &o->header.gfx.node.flags, sizeof(s16)); + packet_read(p, &o->oIntangibleTimer, sizeof(s32)); } // ----- extra fields ----- //