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.

154 lines
3.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CBASE_H
  8. #define CBASE_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #ifdef _WIN32
  13. // Silence certain warnings
  14. #pragma warning(disable : 4244) // int or float down-conversion
  15. #pragma warning(disable : 4305) // int or float data truncation
  16. #pragma warning(disable : 4201) // nameless struct/union
  17. #pragma warning(disable : 4511) // copy constructor could not be generated
  18. #pragma warning(disable : 4675) // resolved overload was found by argument dependent lookup
  19. #endif
  20. #ifdef _DEBUG
  21. #define DEBUG 1
  22. #endif
  23. // Misc C-runtime library headers
  24. #include <math.h>
  25. #include <stdio.h>
  26. // tier 0
  27. #include "tier0/dbg.h"
  28. #include "tier0/platform.h"
  29. #include "basetypes.h"
  30. // tier 1
  31. #include "tier1/strtools.h"
  32. #include "utlvector.h"
  33. #include "mathlib/vmatrix.h"
  34. // tier 2
  35. #include "string_t.h"
  36. // tier 3
  37. #include "vphysics_interface.h"
  38. // Shared engine/DLL constants
  39. #include "const.h"
  40. #include "edict.h"
  41. // Shared header describing protocol between engine and DLLs
  42. #include "eiface.h"
  43. #include "iserverentity.h"
  44. #include "dt_send.h"
  45. // Shared header between the client DLL and the game DLLs
  46. #include "shareddefs.h"
  47. #include "ehandle.h"
  48. // app
  49. #if defined(_X360)
  50. #define DISABLE_DEBUG_HISTORY 1
  51. #endif
  52. #include "datamap.h"
  53. #include "util.h"
  54. #include "predictable_entity.h"
  55. #include "predictableid.h"
  56. #include "variant_t.h"
  57. #include "takedamageinfo.h"
  58. #include "utllinkedlist.h"
  59. #include "touchlink.h"
  60. #include "groundlink.h"
  61. #include "base_transmit_proxy.h"
  62. #include "soundflags.h"
  63. #include "networkvar.h"
  64. #include "baseentity_shared.h"
  65. #include "basetoggle.h"
  66. #include "igameevents.h"
  67. // saverestore.h declarations
  68. class ISave;
  69. class IRestore;
  70. // maximum number of targets a single multi_manager entity may be assigned.
  71. #define MAX_MULTI_TARGETS 16
  72. // NPCEvent.h declarations
  73. struct animevent_t;
  74. struct studiohdr_t;
  75. class CStudioHdr;
  76. extern void FireTargets( const char *targetName, CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
  77. // people gib if their health is <= this at the time of death
  78. #define GIB_HEALTH_VALUE -30
  79. #define MAX_OLD_ENEMIES 4 // how many old enemies to remember
  80. // used by suit voice to indicate damage sustained and repaired type to player
  81. enum
  82. {
  83. itbd_Paralyze = 0,
  84. itbd_NerveGas,
  85. itbd_PoisonRecover,
  86. itbd_Radiation,
  87. itbd_DrownRecover,
  88. itbd_Acid,
  89. itbd_SlowBurn,
  90. itbd_SlowFreeze,
  91. // Must be last!
  92. CDMG_TIMEBASED
  93. };
  94. // when calling KILLED(), a value that governs gib behavior is expected to be
  95. // one of these three values
  96. #define GIB_NORMAL 0// gib if entity was overkilled
  97. #define GIB_NEVER 1// never gib, no matter how much death damage is done ( freezing, etc )
  98. #define GIB_ALWAYS 2// always gib
  99. class CAI_BaseNPC;
  100. class CAI_ScriptedSequence;
  101. class CSound;
  102. #ifdef _XBOX
  103. //#define FUNCTANK_AUTOUSE We haven't made the decision to use this yet (sjb)
  104. #else
  105. #undef FUNCTANK_AUTOUSE
  106. #endif//_XBOX
  107. // This is a precompiled header. Include a bunch of common stuff.
  108. // This is kind of ugly in that it adds a bunch of dependency where it isn't needed.
  109. // But on balance, the compile time is much lower (even incrementally) once the precompiled
  110. // headers contain these headers.
  111. #include "precache_register.h"
  112. #include "baseanimating.h"
  113. #include "basecombatweapon.h"
  114. #include "basecombatcharacter.h"
  115. #include "gamerules.h"
  116. #include "entitylist.h"
  117. #include "basetempentity.h"
  118. #include "player.h"
  119. #include "te.h"
  120. #include "physics.h"
  121. #include "ndebugoverlay.h"
  122. #include "recipientfilter.h"
  123. #endif // CBASE_H