Added code to send quit message only if game is not in single player mode

master
Aadhavan Srinivasan 10 months ago
parent 64aa4b1850
commit f961db5e58

@ -396,11 +396,13 @@ int main(int argc, char** argv) {
} }
/* If the game has been quit, ask the peer to quit as well */ /* If the game has been quit, ask the peer to quit as well */
to_send_data = Serial_create_data(0, 0, 0, 0, true); if (type.mode != M_SINGLE) {
type.netsock->sendAll((char *)Serial_serialize(to_send_data), sizeof(Serial_Data) + 1); to_send_data = Serial_create_data(0, 0, 0, 0, true);
type.netsock->sendAll((char *)Serial_serialize(to_send_data), sizeof(Serial_Data) + 1);
sock_quit();
}
window.Close(); window.Close();
sock_quit();
return 0; return 0;
} }

Loading…
Cancel
Save