diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-05-24 19:40:54 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2018-06-23 15:22:31 +0200 |
commit | 4fb76db42f886ff21a9f60fc89c786de79d79705 (patch) | |
tree | e98db0834c6797a1b87a43ccc14479917855c2c3 /src/network/core | |
parent | 11ba094582ae3eb8ed20f2f47938e18a827d6163 (diff) | |
download | openttd-4fb76db42f886ff21a9f60fc89c786de79d79705.tar.xz |
Feature #986: Automatic save when losing connection to a network game
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/tcp_game.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 9b3f7b5ef..caa378fc4 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -45,6 +45,8 @@ NetworkRecvStatus NetworkGameSocketHandler::CloseConnection(bool error) { /* Clients drop back to the main menu */ if (!_network_server && _networking) { + extern void ClientNetworkEmergencySave(); // from network_client.cpp + ClientNetworkEmergencySave(); _switch_mode = SM_MENU; _networking = false; ShowErrorMessage(STR_NETWORK_ERROR_LOSTCONNECTION, INVALID_STRING_ID, WL_CRITICAL); |