2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-12 18:06:09 +00:00

Editor: Move cvars to CVarCommons

This commit is contained in:
2020-04-14 15:20:51 -04:00
parent 94be460a1b
commit 9cf95b5c10
6 changed files with 16 additions and 39 deletions

View File

@@ -74,7 +74,6 @@ namespace hecl {
extern CVar* com_enableCheats;
extern CVar* com_developer;
extern CVar* com_cubemaps;
extern CVar* com_variableDt;
}; // namespace hecl
namespace urde::MP1 {
@@ -706,6 +705,7 @@ void CMain::Init(const hecl::Runtime::FileStoreManager& storeMgr, hecl::CVarMana
InitializeDiscord();
m_mainWindow = window;
m_cvarMgr = cvarMgr;
m_cvarCommons = std::make_unique<hecl::CVarCommons>(*m_cvarMgr);
m_console = std::make_unique<hecl::Console>(m_cvarMgr);
m_console->init(window);
m_console->registerCommand(
@@ -839,7 +839,7 @@ bool CMain::Proc() {
}
float dt = 1 / 60.f;
if (hecl::com_variableDt->toBoolean()) {
if (m_cvarCommons->m_variableDt->toBoolean()) {
auto now = delta_clock::now();
if (m_firstFrame) {
m_firstFrame = false;