mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
Revert "Merge commit 'refs/pull/122/head' of https://github.com/coelckers/gzdoom"
This reverts commit71b4f57058
, reversing changes made to449d4963ae
.
This commit is contained in:
parent
cc3ac9ea05
commit
383a59259a
7 changed files with 3 additions and 34 deletions
|
@ -52,10 +52,6 @@
|
|||
#include "v_video.h"
|
||||
#include "colormatcher.h"
|
||||
|
||||
// [SP] Lets the player (arbitrator) choose whether to override GetCVar checks.
|
||||
// Danger of desync? Can we just make it a client var? This probably *fixes* desyncs, actually...
|
||||
CVAR(Bool, sv_overridegetcvar, true, CVAR_SERVERINFO | CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
|
||||
|
||||
struct FLatchedValue
|
||||
{
|
||||
FBaseCVar *Variable;
|
||||
|
|
|
@ -63,7 +63,6 @@ enum
|
|||
CVAR_NOSAVE = 4096, // when used with CVAR_SERVERINFO, do not save var to savegame
|
||||
CVAR_MOD = 8192, // cvar was defined by a mod
|
||||
CVAR_IGNORE = 16384,// do not send cvar across the network/inaccesible from ACS (dummy mod cvar)
|
||||
CVAR_OVERRIDEGET = 32768,// this cvar disguises its return value for GetCVAR
|
||||
};
|
||||
|
||||
union UCVarValue
|
||||
|
|
|
@ -4549,8 +4549,6 @@ static void DoSetCVar(FBaseCVar *cvar, int value, bool is_string, bool force=fal
|
|||
}
|
||||
}
|
||||
|
||||
EXTERN_CVAR(Bool, sv_overridegetcvar)
|
||||
|
||||
// Converts floating- to fixed-point as required.
|
||||
static int DoGetCVar(FBaseCVar *cvar, bool is_string)
|
||||
{
|
||||
|
@ -4560,24 +4558,6 @@ static int DoGetCVar(FBaseCVar *cvar, bool is_string)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
else if (sv_overridegetcvar && (cvar->GetFlags() & CVAR_OVERRIDEGET))
|
||||
{
|
||||
if (is_string)
|
||||
{
|
||||
val = cvar->GetGenericRepDefault(CVAR_String);
|
||||
return GlobalACSStrings.AddString(val.String);
|
||||
}
|
||||
else if (cvar->GetRealType() == CVAR_Float)
|
||||
{
|
||||
val = cvar->GetGenericRepDefault(CVAR_Float);
|
||||
return DoubleToACS(val.Float);
|
||||
}
|
||||
else
|
||||
{
|
||||
val = cvar->GetGenericRepDefault(CVAR_Int);
|
||||
return val.Int;
|
||||
}
|
||||
}
|
||||
else if (is_string)
|
||||
{
|
||||
val = cvar->GetGenericRep(CVAR_String);
|
||||
|
|
|
@ -621,8 +621,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, GetCrouchFactor)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
EXTERN_CVAR(Bool, sv_overridegetcvar)
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, GetCVar)
|
||||
{
|
||||
if (numret > 0)
|
||||
|
@ -636,10 +634,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, GetCVar)
|
|||
{
|
||||
ret->SetFloat(0);
|
||||
}
|
||||
else if (sv_overridegetcvar && (cvar->GetFlags() & CVAR_OVERRIDEGET))
|
||||
{
|
||||
ret->SetFloat(cvar->GetGenericRepDefault(CVAR_Float).Float);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret->SetFloat(cvar->GetGenericRep(CVAR_Float).Float);
|
||||
|
|
|
@ -135,7 +135,7 @@ CUSTOM_CVAR(Bool, vid_autoswitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_
|
|||
|
||||
static int s_currentRenderer;
|
||||
|
||||
CUSTOM_CVAR(Int, vid_renderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL | CVAR_OVERRIDEGET)
|
||||
CUSTOM_CVAR(Int, vid_renderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
// 0: Software renderer
|
||||
// 1: OpenGL renderer
|
||||
|
|
|
@ -67,7 +67,7 @@ void I_RestartRenderer();
|
|||
int currentrenderer;
|
||||
|
||||
// [ZDoomGL]
|
||||
CUSTOM_CVAR (Int, vid_renderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL | CVAR_OVERRIDEGET)
|
||||
CUSTOM_CVAR (Int, vid_renderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
// 0: Software renderer
|
||||
// 1: OpenGL renderer
|
||||
|
|
|
@ -81,7 +81,7 @@ CUSTOM_CVAR(Bool, vid_used3d, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOIN
|
|||
}
|
||||
|
||||
// [ZDoomGL]
|
||||
CUSTOM_CVAR (Int, vid_renderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL | CVAR_OVERRIDEGET)
|
||||
CUSTOM_CVAR (Int, vid_renderer, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||
{
|
||||
// 0: Software renderer
|
||||
// 1: OpenGL renderer
|
||||
|
|
Loading…
Reference in a new issue