Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/game/client/c_baseentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ void cc_cl_interp_all_changed( IConVar *pConVar, const char *pOldString, float f

static ConVar cl_extrapolate( "cl_extrapolate", "1", FCVAR_CHEAT, "Enable/disable extrapolation if interpolation history runs out." );
static ConVar cl_interp_npcs( "cl_interp_npcs", "0.0", FCVAR_USERINFO, "Interpolate NPC positions starting this many seconds in past (or cl_interp, if greater)" );
#ifdef NEO
static ConVar cl_interp_all( "cl_interp_all", "0", 0, "Disable interpolation list optimizations.", false, 0, false, 0, cc_cl_interp_all_changed );
#else
static ConVar cl_interp_all( "cl_interp_all", "0", 0, "Disable interpolation list optimizations.", 0, 0, 0, 0, cc_cl_interp_all_changed );
#endif
ConVar r_drawmodeldecals( "r_drawmodeldecals", "1", FCVAR_ALLOWED_IN_COMPETITIVE );
extern ConVar cl_showerror;
int C_BaseEntity::m_nPredictionRandomSeed = -1;
Expand Down
54 changes: 54 additions & 0 deletions src/public/tier1/convar.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@
#error "implement me"
#endif

#ifdef NEO
#include <concepts>
#include <type_traits>

template <typename T>
concept NotBoolean = !std::is_same_v<bool, T>;
#endif

//-----------------------------------------------------------------------------
// Forward declarations
Expand Down Expand Up @@ -339,7 +346,54 @@ friend class ConVarRef;
bool bCompMin, float fCompMin, bool bCompMax, float fCompMax,
FnChangeCallback_t callback );

#ifdef NEO
// You may have a typo in your constructor argument order if the compiler is
// attempting to invoke one or more of the deleted constructors below.
// If you really meant to evaluate bMin/bMax or bCompMin/bCompMax from a non-boolean type,
// please cast them to bool to silence the error.

template <NotBoolean T>
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, T bMin, float fMin, bool bMax, float fMax ) = delete;

template <NotBoolean T>
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, bool bMin, float fMin, T bMax, float fMax ) = delete;

template <NotBoolean T>
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, T bMin, float fMin, bool bMax, float fMax,
FnChangeCallback_t callback ) = delete;

template <NotBoolean T>
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, bool bMin, float fMin, T bMax, float fMax,
FnChangeCallback_t callback ) = delete;

template <NotBoolean T>
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, T bMin, float fMin, bool bMax, float fMax,
bool bCompMin, float fCompMin, bool bCompMax, float fCompMax,
FnChangeCallback_t callback ) = delete;

template <NotBoolean T>
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, bool bMin, float fMin, T bMax, float fMax,
bool bCompMin, float fCompMin, bool bCompMax, float fCompMax,
FnChangeCallback_t callback ) = delete;

template <NotBoolean T>
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, bool bMin, float fMin, bool bMax, float fMax,
T bCompMin, float fCompMin, bool bCompMax, float fCompMax,
FnChangeCallback_t callback ) = delete;

template <NotBoolean T>
ConVar( const char *pName, const char *pDefaultValue, int flags,
const char *pHelpString, bool bMin, float fMin, bool bMax, float fMax,
bool bCompMin, float fCompMin, T bCompMax, float fCompMax,
FnChangeCallback_t callback ) = delete;
#endif

virtual ~ConVar( void );

Expand Down