mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 13:35:12 +00:00
Sync setHome value in spawn object
This commit is contained in:
parent
8c92885a7b
commit
c0cfc89236
2 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
|||
// 0x0701FDB8 - 0x0701FEA8
|
||||
static const Vtx bbh_seg7_vertex_0701FDB8[] = {
|
||||
{{{ -306, 0, 256}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 307, -101, 256}, 0, { 6100, 990}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
|
|
|
@ -22,6 +22,7 @@ struct SpawnObjectData {
|
|||
u32 behaviorId;
|
||||
s16 activeFlags;
|
||||
s32 rawData[80];
|
||||
u8 setHome;
|
||||
u8 globalPlayerIndex;
|
||||
u16 extendedModelId;
|
||||
u8 extraFieldCount;
|
||||
|
@ -88,6 +89,7 @@ void network_send_spawn_objects_to(u8 sendToLocalIndex, struct Object* objects[]
|
|||
packet_write(&p, &o->header.gfx.scale[0], sizeof(f32));
|
||||
packet_write(&p, &o->header.gfx.scale[1], sizeof(f32));
|
||||
packet_write(&p, &o->header.gfx.scale[2], sizeof(f32));
|
||||
packet_write(&p, &o->setHome, sizeof(u8));
|
||||
packet_write(&p, &o->globalPlayerIndex, sizeof(u8));
|
||||
packet_write(&p, &extendedModelId, sizeof(u16));
|
||||
}
|
||||
|
@ -124,6 +126,7 @@ void network_receive_spawn_objects(struct Packet* p) {
|
|||
packet_read(p, &scale[0], sizeof(f32));
|
||||
packet_read(p, &scale[1], sizeof(f32));
|
||||
packet_read(p, &scale[2], sizeof(f32));
|
||||
packet_read(p, &data.setHome, sizeof(u8));
|
||||
packet_read(p, &data.globalPlayerIndex, sizeof(u8));
|
||||
packet_read(p, &data.extendedModelId, sizeof(u16));
|
||||
|
||||
|
@ -174,6 +177,7 @@ void network_receive_spawn_objects(struct Packet* p) {
|
|||
|
||||
o->globalPlayerIndex = data.globalPlayerIndex;
|
||||
o->coopFlags |= COOP_OBJ_FLAG_NETWORK;
|
||||
o->setHome = data.setHome;
|
||||
|
||||
memcpy(o->rawData.asU32, data.rawData, sizeof(u32) * 80);
|
||||
|
||||
|
|
Loading…
Reference in a new issue