Merge branch 'master' into jgrpp

# Conflicts:
#	src/ground_vehicle.cpp
#	src/viewport.cpp
This commit is contained in:
Jonathan G Rennison
2018-10-29 18:33:15 +00:00
20 changed files with 243 additions and 45 deletions

View File

@@ -447,7 +447,7 @@ void OpenBrowser(const char *url)
/** Callback structure of statements to be executed after the NewGRF scan. */
struct AfterNewGRFScan : NewGRFScanCallback {
Year startyear; ///< The start year.
uint generation_seed; ///< Seed for the new game.
uint32 generation_seed; ///< Seed for the new game.
char *dedicated_host; ///< Hostname for the dedicated server.
uint16 dedicated_port; ///< Port for the dedicated server.
char *network_conn; ///< Information about the server to connect to, or NULL.
@@ -467,6 +467,9 @@ struct AfterNewGRFScan : NewGRFScanCallback {
join_server_password(NULL), join_company_password(NULL),
save_config_ptr(save_config_ptr), save_config(true)
{
/* Visual C++ 2015 fails compiling this line (AfterNewGRFScan::generation_seed undefined symbol)
* if it's placed outside a member function, directly in the struct body. */
assert_compile(sizeof(generation_seed) == sizeof(_settings_game.game_creation.generation_seed));
}
virtual void OnNewGRFsScanned()
@@ -730,7 +733,7 @@ int openttd_main(int argc, char *argv[])
goto exit_noshutdown;
}
case 'G': scanner->generation_seed = atoi(mgo.opt); break;
case 'G': scanner->generation_seed = strtoul(mgo.opt, NULL, 10); break;
case 'c': free(_config_file); _config_file = stredup(mgo.opt); break;
case 'x': scanner->save_config = false; break;
case 'J': _quit_after_days = Clamp(atoi(mgo.opt), 0, INT_MAX); break;