summaryrefslogtreecommitdiff
path: root/utils/tfstats/sharpshooteraward.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/tfstats/sharpshooteraward.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/tfstats/sharpshooteraward.h')
-rw-r--r--utils/tfstats/sharpshooteraward.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/utils/tfstats/sharpshooteraward.h b/utils/tfstats/sharpshooteraward.h
new file mode 100644
index 0000000..71fa873
--- /dev/null
+++ b/utils/tfstats/sharpshooteraward.h
@@ -0,0 +1,44 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Interface of CSharpshooterAward
+//
+// $Workfile: $
+// $Date: $
+//
+//------------------------------------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#ifndef SHARPSHOOTERAWARD_H
+#define SHARPSHOOTERAWARD_H
+#ifdef WIN32
+#pragma once
+#endif
+#include "Award.h"
+#include <map>
+
+
+using namespace std;
+//------------------------------------------------------------------------------------------------------
+// Purpose: CSharpshooterAward is the award for best sniper.
+// It is calculated by finding all of a sniper's kills with his rifle, then totaling them
+// up, with headshots being worth three regular shots.
+//------------------------------------------------------------------------------------------------------
+class CSharpshooterAward: public CAward
+{
+protected:
+ static double HS_VALUE;
+ static double SHOT_VALUE;
+
+
+ map<PID,int> numhs;
+ map<PID,int> numshots;
+ map<PID,int> sharpshooterscore;
+ void noWinner(CHTMLFile& html);
+ void extendedinfo(CHTMLFile& html);
+public:
+ explicit CSharpshooterAward():CAward("Sharpshooter"){}
+ void getWinner();
+};
+#endif // SHARPSHOOTERAWARD_H