source-engine/game/server/sendproxy.h

64 lines
2.0 KiB
C
Raw Normal View History

2023-10-03 14:23:56 +00:00
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
2020-04-22 16:56:21 +00:00
//
// Purpose: implements various common send proxies
//
// $NoKeywords: $
//=============================================================================//
#ifndef SENDPROXY_H
#define SENDPROXY_H
#include "dt_send.h"
class DVariant;
void SendProxy_Color32ToInt( const SendProp *pProp, const void *pStruct, const void *pData, DVariant *pOut, int iElement, int objectID );
void SendProxy_EHandleToInt( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID );
void SendProxy_IntAddOne( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID );
void SendProxy_ShortAddOne( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID );
SendProp SendPropBool(
2023-10-03 14:23:56 +00:00
char *pVarName,
2020-04-22 16:56:21 +00:00
int offset,
int sizeofVar );
SendProp SendPropEHandle(
2023-10-03 14:23:56 +00:00
char *pVarName,
2020-04-22 16:56:21 +00:00
int offset,
int flags = 0,
2023-10-03 14:23:56 +00:00
int sizeofVar=SIZEOF_IGNORE,
2020-04-22 16:56:21 +00:00
SendVarProxyFn proxyFn=SendProxy_EHandleToInt );
SendProp SendPropTime(
2023-10-03 14:23:56 +00:00
char *pVarName,
2020-04-22 16:56:21 +00:00
int offset,
int sizeofVar=SIZEOF_IGNORE );
2023-10-03 14:23:56 +00:00
#if !defined( NO_ENTITY_PREDICTION ) && defined( USE_PREDICTABLEID )
2020-04-22 16:56:21 +00:00
SendProp SendPropPredictableId(
2023-10-03 14:23:56 +00:00
char *pVarName,
2020-04-22 16:56:21 +00:00
int offset,
int sizeofVar=SIZEOF_IGNORE );
#endif
SendProp SendPropIntWithMinusOneFlag(
2023-10-03 14:23:56 +00:00
char *pVarName,
2020-04-22 16:56:21 +00:00
int offset,
2023-10-03 14:23:56 +00:00
int bits,
2020-04-22 16:56:21 +00:00
int sizeofVar=SIZEOF_IGNORE,
SendVarProxyFn proxyFn=SendProxy_IntAddOne );
// Send a string_t as a string property.
2023-10-03 14:23:56 +00:00
SendProp SendPropStringT( char *pVarName, int offset, int sizeofVar );
2020-04-22 16:56:21 +00:00
//-----------------------------------------------------------------------------
// Purpose: Proxy that only sends data to team members
//-----------------------------------------------------------------------------
void* SendProxy_OnlyToTeam( const SendProp *pProp, const void *pStruct, const void *pVarData, CSendProxyRecipients *pRecipients, int objectID );
#endif // SENDPROXY_H