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.

63 lines
2.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: implements various common send proxies
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef SENDPROXY_H
  8. #define SENDPROXY_H
  9. #include "dt_send.h"
  10. class DVariant;
  11. void SendProxy_Color32ToInt( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID );
  12. void SendProxy_EHandleToInt( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID );
  13. void SendProxy_IntAddOne( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID );
  14. void SendProxy_ShortAddOne( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID );
  15. SendProp SendPropBool(
  16. const char *pVarName,
  17. int offset,
  18. int sizeofVar );
  19. SendProp SendPropEHandle(
  20. const char *pVarName,
  21. int offset,
  22. int sizeofVar=SIZEOF_IGNORE,
  23. int flags = 0,
  24. SendVarProxyFn proxyFn=SendProxy_EHandleToInt );
  25. SendProp SendPropTime(
  26. const char *pVarName,
  27. int offset,
  28. int sizeofVar=SIZEOF_IGNORE );
  29. #if !defined( NO_ENTITY_PREDICTION )
  30. SendProp SendPropPredictableId(
  31. const char *pVarName,
  32. int offset,
  33. int sizeofVar=SIZEOF_IGNORE );
  34. #endif
  35. SendProp SendPropIntWithMinusOneFlag(
  36. const char *pVarName,
  37. int offset,
  38. int sizeofVar=SIZEOF_IGNORE,
  39. int bits=-1,
  40. SendVarProxyFn proxyFn=SendProxy_IntAddOne );
  41. // Send a string_t as a string property.
  42. SendProp SendPropStringT( const char *pVarName, int offset, int sizeofVar );
  43. //-----------------------------------------------------------------------------
  44. // Purpose: Proxy that only sends data to team members
  45. //-----------------------------------------------------------------------------
  46. void* SendProxy_OnlyToTeam( const SendProp *pProp, const void *pStruct, const void *pVarData, CSendProxyRecipients *pRecipients, int objectID );
  47. #endif // SENDPROXY_H