Merge branch 'max_grfs' into jgrpp
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#include "core/backup_type.hpp"
|
||||
#include "hotkeys.h"
|
||||
#include "newgrf.h"
|
||||
#include "newgrf_commons.h"
|
||||
#include "misc/getoptdata.h"
|
||||
#include "game/game.hpp"
|
||||
#include "game/game_config.hpp"
|
||||
@@ -851,6 +852,13 @@ int openttd_main(int argc, char *argv[])
|
||||
DriverFactoryBase::SelectDriver(musicdriver, Driver::DT_MUSIC);
|
||||
free(musicdriver);
|
||||
|
||||
// Check if not too much GRFs are loaded for network game
|
||||
if (dedicated && CountSelectedGRFs( _grfconfig ) >= MAX_FILE_SLOTS_IN_NETWORK) {
|
||||
DEBUG(net, 0, "Too many GRF loaded. Max %d are allowed.\nExiting ...", MAX_FILE_SLOTS_IN_NETWORK);
|
||||
ShutdownGame();
|
||||
goto exit_normal;
|
||||
}
|
||||
|
||||
/* Take our initial lock on whatever we might want to do! */
|
||||
_modal_progress_paint_mutex->BeginCritical();
|
||||
_modal_progress_work_mutex->BeginCritical();
|
||||
|
Reference in New Issue
Block a user