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.

69 lines
2.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ROPE_SHARED_H
  8. #define ROPE_SHARED_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. // Shared definitions for rope.
  13. #define ROPE_MAX_SEGMENTS 10
  14. #define ROPE_TYPE1_NUMSEGMENTS 4
  15. #define ROPE_TYPE2_NUMSEGMENTS 2
  16. // Default rope gravity vector.
  17. #define ROPE_GRAVITY 0, 0, -1500
  18. // Rope flags.
  19. #define ROPE_RESIZE (1<<0) // Try to keep the rope dangling the same amount
  20. // even as the rope length changes.
  21. #define ROPE_BARBED (1<<1) // Hack option to draw like a barbed wire.
  22. #define ROPE_COLLIDE (1<<2) // Collide with the world?
  23. #define ROPE_SIMULATE (1<<3) // Is the rope valid?
  24. #define ROPE_BREAKABLE (1<<4) // Can the endpoints detach?
  25. #define ROPE_NO_WIND (1<<5) // No wind simulation on this rope.
  26. #define ROPE_INITIAL_HANG (1<<6) // By default, ropes will simulate for a bit internally when they
  27. // are created so they sag, but dynamically created ropes for things
  28. // like harpoons don't want this.
  29. #define ROPE_PLAYER_WPN_ATTACH (1<<7) // If this flag is set, then the second attachment must be a player.
  30. // The rope will attach to "buff_attach" on the player's active weapon.
  31. // (This is a flag because it requires special code on the client to
  32. // find the weapon).
  33. #define ROPE_NO_GRAVITY (1<<8) // Disable gravity on this rope.
  34. #define ROPE_NUMFLAGS 9
  35. // This is added to all rope slacks so when a level designer enters a
  36. // slack of zero in the entity, it doesn't dangle so low.
  37. #define ROPESLACK_FUDGEFACTOR -100
  38. // Rope shader IDs.
  39. #define ROPESHADER_BLACKCABLE 0
  40. #define ROPESHADER_ROPE 1
  41. #define ROPESHADER_CHAIN 2
  42. // Rope locked points
  43. enum
  44. {
  45. ROPE_LOCK_START_POINT = 0x1,
  46. ROPE_LOCK_END_POINT = 0x2,
  47. ROPE_LOCK_START_DIRECTION = 0x4,
  48. ROPE_LOCK_END_DIRECTION = 0x8,
  49. };
  50. // Rope attachment points.
  51. #define ROPE_ATTACHMENT_START_POINT 1
  52. #define ROPE_ATTACHMENT_END_POINT 2
  53. #endif // ROPE_SHARED_H