summaryrefslogtreecommitdiff
path: root/src/openttd.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-01 14:41:25 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-01 18:30:08 +0200
commit05394d5216f89c9a7e14487b571515e510828657 (patch)
tree5b776de934917aeb88b09486fc1309a22467a6bf /src/openttd.h
parent83985fe26f1ad87df709f122f74e5d50485095fa (diff)
downloadopenttd-05394d5216f89c9a7e14487b571515e510828657.tar.xz
Fix #6598: Prevent invalid memory accesses when abandoning a join from within a network game
One could join a network game from within an already running network game. This would call a NetworkDisconnect, but keeps the UI alive. If, during that process the join is aborted, e.g. by cancelling on a password dialog, you would still be in your network game but also get shown the server list. Solve all the underlying problems by falling back to the main UI when (re)connecting to a(nother) server.
Diffstat (limited to 'src/openttd.h')
-rw-r--r--src/openttd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/openttd.h b/src/openttd.h
index 77fafab1d..2cd9cc1f0 100644
--- a/src/openttd.h
+++ b/src/openttd.h
@@ -36,6 +36,7 @@ enum SwitchMode {
SM_START_HEIGHTMAP, ///< Load a heightmap and start a new game from it.
SM_LOAD_HEIGHTMAP, ///< Load heightmap from scenario editor.
SM_RESTART_HEIGHTMAP, ///< Load a heightmap and start a new game from it with current settings.
+ SM_JOIN_GAME, ///< Join a network game.
};
/** Display Options */