Add FBaseCVar::GetHumanString()

- For most cvars, this is equivalent to calling GetGenericRep() to get a
  string.
- For float cvars, it uses %g instead of %H, because %H is generally more
  information than is needed.
This commit is contained in:
Randy Heit 2016-04-23 22:30:08 -05:00
commit e96ed6bf8d
5 changed files with 24 additions and 9 deletions

View file

@ -993,8 +993,7 @@ CCMD (playerinfo)
if (pair->Key != NAME_Name && pair->Key != NAME_Team && pair->Key != NAME_Skin &&
pair->Key != NAME_Gender && pair->Key != NAME_PlayerClass)
{
UCVarValue val = pair->Value->GetGenericRep(CVAR_String);
Printf("%20s: %s\n", pair->Key.GetChars(), val.String);
Printf("%20s: %s\n", pair->Key.GetChars(), pair->Value->GetHumanString());
}
}
if (argv.argc() > 2)