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

@ -5,6 +5,9 @@
#include <QDialog>
#ifdef USE_RETRO_ACHIEVEMENTS
class HardcoreWarningWidget;
#endif // USE_RETRO_ACHIEVEMENTS
class QDialogButtonBox;
class FreeLookWindow final : public QDialog
@ -13,8 +16,17 @@ class FreeLookWindow final : public QDialog
public:
explicit FreeLookWindow(QWidget* parent);
#ifdef USE_RETRO_ACHIEVEMENTS
signals:
void OpenAchievementSettings();
#endif // USE_RETRO_ACHIEVEMENTS
private:
void CreateMainLayout();
void ConnectWidgets();
#ifdef USE_RETRO_ACHIEVEMENTS
HardcoreWarningWidget* m_hc_warning;
#endif // USE_RETRO_ACHIEVEMENTS
QDialogButtonBox* m_button_box;
};