File diff r26253:da15255c652b → r26254:4dd185cf8a2d
src/openttd.cpp
Show inline comments
 
@@ -201,6 +201,8 @@ static void ShowHelp()
 
		"  -x                  = Never save configuration changes to disk\n"
 
		"  -X                  = Don't use global folders to search for files\n"
 
		"  -q savegame         = Write some information about the savegame and exit\n"
 
		"  -Q                  = Don't scan for/load NewGRF files on startup\n"
 
		"  -QQ                 = Disable NewGRF scanning/loading entirely\n"
 
		"\n",
 
		lastof(buf)
 
	);
 
@@ -525,6 +527,7 @@ static const OptionData _options[] = {
 
	 GETOPT_SHORT_NOVAL('X'),
 
	 GETOPT_SHORT_VALUE('q'),
 
	 GETOPT_SHORT_NOVAL('h'),
 
	 GETOPT_SHORT_NOVAL('Q'),
 
	GETOPT_END()
 
};
 

	
 
@@ -653,6 +656,11 @@ int openttd_main(int argc, char *argv[])
 
			WriteSavegameInfo(title);
 
			return ret;
 
		}
 
		case 'Q': {
 
			extern int _skip_all_newgrf_scanning;
 
			_skip_all_newgrf_scanning += 1;
 
			break;
 
		}
 
		case 'G': scanner->generation_seed = strtoul(mgo.opt, nullptr, 10); break;
 
		case 'c': _config_file = mgo.opt; break;
 
		case 'x': scanner->save_config = false; break;
 
@@ -848,9 +856,9 @@ void HandleExitGameRequest()
 
 */
 
static void OnStartGame(bool dedicated_server)
 
{
 
	/* Update the local company for a loaded game. It is either always
 
	 * company #1 (eg 0) or in the case of a dedicated server a spectator */
 
	SetLocalCompany(dedicated_server ? COMPANY_SPECTATOR : COMPANY_FIRST);
 
	/* Update the local company for a loaded game. It is either the first available company
 
	 * or in the case of a dedicated server, a spectator */
 
	SetLocalCompany(dedicated_server ? COMPANY_SPECTATOR : GetFirstPlayableCompanyID());
 

	
 
	/* Update the static game info to set the values from the new game. */
 
	NetworkServerUpdateGameInfo();