Import and rebase Max NewGRFs patch

Fix trailing whitespace, clean up code a bit

http://www.tt-forums.net/viewtopic.php?p=894743#p894743
This commit is contained in:
patch-import
2015-08-02 22:16:49 +01:00
committed by Jonathan G Rennison
parent 67366cf03d
commit 8f5ef2ae01
5 changed files with 32 additions and 2 deletions

View File

@@ -31,6 +31,8 @@
#include "../core/geometry_func.hpp"
#include "../genworld.h"
#include "../map_type.h"
#include "../newgrf.h"
#include "../error.h"
#include "../widgets/network_widget.h"
@@ -1177,6 +1179,10 @@ struct NetworkStartServerWindow : public Window {
}
case WID_NSS_GENERATE_GAME: // Start game
if (CountSelectedGRFs (_grfconfig_newgame) >= MAX_FILE_SLOTS_IN_NETWORK) {
ShowErrorMessage(STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED, INVALID_STRING_ID, WL_ERROR);
break;
}
_is_network_server = true;
if (_ctrl_pressed) {
StartNewGameWithoutGUI(GENERATE_NEW_SEED);