diff options
author | Darkvater <darkvater@openttd.org> | 2005-07-17 16:01:26 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-07-17 16:01:26 +0000 |
commit | 3e49626aecbf8316fc48c326a17fd11c67c8cdc8 (patch) | |
tree | 2d7b8067b8fed97f301f314b9611e6b832e05cf7 /openttd.c | |
parent | 80aa8c868b3ec9ca5d484ae637efd5917ca33465 (diff) | |
download | openttd-3e49626aecbf8316fc48c326a17fd11c67c8cdc8.tar.xz |
(svn r2610) - Feature: set server map name to the loaded name of the game/scenario. Also truncate where neccessary
- Feature: truncate the path of the saveload window
Diffstat (limited to 'openttd.c')
-rw-r--r-- | openttd.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -907,12 +907,16 @@ void SwitchMode(int new_mode) case SM_NEWGAME: /* New Game --> 'Random game' */ #ifdef ENABLE_NETWORK if (_network_server) - snprintf(_network_game_info.map_name, 40, "Random"); + snprintf(_network_game_info.map_name, NETWORK_NAME_LENGTH, "Random Map"); #endif /* ENABLE_NETWORK */ MakeNewGame(); break; case SM_START_SCENARIO: /* New Game --> Choose one of the preset scenarios */ + #ifdef ENABLE_NETWORK + if (_network_server) + snprintf(_network_game_info.map_name, NETWORK_NAME_LENGTH, "%s (Loaded scenario)", _file_to_saveload.title); + #endif /* ENABLE_NETWORK */ StartScenario(); break; @@ -928,7 +932,7 @@ void SwitchMode(int new_mode) DoCommandP(0, 0, 0, NULL, CMD_PAUSE); // decrease pause counter (was increased from opening load dialog) #ifdef ENABLE_NETWORK if (_network_server) - snprintf(_network_game_info.map_name, 40, "Loaded game"); + snprintf(_network_game_info.map_name, NETWORK_NAME_LENGTH, "%s (Loaded game)", _file_to_saveload.title); #endif /* ENABLE_NETWORK */ } break; @@ -950,11 +954,6 @@ void SwitchMode(int new_mode) _generating_world = false; // delete all stations owned by a player DeleteAllPlayerStations(); - -#ifdef ENABLE_NETWORK - if (_network_server) - snprintf(_network_game_info.map_name, 40, "Loaded scenario"); -#endif /* ENABLE_NETWORK */ } else ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0); |