MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Cvar_SetValue2

Function Cvar_SetValue2

code/qcommon/cvar.cpp:724–733  ·  view source on GitHub ↗

============ Cvar_SetValue2 ============ */

Source from the content-addressed store, hash-verified

722============
723*/
724void Cvar_SetValue2( const char *var_name, float value, qboolean force )
725{
726 char val[32];
727
728 if( Q_isintegral( value ) )
729 Com_sprintf( val, sizeof(val), "%i", (int)value );
730 else
731 Com_sprintf( val, sizeof(val), "%f", value );
732 Cvar_Set2( var_name, val, force );
733}
734
735/*
736============

Callers 1

Cvar_CommandFunction · 0.85

Calls 3

Q_isintegralFunction · 0.85
Com_sprintfFunction · 0.70
Cvar_Set2Function · 0.70

Tested by

no test coverage detected