2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-14 23:58:10 +03:00

Merge pull request #71 from theAsmodai/master

Added API for getting cvar_vars
This commit is contained in:
theAsmodai 2015-10-05 19:11:53 +03:00
commit 101a5f3ea1
2 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,7 @@
#include "model.h" #include "model.h"
#define REHLDS_API_VERSION_MAJOR 2 #define REHLDS_API_VERSION_MAJOR 2
#define REHLDS_API_VERSION_MINOR 0 #define REHLDS_API_VERSION_MINOR 1
//Steam_NotifyClientConnect hook //Steam_NotifyClientConnect hook
typedef IHookChain<qboolean, IGameClient*, const void*, unsigned int> IRehldsHook_Steam_NotifyClientConnect; typedef IHookChain<qboolean, IGameClient*, const void*, unsigned int> IRehldsHook_Steam_NotifyClientConnect;
@ -209,6 +209,7 @@ struct RehldsFuncs_t {
void(*MSG_WriteBitVec3Coord)(const float *fa); void(*MSG_WriteBitVec3Coord)(const float *fa);
void(*MSG_EndBitWriting)(sizebuf_t *buf); void(*MSG_EndBitWriting)(sizebuf_t *buf);
void*(*SZ_GetSpace)(sizebuf_t *buf, int length); void*(*SZ_GetSpace)(sizebuf_t *buf, int length);
cvar_t*(*GetCvarVars)();
}; };
class IRehldsApi { class IRehldsApi {

View File

@ -81,6 +81,10 @@ void EXT_FUNC MSG_EndBitWriting_api(sizebuf_t *buf) {
MSG_EndBitWriting(buf); MSG_EndBitWriting(buf);
} }
cvar_t* EXT_FUNC GetCvarVars_api() {
return cvar_vars;
}
CRehldsServerStatic g_RehldsServerStatic; CRehldsServerStatic g_RehldsServerStatic;
CRehldsServerData g_RehldsServerData; CRehldsServerData g_RehldsServerData;
CRehldsHookchains g_RehldsHookchains; CRehldsHookchains g_RehldsHookchains;
@ -115,7 +119,8 @@ RehldsFuncs_t g_RehldsApiFuncs =
&MSG_WriteBits_api, &MSG_WriteBits_api,
&MSG_WriteBitVec3Coord_api, &MSG_WriteBitVec3Coord_api,
&MSG_EndBitWriting_api, &MSG_EndBitWriting_api,
&SZ_GetSpace &SZ_GetSpace,
&GetCvarVars_api
}; };
sizebuf_t* EXT_FUNC GetNetMessage_api() sizebuf_t* EXT_FUNC GetNetMessage_api()