mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Revert "- added a bit of hackery so that compatmode CVAR can be set up on startup"
This reverts commit c4408d8536
.
This does not work. It always overwrites the saved compatibility settings with the current compatmode.
This commit is contained in:
parent
517e803b3e
commit
3fb292ac71
3 changed files with 6 additions and 10 deletions
|
@ -55,6 +55,9 @@ struct FLatchedValue
|
||||||
|
|
||||||
static TArray<FLatchedValue> LatchedValues;
|
static TArray<FLatchedValue> LatchedValues;
|
||||||
|
|
||||||
|
bool FBaseCVar::m_DoNoSet = false;
|
||||||
|
bool FBaseCVar::m_UseCallback = false;
|
||||||
|
|
||||||
FBaseCVar *CVars = NULL;
|
FBaseCVar *CVars = NULL;
|
||||||
|
|
||||||
int cvar_defflags;
|
int cvar_defflags;
|
||||||
|
@ -520,7 +523,6 @@ void FBaseCVar::EnableNoSet ()
|
||||||
|
|
||||||
void FBaseCVar::EnableCallbacks ()
|
void FBaseCVar::EnableCallbacks ()
|
||||||
{
|
{
|
||||||
m_inEnable = true;
|
|
||||||
m_UseCallback = true;
|
m_UseCallback = true;
|
||||||
FBaseCVar *cvar = CVars;
|
FBaseCVar *cvar = CVars;
|
||||||
|
|
||||||
|
@ -532,7 +534,6 @@ void FBaseCVar::EnableCallbacks ()
|
||||||
}
|
}
|
||||||
cvar = cvar->m_Next;
|
cvar = cvar->m_Next;
|
||||||
}
|
}
|
||||||
m_inEnable = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FBaseCVar::DisableCallbacks ()
|
void FBaseCVar::DisableCallbacks ()
|
||||||
|
|
|
@ -210,17 +210,14 @@ protected:
|
||||||
uint32_t Flags;
|
uint32_t Flags;
|
||||||
bool inCallback = false;
|
bool inCallback = false;
|
||||||
|
|
||||||
public:
|
|
||||||
static inline bool m_inEnable = false;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FBaseCVar (const FBaseCVar &var) = delete;
|
FBaseCVar (const FBaseCVar &var) = delete;
|
||||||
FBaseCVar (const char *name, uint32_t flags);
|
FBaseCVar (const char *name, uint32_t flags);
|
||||||
void (*m_Callback)(FBaseCVar &);
|
void (*m_Callback)(FBaseCVar &);
|
||||||
FBaseCVar *m_Next;
|
FBaseCVar *m_Next;
|
||||||
|
|
||||||
static inline bool m_UseCallback = false;
|
static bool m_UseCallback;
|
||||||
static inline bool m_DoNoSet = false;
|
static bool m_DoNoSet;
|
||||||
|
|
||||||
void *m_ExtraDataPointer;
|
void *m_ExtraDataPointer;
|
||||||
|
|
||||||
|
|
|
@ -569,7 +569,6 @@ EXTERN_CVAR(Int, compatmode)
|
||||||
|
|
||||||
CUSTOM_CVAR (Int, compatflags, 0, CVAR_ARCHIVE|CVAR_SERVERINFO | CVAR_NOINITCALL)
|
CUSTOM_CVAR (Int, compatflags, 0, CVAR_ARCHIVE|CVAR_SERVERINFO | CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
if (FBaseCVar::m_inEnable) return;
|
|
||||||
for (auto Level : AllLevels())
|
for (auto Level : AllLevels())
|
||||||
{
|
{
|
||||||
Level->ApplyCompatibility();
|
Level->ApplyCompatibility();
|
||||||
|
@ -578,7 +577,6 @@ CUSTOM_CVAR (Int, compatflags, 0, CVAR_ARCHIVE|CVAR_SERVERINFO | CVAR_NOINITCALL
|
||||||
|
|
||||||
CUSTOM_CVAR (Int, compatflags2, 0, CVAR_ARCHIVE|CVAR_SERVERINFO | CVAR_NOINITCALL)
|
CUSTOM_CVAR (Int, compatflags2, 0, CVAR_ARCHIVE|CVAR_SERVERINFO | CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
if (FBaseCVar::m_inEnable) return;
|
|
||||||
for (auto Level : AllLevels())
|
for (auto Level : AllLevels())
|
||||||
{
|
{
|
||||||
Level->ApplyCompatibility2();
|
Level->ApplyCompatibility2();
|
||||||
|
@ -586,7 +584,7 @@ CUSTOM_CVAR (Int, compatflags2, 0, CVAR_ARCHIVE|CVAR_SERVERINFO | CVAR_NOINITCAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE)
|
CUSTOM_CVAR(Int, compatmode, 0, CVAR_ARCHIVE|CVAR_NOINITCALL)
|
||||||
{
|
{
|
||||||
int v, w = 0;
|
int v, w = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue