Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
755 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "weapon_proficiency.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. static const char *g_ProficiencyNames[] =
  11. {
  12. "Poor",
  13. "Average",
  14. "Good",
  15. "Very Good",
  16. "Perfect"
  17. };
  18. const char *GetWeaponProficiencyName( WeaponProficiency_t proficiency )
  19. {
  20. COMPILE_TIME_ASSERT( ARRAYSIZE(g_ProficiencyNames) == WEAPON_PROFICIENCY_PERFECT + 1 ); // Hey, update that there table!
  21. if ( proficiency < 0 || proficiency > WEAPON_PROFICIENCY_PERFECT )
  22. return "<<Invalid>>";
  23. return g_ProficiencyNames[proficiency];
  24. }