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.

447 lines
20 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef CONST_H
  9. #define CONST_H
  10. #ifdef _WIN32
  11. #pragma once
  12. #endif
  13. // the command line param that tells the engine to use steam
  14. #define STEAM_PARM "-steam"
  15. // the command line param to tell dedicated server to restart
  16. // if they are out of date
  17. #define AUTO_RESTART "-autoupdate"
  18. // the message a server sends when a clients steam login is expired
  19. #define INVALID_STEAM_TICKET "Invalid STEAM UserID Ticket\n"
  20. #define INVALID_STEAM_VACBANSTATE "VAC banned from secure server\n"
  21. #define INVALID_STEAM_LOGGED_IN_ELSEWHERE "This Steam account is being used in another location\n"
  22. #define INVALID_STEAM_LOGON_NOT_CONNECTED "Client not connected to Steam\n"
  23. #define INVALID_STEAM_LOGON_TICKET_CANCELED "Client left game (Steam auth ticket has been canceled)\n"
  24. #define CLIENTNAME_TIMED_OUT "%s timed out"
  25. // This is the default, see shareddefs.h for mod-specific value, which can override this
  26. #define DEFAULT_TICK_INTERVAL (0.015) // 15 msec is the default
  27. #define MINIMUM_TICK_INTERVAL (0.001)
  28. #define MAXIMUM_TICK_INTERVAL (0.1)
  29. // This is the max # of players the engine can handle
  30. #define ABSOLUTE_PLAYER_LIMIT 255 // not 256, so we can send the limit as a byte
  31. #define ABSOLUTE_PLAYER_LIMIT_DW ( (ABSOLUTE_PLAYER_LIMIT/32) + 1 )
  32. // a player name may have 31 chars + 0 on the PC.
  33. // the 360 only allows 15 char + 0, but stick with the larger PC size for cross-platform communication
  34. #define MAX_PLAYER_NAME_LENGTH 32
  35. #ifdef _X360
  36. #define MAX_PLAYERS_PER_CLIENT XUSER_MAX_COUNT // Xbox 360 supports 4 players per console
  37. #else
  38. #define MAX_PLAYERS_PER_CLIENT 1 // One player per PC
  39. #endif
  40. // Max decorated map name, with things like workshop/cp_foo.ugc123456
  41. #define MAX_MAP_NAME 96
  42. // Max name used in save files. Needs to be left at 32 for SourceSDK compatibility.
  43. #define MAX_MAP_NAME_SAVE 32
  44. // Max non-decorated map name for e.g. server browser (just cp_foo)
  45. #define MAX_DISPLAY_MAP_NAME 32
  46. #define MAX_NETWORKID_LENGTH 64 // num chars for a network (i.e steam) ID
  47. // BUGBUG: Reconcile with or derive this from the engine's internal definition!
  48. // FIXME: I added an extra bit because I needed to make it signed
  49. #define SP_MODEL_INDEX_BITS 13
  50. // How many bits to use to encode an edict.
  51. #define MAX_EDICT_BITS 11 // # of bits needed to represent max edicts
  52. // Max # of edicts in a level
  53. #define MAX_EDICTS (1<<MAX_EDICT_BITS)
  54. // How many bits to use to encode an server class index
  55. #define MAX_SERVER_CLASS_BITS 9
  56. // Max # of networkable server classes
  57. #define MAX_SERVER_CLASSES (1<<MAX_SERVER_CLASS_BITS)
  58. #define SIGNED_GUID_LEN 32 // Hashed CD Key (32 hex alphabetic chars + 0 terminator )
  59. // Used for networking ehandles.
  60. #define NUM_ENT_ENTRY_BITS (MAX_EDICT_BITS + 1)
  61. #define NUM_ENT_ENTRIES (1 << NUM_ENT_ENTRY_BITS)
  62. #define ENT_ENTRY_MASK (NUM_ENT_ENTRIES - 1)
  63. #define INVALID_EHANDLE_INDEX 0xFFFFFFFF
  64. #define NUM_SERIAL_NUM_BITS (32 - NUM_ENT_ENTRY_BITS)
  65. // Networked ehandles use less bits to encode the serial number.
  66. #define NUM_NETWORKED_EHANDLE_SERIAL_NUMBER_BITS 10
  67. #define NUM_NETWORKED_EHANDLE_BITS (MAX_EDICT_BITS + NUM_NETWORKED_EHANDLE_SERIAL_NUMBER_BITS)
  68. #define INVALID_NETWORKED_EHANDLE_VALUE ((1 << NUM_NETWORKED_EHANDLE_BITS) - 1)
  69. // This is the maximum amount of data a PackedEntity can have. Having a limit allows us
  70. // to use static arrays sometimes instead of allocating memory all over the place.
  71. #define MAX_PACKEDENTITY_DATA (16384)
  72. // This is the maximum number of properties that can be delta'd. Must be evenly divisible by 8.
  73. #define MAX_PACKEDENTITY_PROPS (4096)
  74. // a client can have up to 4 customization files (logo, sounds, models, txt).
  75. #define MAX_CUSTOM_FILES 4 // max 4 files
  76. #define MAX_CUSTOM_FILE_SIZE 524288 // Half a megabyte
  77. //
  78. // Constants shared by the engine and dlls
  79. // This header file included by engine files and DLL files.
  80. // Most came from server.h
  81. // CBaseEntity::m_fFlags
  82. // PLAYER SPECIFIC FLAGS FIRST BECAUSE WE USE ONLY A FEW BITS OF NETWORK PRECISION
  83. // This top block is for singleplayer games only....no HL2:DM (which defines HL2_DLL)
  84. #if !defined( HL2MP ) && ( defined( PORTAL ) || defined( HL2_EPISODIC ) || defined ( HL2_DLL ) || defined( HL2_LOSTCOAST ) )
  85. #define FL_ONGROUND (1<<0) // At rest / on the ground
  86. #define FL_DUCKING (1<<1) // Player flag -- Player is fully crouched
  87. #define FL_WATERJUMP (1<<2) // player jumping out of water
  88. #define FL_ONTRAIN (1<<3) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
  89. #define FL_INRAIN (1<<4) // Indicates the entity is standing in rain
  90. #define FL_FROZEN (1<<5) // Player is frozen for 3rd person camera
  91. #define FL_ATCONTROLS (1<<6) // Player can't move, but keeps key inputs for controlling another entity
  92. #define FL_CLIENT (1<<7) // Is a player
  93. #define FL_FAKECLIENT (1<<8) // Fake client, simulated server side; don't send network messages to them
  94. // NON-PLAYER SPECIFIC (i.e., not used by GameMovement or the client .dll ) -- Can still be applied to players, though
  95. #define FL_INWATER (1<<9) // In water
  96. // NOTE if you move things up, make sure to change this value
  97. #define PLAYER_FLAG_BITS 10
  98. #define FL_FLY (1<<10) // Changes the SV_Movestep() behavior to not need to be on ground
  99. #define FL_SWIM (1<<11) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
  100. #define FL_CONVEYOR (1<<12)
  101. #define FL_NPC (1<<13)
  102. #define FL_GODMODE (1<<14)
  103. #define FL_NOTARGET (1<<15)
  104. #define FL_AIMTARGET (1<<16) // set if the crosshair needs to aim onto the entity
  105. #define FL_PARTIALGROUND (1<<17) // not all corners are valid
  106. #define FL_STATICPROP (1<<18) // Eetsa static prop!
  107. #define FL_GRAPHED (1<<19) // worldgraph has this ent listed as something that blocks a connection
  108. #define FL_GRENADE (1<<20)
  109. #define FL_STEPMOVEMENT (1<<21) // Changes the SV_Movestep() behavior to not do any processing
  110. #define FL_DONTTOUCH (1<<22) // Doesn't generate touch functions, generates Untouch() for anything it was touching when this flag was set
  111. #define FL_BASEVELOCITY (1<<23) // Base velocity has been applied this frame (used to convert base velocity into momentum)
  112. #define FL_WORLDBRUSH (1<<24) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
  113. #define FL_OBJECT (1<<25) // Terrible name. This is an object that NPCs should see. Missiles, for example.
  114. #define FL_KILLME (1<<26) // This entity is marked for death -- will be freed by game DLL
  115. #define FL_ONFIRE (1<<27) // You know...
  116. #define FL_DISSOLVING (1<<28) // We're dissolving!
  117. #define FL_TRANSRAGDOLL (1<<29) // In the process of turning into a client side ragdoll.
  118. #define FL_UNBLOCKABLE_BY_PLAYER (1<<30) // pusher that can't be blocked by the player
  119. #else
  120. #define FL_ONGROUND (1<<0) // At rest / on the ground
  121. #define FL_DUCKING (1<<1) // Player flag -- Player is fully crouched
  122. #define FL_ANIMDUCKING (1<<2) // Player flag -- Player is in the process of crouching or uncrouching but could be in transition
  123. // examples: Fully ducked: FL_DUCKING & FL_ANIMDUCKING
  124. // Previously fully ducked, unducking in progress: FL_DUCKING & !FL_ANIMDUCKING
  125. // Fully unducked: !FL_DUCKING & !FL_ANIMDUCKING
  126. // Previously fully unducked, ducking in progress: !FL_DUCKING & FL_ANIMDUCKING
  127. #define FL_WATERJUMP (1<<3) // player jumping out of water
  128. #define FL_ONTRAIN (1<<4) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
  129. #define FL_INRAIN (1<<5) // Indicates the entity is standing in rain
  130. #define FL_FROZEN (1<<6) // Player is frozen for 3rd person camera
  131. #define FL_ATCONTROLS (1<<7) // Player can't move, but keeps key inputs for controlling another entity
  132. #define FL_CLIENT (1<<8) // Is a player
  133. #define FL_FAKECLIENT (1<<9) // Fake client, simulated server side; don't send network messages to them
  134. // NON-PLAYER SPECIFIC (i.e., not used by GameMovement or the client .dll ) -- Can still be applied to players, though
  135. #define FL_INWATER (1<<10) // In water
  136. // NOTE if you move things up, make sure to change this value
  137. #define PLAYER_FLAG_BITS 11
  138. #define FL_FLY (1<<11) // Changes the SV_Movestep() behavior to not need to be on ground
  139. #define FL_SWIM (1<<12) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water)
  140. #define FL_CONVEYOR (1<<13)
  141. #define FL_NPC (1<<14)
  142. #define FL_GODMODE (1<<15)
  143. #define FL_NOTARGET (1<<16)
  144. #define FL_AIMTARGET (1<<17) // set if the crosshair needs to aim onto the entity
  145. #define FL_PARTIALGROUND (1<<18) // not all corners are valid
  146. #define FL_STATICPROP (1<<19) // Eetsa static prop!
  147. #define FL_GRAPHED (1<<20) // worldgraph has this ent listed as something that blocks a connection
  148. #define FL_GRENADE (1<<21)
  149. #define FL_STEPMOVEMENT (1<<22) // Changes the SV_Movestep() behavior to not do any processing
  150. #define FL_DONTTOUCH (1<<23) // Doesn't generate touch functions, generates Untouch() for anything it was touching when this flag was set
  151. #define FL_BASEVELOCITY (1<<24) // Base velocity has been applied this frame (used to convert base velocity into momentum)
  152. #define FL_WORLDBRUSH (1<<25) // Not moveable/removeable brush entity (really part of the world, but represented as an entity for transparency or something)
  153. #define FL_OBJECT (1<<26) // Terrible name. This is an object that NPCs should see. Missiles, for example.
  154. #define FL_KILLME (1<<27) // This entity is marked for death -- will be freed by game DLL
  155. #define FL_ONFIRE (1<<28) // You know...
  156. #define FL_DISSOLVING (1<<29) // We're dissolving!
  157. #define FL_TRANSRAGDOLL (1<<30) // In the process of turning into a client side ragdoll.
  158. #define FL_UNBLOCKABLE_BY_PLAYER (1<<31) // pusher that can't be blocked by the player
  159. #endif
  160. // edict->movetype values
  161. enum MoveType_t
  162. {
  163. MOVETYPE_NONE = 0, // never moves
  164. MOVETYPE_ISOMETRIC, // For players -- in TF2 commander view, etc.
  165. MOVETYPE_WALK, // Player only - moving on the ground
  166. MOVETYPE_STEP, // gravity, special edge handling -- monsters use this
  167. MOVETYPE_FLY, // No gravity, but still collides with stuff
  168. MOVETYPE_FLYGRAVITY, // flies through the air + is affected by gravity
  169. MOVETYPE_VPHYSICS, // uses VPHYSICS for simulation
  170. MOVETYPE_PUSH, // no clip to world, push and crush
  171. MOVETYPE_NOCLIP, // No gravity, no collisions, still do velocity/avelocity
  172. MOVETYPE_LADDER, // Used by players only when going onto a ladder
  173. MOVETYPE_OBSERVER, // Observer movement, depends on player's observer mode
  174. MOVETYPE_CUSTOM, // Allows the entity to describe its own physics
  175. // should always be defined as the last item in the list
  176. MOVETYPE_LAST = MOVETYPE_CUSTOM,
  177. MOVETYPE_MAX_BITS = 4
  178. };
  179. // edict->movecollide values
  180. enum MoveCollide_t
  181. {
  182. MOVECOLLIDE_DEFAULT = 0,
  183. // These ones only work for MOVETYPE_FLY + MOVETYPE_FLYGRAVITY
  184. MOVECOLLIDE_FLY_BOUNCE, // bounces, reflects, based on elasticity of surface and object - applies friction (adjust velocity)
  185. MOVECOLLIDE_FLY_CUSTOM, // Touch() will modify the velocity however it likes
  186. MOVECOLLIDE_FLY_SLIDE, // slides along surfaces (no bounce) - applies friciton (adjusts velocity)
  187. MOVECOLLIDE_COUNT, // Number of different movecollides
  188. // When adding new movecollide types, make sure this is correct
  189. MOVECOLLIDE_MAX_BITS = 3
  190. };
  191. // edict->solid values
  192. // NOTE: Some movetypes will cause collisions independent of SOLID_NOT/SOLID_TRIGGER when the entity moves
  193. // SOLID only effects OTHER entities colliding with this one when they move - UGH!
  194. // Solid type basically describes how the bounding volume of the object is represented
  195. // NOTE: SOLID_BBOX MUST BE 2, and SOLID_VPHYSICS MUST BE 6
  196. // NOTE: These numerical values are used in the FGD by the prop code (see prop_dynamic)
  197. enum SolidType_t
  198. {
  199. SOLID_NONE = 0, // no solid model
  200. SOLID_BSP = 1, // a BSP tree
  201. SOLID_BBOX = 2, // an AABB
  202. SOLID_OBB = 3, // an OBB (not implemented yet)
  203. SOLID_OBB_YAW = 4, // an OBB, constrained so that it can only yaw
  204. SOLID_CUSTOM = 5, // Always call into the entity for tests
  205. SOLID_VPHYSICS = 6, // solid vphysics object, get vcollide from the model and collide with that
  206. SOLID_LAST,
  207. };
  208. enum SolidFlags_t
  209. {
  210. FSOLID_CUSTOMRAYTEST = 0x0001, // Ignore solid type + always call into the entity for ray tests
  211. FSOLID_CUSTOMBOXTEST = 0x0002, // Ignore solid type + always call into the entity for swept box tests
  212. FSOLID_NOT_SOLID = 0x0004, // Are we currently not solid?
  213. FSOLID_TRIGGER = 0x0008, // This is something may be collideable but fires touch functions
  214. // even when it's not collideable (when the FSOLID_NOT_SOLID flag is set)
  215. FSOLID_NOT_STANDABLE = 0x0010, // You can't stand on this
  216. FSOLID_VOLUME_CONTENTS = 0x0020, // Contains volumetric contents (like water)
  217. FSOLID_FORCE_WORLD_ALIGNED = 0x0040, // Forces the collision rep to be world-aligned even if it's SOLID_BSP or SOLID_VPHYSICS
  218. FSOLID_USE_TRIGGER_BOUNDS = 0x0080, // Uses a special trigger bounds separate from the normal OBB
  219. FSOLID_ROOT_PARENT_ALIGNED = 0x0100, // Collisions are defined in root parent's local coordinate space
  220. FSOLID_TRIGGER_TOUCH_DEBRIS = 0x0200, // This trigger will touch debris objects
  221. FSOLID_MAX_BITS = 10
  222. };
  223. //-----------------------------------------------------------------------------
  224. // A couple of inline helper methods
  225. //-----------------------------------------------------------------------------
  226. inline bool IsSolid( SolidType_t solidType, int nSolidFlags )
  227. {
  228. return (solidType != SOLID_NONE) && ((nSolidFlags & FSOLID_NOT_SOLID) == 0);
  229. }
  230. // m_lifeState values
  231. #define LIFE_ALIVE 0 // alive
  232. #define LIFE_DYING 1 // playing death animation or still falling off of a ledge waiting to hit ground
  233. #define LIFE_DEAD 2 // dead. lying still.
  234. #define LIFE_RESPAWNABLE 3
  235. #define LIFE_DISCARDBODY 4
  236. // entity effects
  237. enum
  238. {
  239. EF_BONEMERGE = 0x001, // Performs bone merge on client side
  240. EF_BRIGHTLIGHT = 0x002, // DLIGHT centered at entity origin
  241. EF_DIMLIGHT = 0x004, // player flashlight
  242. EF_NOINTERP = 0x008, // don't interpolate the next frame
  243. EF_NOSHADOW = 0x010, // Don't cast no shadow
  244. EF_NODRAW = 0x020, // don't draw entity
  245. EF_NORECEIVESHADOW = 0x040, // Don't receive no shadow
  246. EF_BONEMERGE_FASTCULL = 0x080, // For use with EF_BONEMERGE. If this is set, then it places this ent's origin at its
  247. // parent and uses the parent's bbox + the max extents of the aiment.
  248. // Otherwise, it sets up the parent's bones every frame to figure out where to place
  249. // the aiment, which is inefficient because it'll setup the parent's bones even if
  250. // the parent is not in the PVS.
  251. EF_ITEM_BLINK = 0x100, // blink an item so that the user notices it.
  252. EF_PARENT_ANIMATES = 0x200, // always assume that the parent entity is animating
  253. EF_MAX_BITS = 10
  254. };
  255. #define EF_PARITY_BITS 3
  256. #define EF_PARITY_MASK ((1<<EF_PARITY_BITS)-1)
  257. // How many bits does the muzzle flash parity thing get?
  258. #define EF_MUZZLEFLASH_BITS 2
  259. // plats
  260. #define PLAT_LOW_TRIGGER 1
  261. // Trains
  262. #define SF_TRAIN_WAIT_RETRIGGER 1
  263. #define SF_TRAIN_PASSABLE 8 // Train is not solid -- used to make water trains
  264. // view angle update types for CPlayerState::fixangle
  265. #define FIXANGLE_NONE 0
  266. #define FIXANGLE_ABSOLUTE 1
  267. #define FIXANGLE_RELATIVE 2
  268. // Break Model Defines
  269. #define BREAK_GLASS 0x01
  270. #define BREAK_METAL 0x02
  271. #define BREAK_FLESH 0x04
  272. #define BREAK_WOOD 0x08
  273. #define BREAK_SMOKE 0x10
  274. #define BREAK_TRANS 0x20
  275. #define BREAK_CONCRETE 0x40
  276. // If this is set, then we share a lighting origin with the last non-slave breakable sent down to the client
  277. #define BREAK_SLAVE 0x80
  278. // Colliding temp entity sounds
  279. #define BOUNCE_GLASS BREAK_GLASS
  280. #define BOUNCE_METAL BREAK_METAL
  281. #define BOUNCE_FLESH BREAK_FLESH
  282. #define BOUNCE_WOOD BREAK_WOOD
  283. #define BOUNCE_SHRAP 0x10
  284. #define BOUNCE_SHELL 0x20
  285. #define BOUNCE_CONCRETE BREAK_CONCRETE
  286. #define BOUNCE_SHOTSHELL 0x80
  287. // Temp entity bounce sound types
  288. #define TE_BOUNCE_NULL 0
  289. #define TE_BOUNCE_SHELL 1
  290. #define TE_BOUNCE_SHOTSHELL 2
  291. // Rendering constants
  292. // if this is changed, update common/MaterialSystem/Sprite.cpp
  293. enum RenderMode_t
  294. {
  295. kRenderNormal = 0, // src
  296. kRenderTransColor, // c*a+dest*(1-a)
  297. kRenderTransTexture, // src*a+dest*(1-a)
  298. kRenderGlow, // src*a+dest -- No Z buffer checks -- Fixed size in screen space
  299. kRenderTransAlpha, // src*srca+dest*(1-srca)
  300. kRenderTransAdd, // src*a+dest
  301. kRenderEnvironmental, // not drawn, used for environmental effects
  302. kRenderTransAddFrameBlend, // use a fractional frame value to blend between animation frames
  303. kRenderTransAlphaAdd, // src + dest*(1-a)
  304. kRenderWorldGlow, // Same as kRenderGlow but not fixed size in screen space
  305. kRenderNone, // Don't render.
  306. kRenderModeCount, // must be last
  307. };
  308. enum RenderFx_t
  309. {
  310. kRenderFxNone = 0,
  311. kRenderFxPulseSlow,
  312. kRenderFxPulseFast,
  313. kRenderFxPulseSlowWide,
  314. kRenderFxPulseFastWide,
  315. kRenderFxFadeSlow,
  316. kRenderFxFadeFast,
  317. kRenderFxSolidSlow,
  318. kRenderFxSolidFast,
  319. kRenderFxStrobeSlow,
  320. kRenderFxStrobeFast,
  321. kRenderFxStrobeFaster,
  322. kRenderFxFlickerSlow,
  323. kRenderFxFlickerFast,
  324. kRenderFxNoDissipation,
  325. kRenderFxDistort, // Distort/scale/translate flicker
  326. kRenderFxHologram, // kRenderFxDistort + distance fade
  327. kRenderFxExplode, // Scale up really big!
  328. kRenderFxGlowShell, // Glowing Shell
  329. kRenderFxClampMinScale, // Keep this sprite from getting very small (SPRITES only!)
  330. kRenderFxEnvRain, // for environmental rendermode, make rain
  331. kRenderFxEnvSnow, // " " " , make snow
  332. kRenderFxSpotlight, // TEST CODE for experimental spotlight
  333. kRenderFxRagdoll, // HACKHACK: TEST CODE for signalling death of a ragdoll character
  334. kRenderFxPulseFastWider,
  335. kRenderFxMax
  336. };
  337. enum Collision_Group_t
  338. {
  339. COLLISION_GROUP_NONE = 0,
  340. COLLISION_GROUP_DEBRIS, // Collides with nothing but world and static stuff
  341. COLLISION_GROUP_DEBRIS_TRIGGER, // Same as debris, but hits triggers
  342. COLLISION_GROUP_INTERACTIVE_DEBRIS, // Collides with everything except other interactive debris or debris
  343. COLLISION_GROUP_INTERACTIVE, // Collides with everything except interactive debris or debris
  344. COLLISION_GROUP_PLAYER,
  345. COLLISION_GROUP_BREAKABLE_GLASS,
  346. COLLISION_GROUP_VEHICLE,
  347. COLLISION_GROUP_PLAYER_MOVEMENT, // For HL2, same as Collision_Group_Player, for
  348. // TF2, this filters out other players and CBaseObjects
  349. COLLISION_GROUP_NPC, // Generic NPC group
  350. COLLISION_GROUP_IN_VEHICLE, // for any entity inside a vehicle
  351. COLLISION_GROUP_WEAPON, // for any weapons that need collision detection
  352. COLLISION_GROUP_VEHICLE_CLIP, // vehicle clip brush to restrict vehicle movement
  353. COLLISION_GROUP_PROJECTILE, // Projectiles!
  354. COLLISION_GROUP_DOOR_BLOCKER, // Blocks entities not permitted to get near moving doors
  355. COLLISION_GROUP_PASSABLE_DOOR, // Doors that the player shouldn't collide with
  356. COLLISION_GROUP_DISSOLVING, // Things that are dissolving are in this group
  357. COLLISION_GROUP_PUSHAWAY, // Nonsolid on client and server, pushaway in player code
  358. COLLISION_GROUP_NPC_ACTOR, // Used so NPCs in scripts ignore the player.
  359. COLLISION_GROUP_NPC_SCRIPTED, // USed for NPCs in scripts that should not collide with each other
  360. LAST_SHARED_COLLISION_GROUP
  361. };
  362. #include "basetypes.h"
  363. #define SOUND_NORMAL_CLIP_DIST 1000.0f
  364. // How many networked area portals do we allow?
  365. #define MAX_AREA_STATE_BYTES 32
  366. #define MAX_AREA_PORTAL_STATE_BYTES 24
  367. // user message max payload size (note, this value is used by the engine, so MODs cannot change it)
  368. #define MAX_USER_MSG_DATA 255
  369. #define MAX_ENTITY_MSG_DATA 255
  370. #define SOURCE_MT
  371. #ifdef SOURCE_MT
  372. class CThreadMutex;
  373. typedef CThreadMutex CSourceMutex;
  374. #else
  375. class CThreadNullMutex;
  376. typedef CThreadNullMutex CSourceMutex;
  377. #endif
  378. #endif