2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-01 01:25:38 +03:00

Expose pointer to the cmd_source through rehlds API

This commit is contained in:
dreamstalker 2015-06-26 21:26:33 +04:00
parent 1463a1a2f8
commit 53649a3da2
2 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,7 @@
#include "model.h"
#define REHLDS_API_VERSION_MAJOR 1
#define REHLDS_API_VERSION_MINOR 0
#define REHLDS_API_VERSION_MINOR 1
//Steam_NotifyClientConnect hook
typedef IHookChain<qboolean, IGameClient*, const void*, unsigned int> IRehldsHook_Steam_NotifyClientConnect;
@ -164,6 +164,7 @@ struct RehldsFuncs_t {
int(*GetBuildNumber)();
double(*GetRealTime)();
int*(*GetMsgBadRead)();
cmd_source_t*(*GetCmdSource)();
};
class IRehldsApi {

View File

@ -51,6 +51,10 @@ int* GetMsgBadRead_api() {
return &msg_badread;
}
cmd_source_t* GetCmdSource_api() {
return &cmd_source;
}
CRehldsServerStatic g_RehldsServerStatic;
CRehldsServerData g_RehldsServerData;
CRehldsHookchains g_RehldsHookchains;
@ -75,7 +79,8 @@ RehldsFuncs_t g_RehldsApiFuncs =
&GSBSecure_api,
&GetBuildNumber_api,
&GetRealTime_api,
&GetMsgBadRead_api
&GetMsgBadRead_api,
&GetCmdSource_api
};
sizebuf_t* GetNetMessage_api()