Added code to send quit message only if game is not in single player mode
This commit is contained in:
8
main.cpp
8
main.cpp
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user