diff --git a/engine/client/ref_common.c b/engine/client/ref_common.c index 757573e6..815d7b78 100644 --- a/engine/client/ref_common.c +++ b/engine/client/ref_common.c @@ -231,7 +231,7 @@ static ref_api_t gEngfuncs = Cvar_VariableString, Cvar_SetValue, Cvar_Set, - (void*)Cvar_RegisterVariable, + Cvar_RegisterVariable, Cvar_FullSet, Cmd_AddRefCommand, diff --git a/engine/common/cvar.h b/engine/common/cvar.h index aea979d3..ff466b20 100644 --- a/engine/common/cvar.h +++ b/engine/common/cvar.h @@ -58,6 +58,7 @@ typedef struct convar_s #define CVAR_TO_BOOL( x ) ((x) && ((x)->value != 0.0f) ? true : false ) +#ifndef REF_DLL cvar_t *Cvar_GetList( void ); #define Cvar_FindVar( name ) Cvar_FindVarExt( name, 0 ) convar_t *Cvar_FindVarExt( const char *var_name, int ignore_group ); @@ -81,5 +82,6 @@ qboolean Cvar_CommandWithPrivilegeCheck( convar_t *v, qboolean isPrivileged ); void Cvar_Init( void ); void Cvar_PostFSInit( void ); void Cvar_Unlink( int group ); +#endif // REF_DLL #endif//CVAR_H diff --git a/engine/ref_api.h b/engine/ref_api.h index 18cea090..4c874bce 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -238,6 +238,7 @@ typedef struct remap_info_s model_t *model; // for catch model changes } remap_info_t; +typedef struct convar_s convar_t; struct con_nprint_s; struct engine_studio_api_s; struct r_studio_interface_s; @@ -270,7 +271,7 @@ typedef struct ref_api_s const char *(*pfnGetCvarString)( const char *szName ); void (*Cvar_SetValue)( const char *name, float value ); void (*Cvar_Set)( const char *name, const char *value ); - void (*Cvar_RegisterVariable)( cvar_t *var ); + void (*Cvar_RegisterVariable)( convar_t *var ); void (*Cvar_FullSet)( const char *var_name, const char *value, int flags ); // command handlers @@ -659,6 +660,7 @@ typedef int (*REFAPI)( int version, ref_interface_t *pFunctionTable, ref_api_t* ENGINE_SHARED_CVAR( f, r_sprite_lighting ) \ ENGINE_SHARED_CVAR( f, r_drawviewmodel ) \ ENGINE_SHARED_CVAR( f, r_glowshellfreq ) \ + ENGINE_SHARED_CVAR( f, r_lighting_modulate ) \ #define DECLARE_ENGINE_SHARED_CVAR_LIST() \ ENGINE_SHARED_CVAR_LIST( DECLARE_ENGINE_SHARED_CVAR )