please remember to flush

This commit is contained in:
Arisotura 2023-04-06 18:55:16 +02:00
parent 8b742bba91
commit 413e61ef81

View File

@ -511,6 +511,7 @@ bool SendBlobToMirrorClients(int type, u32 len, u8* data)
ENetPacket* pkt = enet_packet_create(buf, 16+chunklen, ENET_PACKET_FLAG_RELIABLE); ENetPacket* pkt = enet_packet_create(buf, 16+chunklen, ENET_PACKET_FLAG_RELIABLE);
enet_host_broadcast(MirrorHost, 1, pkt); enet_host_broadcast(MirrorHost, 1, pkt);
enet_host_flush(MirrorHost);
} }
} }
@ -683,6 +684,7 @@ void SyncMirrorClients()
data[1] = (u8)Config::ConsoleType; data[1] = (u8)Config::ConsoleType;
ENetPacket* pkt = enet_packet_create(&data, 2, ENET_PACKET_FLAG_RELIABLE); ENetPacket* pkt = enet_packet_create(&data, 2, ENET_PACKET_FLAG_RELIABLE);
enet_host_broadcast(MirrorHost, 1, pkt); enet_host_broadcast(MirrorHost, 1, pkt);
enet_host_flush(MirrorHost);
// wait for all clients to have caught up // wait for all clients to have caught up
int ngood = 0; int ngood = 0;
@ -711,6 +713,7 @@ void SyncMirrorClients()
data[0] = 0x05; data[0] = 0x05;
pkt = enet_packet_create(&data, 1, ENET_PACKET_FLAG_RELIABLE); pkt = enet_packet_create(&data, 1, ENET_PACKET_FLAG_RELIABLE);
enet_host_broadcast(MirrorHost, 1, pkt); enet_host_broadcast(MirrorHost, 1, pkt);
enet_host_flush(MirrorHost);
StartLocal(); StartLocal();
} }