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.

65 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: The HL2 Game rules object
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #ifndef HL1_GAMERULES_H
  14. #define HL1_GAMERULES_H
  15. #pragma once
  16. #include "gamerules.h"
  17. #include "singleplay_gamerules.h"
  18. #ifdef CLIENT_DLL
  19. #define CHalfLife1 C_HalfLife1
  20. #endif
  21. class CHalfLife1 : public CSingleplayRules
  22. {
  23. public:
  24. DECLARE_CLASS( CHalfLife1, CSingleplayRules );
  25. // Damage Queries.
  26. virtual int Damage_GetShowOnHud( void );
  27. // Client/server shared implementation.
  28. virtual bool ShouldCollide( int collisionGroup0, int collisionGroup1 );
  29. #ifndef CLIENT_DLL
  30. CHalfLife1();
  31. virtual ~CHalfLife1() {}
  32. virtual bool ClientCommand( CBaseEntity *pEdict, const CCommand &args );
  33. virtual void PlayerSpawn( CBasePlayer *pPlayer );
  34. virtual void InitDefaultAIRelationships( void );
  35. virtual const char * AIClassText(int classType);
  36. virtual const char * GetGameDescription( void );
  37. virtual float FlPlayerFallDamage( CBasePlayer *pPlayer );
  38. // Ammo
  39. virtual void PlayerThink( CBasePlayer *pPlayer );
  40. bool CanHavePlayerItem( CBasePlayer *pPlayer, CBaseCombatWeapon *pWeapon );
  41. void RadiusDamage( const CTakeDamageInfo &info, const Vector &vecSrc, float flRadius, int iClassIgnore );
  42. int DefaultFOV( void ) { return 90; }
  43. #endif
  44. };
  45. #endif // HL1_GAMERULES_H