mirror of
https://github.com/rehlds/reapi.git
synced 2025-01-28 22:47:56 +03:00
Implement SV_ConnectClient()
hook (#220)
* Implement SV_ConnectClient hook * Add description Co-authored-by: Sergey Shorokhov <wopox1337@ya.ru>
This commit is contained in:
parent
efcc3952b5
commit
81ced333ae
@ -66,6 +66,12 @@ enum EngineFunc
|
|||||||
*/
|
*/
|
||||||
RH_ClientConnected,
|
RH_ClientConnected,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Description: Called when processing a 'connect' client connectionless packet.
|
||||||
|
* Params: ()
|
||||||
|
*/
|
||||||
|
RH_SV_ConnectClient,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Description: Called when client it's in the scoreboard
|
* Description: Called when client it's in the scoreboard
|
||||||
* Params: (const this)
|
* Params: (const this)
|
||||||
|
@ -83,6 +83,16 @@ void ClientConnected(IRehldsHook_ClientConnected* chain, IGameClient* cl)
|
|||||||
callVoidForward(RH_ClientConnected, original, cl->GetId() + 1);
|
callVoidForward(RH_ClientConnected, original, cl->GetId() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SV_ConnectClient(IRehldsHook_SV_ConnectClient *chain)
|
||||||
|
{
|
||||||
|
auto original = [chain]()
|
||||||
|
{
|
||||||
|
chain->callNext();
|
||||||
|
};
|
||||||
|
|
||||||
|
callVoidForward(RH_SV_ConnectClient, original);
|
||||||
|
}
|
||||||
|
|
||||||
void SV_EmitPings_AMXX(SV_EmitPings_t* data, IGameClient* cl)
|
void SV_EmitPings_AMXX(SV_EmitPings_t* data, IGameClient* cl)
|
||||||
{
|
{
|
||||||
auto original = [data](int _cl)
|
auto original = [data](int _cl)
|
||||||
|
@ -333,6 +333,7 @@ void SV_DropClient(IRehldsHook_SV_DropClient *chain, IGameClient *cl, bool crash
|
|||||||
void SV_ActivateServer(IRehldsHook_SV_ActivateServer *chain, int runPhysics);
|
void SV_ActivateServer(IRehldsHook_SV_ActivateServer *chain, int runPhysics);
|
||||||
void Cvar_DirectSet(IRehldsHook_Cvar_DirectSet *chain, cvar_t *var, const char *value);
|
void Cvar_DirectSet(IRehldsHook_Cvar_DirectSet *chain, cvar_t *var, const char *value);
|
||||||
void ClientConnected(IRehldsHook_ClientConnected* chain, IGameClient* cl);
|
void ClientConnected(IRehldsHook_ClientConnected* chain, IGameClient* cl);
|
||||||
|
void SV_ConnectClient(IRehldsHook_SV_ConnectClient* chain);
|
||||||
|
|
||||||
struct SV_WriteFullClientUpdate_args_t
|
struct SV_WriteFullClientUpdate_args_t
|
||||||
{
|
{
|
||||||
|
@ -89,6 +89,7 @@ hook_t hooklist_engine[] = {
|
|||||||
ENG(SV_WriteFullClientUpdate, _AMXX),
|
ENG(SV_WriteFullClientUpdate, _AMXX),
|
||||||
ENG(GetEntityInit),
|
ENG(GetEntityInit),
|
||||||
ENG(ClientConnected),
|
ENG(ClientConnected),
|
||||||
|
ENG(SV_ConnectClient),
|
||||||
ENG(SV_EmitPings, _AMXX)
|
ENG(SV_EmitPings, _AMXX)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,6 +100,7 @@ enum EngineFunc
|
|||||||
RH_SV_WriteFullClientUpdate,
|
RH_SV_WriteFullClientUpdate,
|
||||||
RH_GetEntityInit,
|
RH_GetEntityInit,
|
||||||
RH_ClientConnected,
|
RH_ClientConnected,
|
||||||
|
RH_SV_ConnectClient,
|
||||||
RH_SV_EmitPings
|
RH_SV_EmitPings
|
||||||
|
|
||||||
// [...]
|
// [...]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user