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.

64 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef AI_DEBUG_SHARED_H
  7. #define AI_DEBUG_SHARED_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "tier0/vprof.h"
  12. // This uses VPROF to profile
  13. //#define VPROF_AI 1
  14. #ifdef VPROF_AI
  15. inline void AI_TraceLine( const Vector& vecAbsStart, const Vector& vecAbsEnd, unsigned int mask,
  16. const IHandleEntity *ignore, int collisionGroup, trace_t *ptr )
  17. {
  18. VPROF( "AI_TraceLine" );
  19. UTIL_TraceLine( vecAbsStart, vecAbsEnd, mask, ignore, collisionGroup, ptr );
  20. }
  21. inline void AI_TraceLine( const Vector& vecAbsStart, const Vector& vecAbsEnd, unsigned int mask,
  22. ITraceFilter *pFilter, trace_t *ptr )
  23. {
  24. VPROF( "AI_TraceLine" );
  25. UTIL_TraceLine( vecAbsStart, vecAbsEnd, mask, pFilter, ptr );
  26. }
  27. inline void AI_TraceHull( const Vector &vecAbsStart, const Vector &vecAbsEnd, const Vector &hullMin,
  28. const Vector &hullMax, unsigned int mask, const IHandleEntity *ignore,
  29. int collisionGroup, trace_t *ptr )
  30. {
  31. VPROF( "AI_TraceHull" );
  32. UTIL_TraceHull( vecAbsStart, vecAbsEnd, hullMin, hullMax, mask, ignore, collisionGroup, ptr );
  33. }
  34. inline void AI_TraceHull( const Vector &vecAbsStart, const Vector &vecAbsEnd, const Vector &hullMin,
  35. const Vector &hullMax, unsigned int mask, ITraceFilter *pFilter, trace_t *ptr )
  36. {
  37. VPROF( "AI_TraceHull" );
  38. UTIL_TraceHull( vecAbsStart, vecAbsEnd, hullMin, hullMax, mask, pFilter, ptr );
  39. }
  40. inline void AI_TraceEntity( CBaseEntity *pEntity, const Vector &vecAbsStart, const Vector &vecAbsEnd, unsigned int mask, trace_t *ptr )
  41. {
  42. VPROF( "AI_TraceEntity" );
  43. UTIL_TraceEntity( pEntity, vecAbsStart, vecAbsEnd, mask, ptr );
  44. }
  45. #else
  46. #define AI_TraceLine UTIL_TraceLine
  47. #define AI_TraceHull UTIL_TraceHull
  48. #define AI_TraceEntity UTIL_TraceEntity
  49. #endif
  50. #endif // AI_DEBUG_SHARED_H