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.

44 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Interface of CSharpshooterAward
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //------------------------------------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef SHARPSHOOTERAWARD_H
  14. #define SHARPSHOOTERAWARD_H
  15. #ifdef WIN32
  16. #pragma once
  17. #endif
  18. #include "Award.h"
  19. #include <map>
  20. using namespace std;
  21. //------------------------------------------------------------------------------------------------------
  22. // Purpose: CSharpshooterAward is the award for best sniper.
  23. // It is calculated by finding all of a sniper's kills with his rifle, then totaling them
  24. // up, with headshots being worth three regular shots.
  25. //------------------------------------------------------------------------------------------------------
  26. class CSharpshooterAward: public CAward
  27. {
  28. protected:
  29. static double HS_VALUE;
  30. static double SHOT_VALUE;
  31. map<PID,int> numhs;
  32. map<PID,int> numshots;
  33. map<PID,int> sharpshooterscore;
  34. void noWinner(CHTMLFile& html);
  35. void extendedinfo(CHTMLFile& html);
  36. public:
  37. explicit CSharpshooterAward():CAward("Sharpshooter"){}
  38. void getWinner();
  39. };
  40. #endif // SHARPSHOOTERAWARD_H