Disable Freelook in hardcore mode

The player getting a better view of their surroundings than the game would normally allow could possibly give the player an advantage over the original hardware, so Freelook is disabled in hardcore mode. To do this, I disable the config flag for Freelook when it is accessed, to make sure that it is disabled whether it was enabled before or after hardcore mode was enabled.
This commit is contained in:
LillyJadeKatrin
2023-06-07 22:14:54 -04:00
parent 1a19a92943
commit 0abfa94bc8
6 changed files with 61 additions and 0 deletions

View File

@ -1244,6 +1244,11 @@ void MainWindow::ShowFreeLookWindow()
{
m_freelook_window = new FreeLookWindow(this);
InstallHotkeyFilter(m_freelook_window);
#ifdef USE_RETRO_ACHIEVEMENTS
connect(m_freelook_window, &FreeLookWindow::OpenAchievementSettings, this,
&MainWindow::ShowAchievementSettings);
#endif // USE_RETRO_ACHIEVEMENTS
}
SetQWidgetWindowDecorations(m_freelook_window);