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.

39 lines
1.2 KiB

  1. //========= Copyright (c) 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef C_WEAPON__STUBS_H
  8. #define C_WEAPON__STUBS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "client_class.h"
  13. // This is an ugly hack to link client classes to weapons for now
  14. // these will be removed once we predict all weapons, especially TF2 weapons
  15. #define STUB_WEAPON_CLASS_IMPLEMENT( entityName, className ) \
  16. BEGIN_PREDICTION_DATA( className ) \
  17. END_PREDICTION_DATA() \
  18. LINK_ENTITY_TO_CLASS( entityName, className );
  19. #define STUB_WEAPON_CLASS( entityName, className, baseClassName ) \
  20. class C_##className : public baseClassName \
  21. { \
  22. DECLARE_CLASS( C_##className, baseClassName ); \
  23. public: \
  24. DECLARE_PREDICTABLE(); \
  25. DECLARE_CLIENTCLASS(); \
  26. C_##className() {}; \
  27. private: \
  28. C_##className( const C_##className & ); \
  29. }; \
  30. IMPLEMENT_CLIENTCLASS_DT( C_##className, DT_##className, C##className ) \
  31. END_RECV_TABLE() \
  32. STUB_WEAPON_CLASS_IMPLEMENT( entityName, C_##className );
  33. #endif // C_WEAPON__STUBS_H