summaryrefslogtreecommitdiff
path: root/game/shared/cstrike/cs_ammodef.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 /game/shared/cstrike/cs_ammodef.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/cstrike/cs_ammodef.h')
-rw-r--r--game/shared/cstrike/cs_ammodef.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/game/shared/cstrike/cs_ammodef.h b/game/shared/cstrike/cs_ammodef.h
new file mode 100644
index 0000000..0175bcd
--- /dev/null
+++ b/game/shared/cstrike/cs_ammodef.h
@@ -0,0 +1,55 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Holds defintion for game ammo types
+//
+// $Workfile: $
+// $Date: $
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef CS_AMMODEF_H
+#define CS_AMMODEF_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "ammodef.h"
+#include "cs_blackmarket.h"
+
+class ConVar;
+
+struct CSAmmoCost
+{
+ int buySize;
+ int cost;
+};
+
+//=============================================================================
+// >> CCSAmmoDef
+//=============================================================================
+class CCSAmmoDef : public CAmmoDef
+{
+
+public:
+
+ void AddAmmoCost( char const* name, int cost, int buySize );
+
+ CCSAmmoDef(void);
+ ~CCSAmmoDef( void );
+
+ int GetBuySize( int nAmmoIndex ) const;
+ int GetCost( int nAmmoIndex ) const;
+
+private:
+ CSAmmoCost m_csAmmo[MAX_AMMO_TYPES];
+};
+
+
+// Get the global ammodef object. This is usually implemented in each mod's game rules file somewhere,
+// so the mod can setup custom ammo types.
+CCSAmmoDef* GetCSAmmoDef();
+
+
+#endif // CS_AMMODEF_H
+ \ No newline at end of file