mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-27 23:25:45 +03:00
Added PrepareUserInfoToTransmit callback to ReHLDS API
This commit is contained in:
parent
d3d296cbcc
commit
e4d8e0ae96
@ -3713,6 +3713,8 @@ void SV_FullClientUpdate(client_t *cl, sizebuf_t *sb)
|
||||
info[sizeof(info) - 1] = 0;
|
||||
Info_RemovePrefixedKeys(info, '_');
|
||||
|
||||
g_RehldsHookchains.m_PrepareUserInfoToTransmit.callChain(nullptr, GetRehldsApiClient(cl), info);
|
||||
|
||||
MD5Init(&ctx);
|
||||
MD5Update(&ctx, (unsigned char*)cl->hashedcdkey, sizeof(cl->hashedcdkey));
|
||||
MD5Final(digest, &ctx);
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "model.h"
|
||||
|
||||
#define REHLDS_API_VERSION_MAJOR 1
|
||||
#define REHLDS_API_VERSION_MINOR 3
|
||||
#define REHLDS_API_VERSION_MINOR 4
|
||||
|
||||
//Steam_NotifyClientConnect hook
|
||||
typedef IHookChain<qboolean, IGameClient*, const void*, unsigned int> IRehldsHook_Steam_NotifyClientConnect;
|
||||
@ -137,6 +137,10 @@ typedef IVoidHookChainRegistry<edict_t *> IRehldsHookRegistry_PF_Remove_I;
|
||||
typedef IVoidHookChain<edict_t *, int, const char *, float, float, int, int, int, int, const float *, edict_t *> IRehldsHook_PF_BuildSoundMsg_I;
|
||||
typedef IVoidHookChainRegistry<edict_t *, int, const char *, float, float, int, int, int, int, const float *, edict_t *> IRehldsHookRegistry_PF_BuildSoundMsg_I;
|
||||
|
||||
// PrepareUserInfoToTransmit hook
|
||||
typedef IVoidHookChain<IGameClient *, char *> IRehldsHook_PrepareUserInfoToTransmit;
|
||||
typedef IVoidHookChainRegistry<IGameClient *, char *> IRehldsHookRegistry_PrepareUserInfoToTransmit;
|
||||
|
||||
class IRehldsHookchains {
|
||||
public:
|
||||
virtual ~IRehldsHookchains() { }
|
||||
@ -166,6 +170,7 @@ public:
|
||||
virtual IRehldsHookRegistry_SV_StartSound* SV_StartSound() = 0;
|
||||
virtual IRehldsHookRegistry_PF_Remove_I* PF_Remove_I() = 0;
|
||||
virtual IRehldsHookRegistry_PF_BuildSoundMsg_I* PF_BuildSoundMsg_I() = 0;
|
||||
virtual IRehldsHookRegistry_PrepareUserInfoToTransmit* PrepareUserInfoToTransmit() = 0;
|
||||
};
|
||||
|
||||
struct RehldsFuncs_t {
|
||||
|
@ -249,6 +249,10 @@ IRehldsHookRegistry_PF_BuildSoundMsg_I* CRehldsHookchains::PF_BuildSoundMsg_I()
|
||||
return &m_PF_BuildSoundMsg_I;
|
||||
}
|
||||
|
||||
IRehldsHookRegistry_PrepareUserInfoToTransmit* CRehldsHookchains::PrepareUserInfoToTransmit() {
|
||||
return &m_PrepareUserInfoToTransmit;
|
||||
}
|
||||
|
||||
int EXT_FUNC CRehldsApi::GetMajorVersion()
|
||||
{
|
||||
return REHLDS_API_VERSION_MAJOR;
|
||||
|
@ -131,6 +131,10 @@ typedef IVoidHookChainRegistryImpl<edict_t *> CRehldsHookRegistry_PF_Remove_I;
|
||||
typedef IVoidHookChainImpl<edict_t *, int, const char *, float, float, int, int, int, int, const float *, edict_t *> CRehldsHook_PF_BuildSoundMsg_I;
|
||||
typedef IVoidHookChainRegistryImpl<edict_t *, int, const char *, float, float, int, int, int, int, const float *, edict_t *> CRehldsHookRegistry_PF_BuildSoundMsg_I;
|
||||
|
||||
// PrepareUserInfoToTransmit hook
|
||||
typedef IVoidHookChainImpl<IGameClient *, char *> CRehldsHook_PrepareUserInfoToTransmit;
|
||||
typedef IVoidHookChainRegistryImpl<IGameClient *, char *> CRehldsHookRegistry_PrepareUserInfoToTransmit;
|
||||
|
||||
class CRehldsHookchains : public IRehldsHookchains {
|
||||
public:
|
||||
CRehldsHookRegistry_Steam_NotifyClientConnect m_Steam_NotifyClientConnect;
|
||||
@ -158,6 +162,7 @@ public:
|
||||
CRehldsHookRegistry_SV_StartSound m_SV_StartSound;
|
||||
CRehldsHookRegistry_PF_Remove_I m_PF_Remove_I;
|
||||
CRehldsHookRegistry_PF_BuildSoundMsg_I m_PF_BuildSoundMsg_I;
|
||||
CRehldsHookRegistry_PrepareUserInfoToTransmit m_PrepareUserInfoToTransmit;
|
||||
|
||||
public:
|
||||
virtual IRehldsHookRegistry_Steam_NotifyClientConnect* Steam_NotifyClientConnect();
|
||||
@ -185,6 +190,7 @@ public:
|
||||
virtual IRehldsHookRegistry_SV_StartSound* SV_StartSound();
|
||||
virtual IRehldsHookRegistry_PF_Remove_I* PF_Remove_I();
|
||||
virtual IRehldsHookRegistry_PF_BuildSoundMsg_I* PF_BuildSoundMsg_I();
|
||||
virtual IRehldsHookRegistry_PrepareUserInfoToTransmit* PrepareUserInfoToTransmit();
|
||||
};
|
||||
|
||||
extern CRehldsHookchains g_RehldsHookchains;
|
||||
|
Loading…
Reference in New Issue
Block a user