ref: move tracer color cvars to ref

This commit is contained in:
mittorn 2019-03-16 17:49:07 +07:00
parent 7382fc7c49
commit 9c6352ec57
3 changed files with 4 additions and 14 deletions

View File

@ -37,10 +37,6 @@ static color24 gTracerColors[] =
{ 255, 120, 70 }, // Darker red streaks (garg)
};
convar_t *tracerred;
convar_t *tracergreen;
convar_t *tracerblue;
convar_t *traceralpha;
convar_t *tracerspeed;
convar_t *tracerlength;
convar_t *traceroffset;
@ -128,10 +124,6 @@ void CL_InitParticles( void )
cl_avelocities[i][2] = COM_RandomFloat( 0.0f, 2.55f );
}
tracerred = Cvar_Get( "tracerred", "0.8", 0, "tracer red component weight ( 0 - 1.0 )" );
tracergreen = Cvar_Get( "tracergreen", "0.8", 0, "tracer green component weight ( 0 - 1.0 )" );
tracerblue = Cvar_Get( "tracerblue", "0.4", 0, "tracer blue component weight ( 0 - 1.0 )" );
traceralpha = Cvar_Get( "traceralpha", "0.5", 0, "tracer alpha amount ( 0 - 1.0 )" );
tracerspeed = Cvar_Get( "tracerspeed", "6000", 0, "tracer speed" );
tracerlength = Cvar_Get( "tracerlength", "0.8", 0, "tracer length factor" );
traceroffset = Cvar_Get( "traceroffset", "30", 0, "tracer starting offset" );

View File

@ -52,9 +52,7 @@ extern "C" {
#include "const.h"
#include "crtlib.h"
#ifndef REF_DLL
#define ASSERT( exp ) if(!( exp )) Sys_Error( "assert failed at %s:%i\n", __FILE__, __LINE__ )
#endif
/*
========================================================================

View File

@ -799,10 +799,10 @@ void GL_InitCommands( void )
vid_gamma = gEngfuncs.pfnGetCvarPointer( "gamma", 0 );
vid_brightness = gEngfuncs.pfnGetCvarPointer( "brightness", 0 );
tracerred = gEngfuncs.pfnGetCvarPointer( "tracerred", 0 );
tracergreen = gEngfuncs.pfnGetCvarPointer( "tracergreen", 0 );
tracerblue = gEngfuncs.pfnGetCvarPointer( "tracerblue", 0 );
traceralpha = gEngfuncs.pfnGetCvarPointer( "traceralpha", 0 );
tracerred = gEngfuncs.Cvar_Get( "tracerred", "0.8", 0, "tracer red component weight ( 0 - 1.0 )" );
tracergreen = gEngfuncs.Cvar_Get( "tracergreen", "0.8", 0, "tracer green component weight ( 0 - 1.0 )" );
tracerblue = gEngfuncs.Cvar_Get( "tracerblue", "0.4", 0, "tracer blue component weight ( 0 - 1.0 )" );
traceralpha = gEngfuncs.Cvar_Get( "traceralpha", "0.5", 0, "tracer alpha amount ( 0 - 1.0 )" );
cl_lightstyle_lerping = gEngfuncs.pfnGetCvarPointer( "cl_lightstyle_lerping", 0 );