Merge branch 'master' into crashlog_improvements

# Conflicts:
#	src/console_cmds.cpp
#	src/openttd.cpp
#	src/vehicle.cpp
This commit is contained in:
Jonathan G Rennison
2018-07-26 20:01:08 +01:00
315 changed files with 9395 additions and 2892 deletions

View File

@@ -1908,6 +1908,37 @@ static void IConsoleDebugLibRegister()
}
#endif
DEF_CONSOLE_CMD(ConFramerate)
{
extern void ConPrintFramerate(); // framerate_gui.cpp
if (argc == 0) {
IConsoleHelp("Show frame rate and game speed information");
return true;
}
ConPrintFramerate();
return true;
}
DEF_CONSOLE_CMD(ConFramerateWindow)
{
extern void ShowFramerateWindow();
if (argc == 0) {
IConsoleHelp("Open the frame rate window");
return true;
}
if (_network_dedicated) {
IConsoleError("Can not open frame rate window on a dedicated server");
return false;
}
ShowFramerateWindow();
return true;
}
/*******************************
* console command registration
*******************************/
@@ -2038,6 +2069,9 @@ void IConsoleStdLibRegister()
#ifdef _DEBUG
IConsoleDebugLibRegister();
#endif
IConsoleCmdRegister("fps", ConFramerate);
IConsoleCmdRegister("fps_wnd", ConFramerateWindow);
IConsoleCmdRegister("dump_command_log", ConDumpCommandLog, nullptr, true);
/* NewGRF development stuff */