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.

45 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef NAILGUN_NAIL_H
  7. #define NAILGUN_NAIL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. class CTFNailgunNail : public CBaseAnimating
  12. {
  13. public:
  14. DECLARE_CLASS( CTFNailgunNail, CBaseAnimating );
  15. DECLARE_DATADESC();
  16. void Spawn();
  17. void Precache();
  18. // Functions to create all the various types of nails.
  19. static CTFNailgunNail *CreateNail( bool fSendClientNail, Vector vecOrigin, QAngle vecAngles, CBaseEntity *pOwner, CBaseEntity *pLauncher, bool fCreateClientNail );
  20. static CTFNailgunNail *CreateSuperNail( Vector vecOrigin, QAngle vecAngles, CBaseEntity *pOwner, CBaseEntity *pLauncher );
  21. static CTFNailgunNail *CreateTranqNail( Vector vecOrigin, QAngle vecAngles, CBaseEntity *pOwner, CBaseEntity *pLauncher );
  22. static CTFNailgunNail *CreateRailgunNail( Vector vecOrigin, QAngle vecAngles, CBaseEntity *pOwner, CBaseEntity *pLauncher );
  23. static CTFNailgunNail *CreateNailGrenNail( Vector vecOrigin, QAngle vecAngles, CBaseEntity *pOwner, CBaseEntity *pNailGren );
  24. private:
  25. void RailgunNail_Think();
  26. void NailTouch( CBaseEntity *pOther );
  27. void TranqTouch( CBaseEntity *pOther );
  28. void RailgunNailTouch( CBaseEntity *pOther );
  29. private:
  30. Vector m_vecPreviousVelocity;
  31. int m_iDamage; // How much damage this nail does when it hits an enemy.
  32. };
  33. #endif // NAILGUN_NAIL_H