sw/src/network.cpp: Fix waitforeverybody in Master/Slave

modes. This uses SVN r1135 and r1143 as a reference.
This commit is contained in:
NY00123 2020-04-19 00:58:45 +03:00 committed by Christoph Oelckers
parent dea7c83361
commit 33043b3b05

View file

@ -607,9 +607,10 @@ waitforeverybody(void)
tempbuf[1] = Player[myconnectindex].playerreadyflag + 1; tempbuf[1] = Player[myconnectindex].playerreadyflag + 1;
size++; size++;
#endif #endif
// if we're a peer or slave, not a master
if (!NetBroadcastMode && myconnectindex != connecthead) if (!NetBroadcastMode && myconnectindex != connecthead)
netsendpacket(connecthead, tempbuf, size); netsendpacket(connecthead, tempbuf, size);
else else if (NetBroadcastMode)
netbroadcastpacket(tempbuf, size); netbroadcastpacket(tempbuf, size);
#if 0 #if 0
@ -677,6 +678,9 @@ waitforeverybody(void)
if (i < 0) if (i < 0)
{ {
// master sends ready packet once it hears from all slaves
if (!NetBroadcastMode && myconnectindex == connecthead)
netbroadcastpacket(tempbuf, size);
return; return;
} }
} }