Counter Strike : Global Offensive Source Code
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 � 1996-2005, 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. char *pVarName,
  17. int offset,
  18. int sizeofVar );
  19. SendProp SendPropEHandle(
  20. char *pVarName,
  21. int offset,
  22. int flags = 0,
  23. int sizeofVar=SIZEOF_IGNORE,
  24. SendVarProxyFn proxyFn=SendProxy_EHandleToInt );
  25. SendProp SendPropTime(
  26. char *pVarName,
  27. int offset,
  28. int sizeofVar=SIZEOF_IGNORE );
  29. #if !defined( NO_ENTITY_PREDICTION ) && defined( USE_PREDICTABLEID )
  30. SendProp SendPropPredictableId(
  31. char *pVarName,
  32. int offset,
  33. int sizeofVar=SIZEOF_IGNORE );
  34. #endif
  35. SendProp SendPropIntWithMinusOneFlag(
  36. char *pVarName,
  37. int offset,
  38. int bits,
  39. int sizeofVar=SIZEOF_IGNORE,
  40. SendVarProxyFn proxyFn=SendProxy_IntAddOne );
  41. // Send a string_t as a string property.
  42. SendProp SendPropStringT( 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