Counter Strike : Global Offensive Source Code
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.

53 lines
1.1 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Holds defintion for game ammo types
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //=============================================================================//
  9. #ifndef CS_AMMODEF_H
  10. #define CS_AMMODEF_H
  11. #ifdef _WIN32
  12. #pragma once
  13. #endif
  14. #include "ammodef.h"
  15. class ConVar;
  16. struct CSAmmoCost
  17. {
  18. int buySize;
  19. int cost;
  20. };
  21. //=============================================================================
  22. // >> CCSAmmoDef
  23. //=============================================================================
  24. class CCSAmmoDef : public CAmmoDef
  25. {
  26. public:
  27. void AddAmmoCost( char const* name, int cost, int buySize );
  28. CCSAmmoDef(void);
  29. ~CCSAmmoDef( void );
  30. int GetBuySize( int nAmmoIndex ) const;
  31. int GetCost( int nAmmoIndex ) const;
  32. private:
  33. CSAmmoCost m_csAmmo[MAX_AMMO_TYPES];
  34. };
  35. // Get the global ammodef object. This is usually implemented in each mod's game rules file somewhere,
  36. // so the mod can setup custom ammo types.
  37. CCSAmmoDef* GetCSAmmoDef();
  38. #endif // CS_AMMODEF_H