Skip to content

Commit

Permalink
Revert "Merge pull request #1 from ShadowsAdi/master"
Browse files Browse the repository at this point in the history
This reverts commit bb5aa21, reversing
changes made to fe6150a.
  • Loading branch information
ShadowsAdi committed Feb 20, 2022
1 parent ecb75a3 commit 828ce12
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 26 deletions.
6 changes: 0 additions & 6 deletions reapi/extra/amxmodx/scripting/include/reapi_engine_const.inc
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ enum EngineFunc
* Params: (const string[])
*/
RH_Con_Printf,

/*
* Description: -
* Params: (adr[], userinfo[], bool:reconnect, reconnectSlot, name[])
*/
RH_SV_CheckUserInfo,
};

/**
Expand Down
7 changes: 1 addition & 6 deletions reapi/include/cssdk/engine/rehlds_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ typedef IVoidHookChainRegistry<char*, int> IRehldsHookRegistry_SVC_GetChallenge_
typedef IHookChain<int, netadr_t*, char*, uint16*, int*, char*, char*> IRehldsHook_SV_CheckKeyInfo;
typedef IHookChainRegistry<int, netadr_t*, char*, uint16*, int*, char*, char*> IRehldsHookRegistry_SV_CheckKeyInfo;

//SV_CheckUserInfo hook
typedef IHookChain<int, netadr_t*, char*, qboolean, int, char*> IRehldsHook_SV_CheckUserInfo;
typedef IHookChainRegistry<int, netadr_t*, char*, qboolean, int, char*> IRehldsHookRegistry_SV_CheckUserInfo;

//SV_CheckIPRestrictions hook
typedef IHookChain<int, netadr_t*, int> IRehldsHook_SV_CheckIPRestrictions;
typedef IHookChainRegistry<int, netadr_t*, int> IRehldsHookRegistry_SV_CheckIPRestrictions;
Expand Down Expand Up @@ -241,7 +237,6 @@ class IRehldsHookchains {
virtual IRehldsHookRegistry_SV_CheckProtocol* SV_CheckProtocol() = 0;
virtual IRehldsHookRegistry_SVC_GetChallenge_mod* SVC_GetChallenge_mod() = 0;
virtual IRehldsHookRegistry_SV_CheckKeyInfo* SV_CheckKeyInfo() = 0;
virtual IRehldsHookRegistry_SV_CheckUserInfo* SV_CheckUserInfo() = 0;
virtual IRehldsHookRegistry_SV_CheckIPRestrictions* SV_CheckIPRestrictions() = 0;
virtual IRehldsHookRegistry_SV_FinishCertificateCheck* SV_FinishCertificateCheck() = 0;
virtual IRehldsHookRegistry_Steam_NotifyBotConnect* Steam_NotifyBotConnect() = 0;
Expand Down Expand Up @@ -348,4 +343,4 @@ class IRehldsApi {
virtual IRehldsFlightRecorder* GetFlightRecorder() = 0;
};

#define VREHLDS_HLDS_API_VERSION "VREHLDS_HLDS_API_VERSION001"
#define VREHLDS_HLDS_API_VERSION "VREHLDS_HLDS_API_VERSION001"
11 changes: 1 addition & 10 deletions reapi/src/hook_callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ void SV_EmitPings_AMXX(SV_EmitPings_t* data, IGameClient* cl)

void SV_EmitPings(IRehldsHook_SV_EmitPings *chain, IGameClient *cl, sizebuf_t *msg)
{

SV_EmitPings_args_t args(cl, msg);
SV_EmitPings_t data(chain, args);
SV_EmitPings_AMXX(&data, cl);
Expand All @@ -140,16 +141,6 @@ void ED_Free(IRehldsHook_ED_Free* chain, edict_t *entity)
callVoidForward(RH_ED_Free, original, indexOfEdict(entity));
}

int SV_CheckUserInfo(IRehldsHook_SV_CheckUserInfo *chain, netadr_t *adr, char *userinfo, qboolean bIsReconnecting, int iReconnectSlot, char *name)
{
auto original = [chain](netadr_t *_adr, char *_userinfo, bool _bIsReconnecting, int _iReconnectSlot, char *_name)
{
return chain->callNext(_adr, _userinfo, _bIsReconnecting, _iReconnectSlot, _name);
};

return callForward<int>(RH_SV_CheckUserInfo, original, adr, userinfo, bIsReconnecting, iReconnectSlot, name);
}

/*
* ReGameDLL functions
*/
Expand Down
1 change: 0 additions & 1 deletion reapi/src/hook_callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ void SV_ActivateServer(IRehldsHook_SV_ActivateServer *chain, int runPhysics);
void Cvar_DirectSet(IRehldsHook_Cvar_DirectSet *chain, cvar_t *var, const char *value);
void ClientConnected(IRehldsHook_ClientConnected* chain, IGameClient* cl);
void SV_ConnectClient(IRehldsHook_SV_ConnectClient* chain);
int SV_CheckUserInfo(IRehldsHook_SV_CheckUserInfo* chain, netadr_t *adr, char *userinfo, qboolean bIsReconnecting, int iReconnectSlot, char *name);

struct SV_WriteFullClientUpdate_args_t
{
Expand Down
1 change: 0 additions & 1 deletion reapi/src/hook_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ hook_t hooklist_engine[] = {
ENG(ED_Alloc),
ENG(ED_Free),
ENG(Con_Printf),
ENG(SV_CheckUserInfo),
};

#define DLL(h,...) { {}, {}, #h, "ReGameDLL", [](){ return api_cfg.hasReGameDLL(); }, ((!(RG_##h & (MAX_REGION_RANGE - 1)) ? regfunc::current_cell = 1, true : false) || (RG_##h & (MAX_REGION_RANGE - 1)) == regfunc::current_cell++) ? regfunc(h##__VA_ARGS__) : regfunc(#h#__VA_ARGS__), [](){ g_ReGameHookchains->h()->registerHook(&h); }, [](){ g_ReGameHookchains->h()->unregisterHook(&h); }, false}
Expand Down
1 change: 0 additions & 1 deletion reapi/src/hook_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ enum EngineFunc
RH_ED_Alloc,
RH_ED_Free,
RH_Con_Printf,
RH_SV_CheckUserInfo,

// [...]
};
Expand Down
2 changes: 1 addition & 1 deletion reapi/version/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
#pragma once

#define VERSION_MAJOR 5
#define VERSION_MINOR 22
#define VERSION_MINOR 21
#define VERSION_MAINTENANCE 0

0 comments on commit 828ce12

Please sign in to comment.