From 33043b3b05209afef2e4727226bfca36df3db02b Mon Sep 17 00:00:00 2001 From: NY00123 Date: Sun, 19 Apr 2020 00:58:45 +0300 Subject: [PATCH] sw/src/network.cpp: Fix waitforeverybody in Master/Slave modes. This uses SVN r1135 and r1143 as a reference. --- source/sw/src/network.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/sw/src/network.cpp b/source/sw/src/network.cpp index 91a7724be..b2d75e569 100644 --- a/source/sw/src/network.cpp +++ b/source/sw/src/network.cpp @@ -607,9 +607,10 @@ waitforeverybody(void) tempbuf[1] = Player[myconnectindex].playerreadyflag + 1; size++; #endif + // if we're a peer or slave, not a master if (!NetBroadcastMode && myconnectindex != connecthead) netsendpacket(connecthead, tempbuf, size); - else + else if (NetBroadcastMode) netbroadcastpacket(tempbuf, size); #if 0 @@ -677,6 +678,9 @@ waitforeverybody(void) if (i < 0) { + // master sends ready packet once it hears from all slaves + if (!NetBroadcastMode && myconnectindex == connecthead) + netbroadcastpacket(tempbuf, size); return; } }