mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-10 06:31:48 +00:00
format float CVars without trailing zeroes
This commit is contained in:
parent
609e11f11d
commit
1dca257c9d
2 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@
|
|||
See the end of this file for known issues.
|
||||
|
||||
|
||||
29 Sep 23 - 1.53
|
||||
30 Oct 23 - 1.53
|
||||
|
||||
add: /registerdemos adds Windows file associations for demo files (.dm_68 .dm_67 .dm_66)
|
||||
/unregisterdemos removes Windows file associations for demo files
|
||||
|
|
|
@ -794,7 +794,7 @@ void Cvar_SetValue( const char *var_name, float value )
|
|||
if ( value == (int)value ) {
|
||||
Cvar_Set( var_name, va("%i", (int)value) );
|
||||
} else {
|
||||
Cvar_Set( var_name, va("%f", value) );
|
||||
Cvar_Set( var_name, va("%g", value) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ static void Cvar_ExecuteOp( qbool multiply )
|
|||
|
||||
const float fValU = multiply ? ( cvar->value * fTemp ) : ( cvar->value + fTemp );
|
||||
const float fValC = Com_Clamp( cvar->validator.f.min, cvar->validator.f.max, fValU );
|
||||
Cvar_Set( Cmd_Argv(1), va("%f", fValC) );
|
||||
Cvar_Set( Cmd_Argv(1), va("%g", fValC) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue