2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-14 15:48:04 +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"
#define REHLDS_API_VERSION_MAJOR 2
#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;
@ -209,6 +209,7 @@ struct RehldsFuncs_t {
void(*MSG_WriteBitVec3Coord)(const float *fa);
void(*MSG_EndBitWriting)(sizebuf_t *buf);
void*(*SZ_GetSpace)(sizebuf_t *buf, int length);
cvar_t*(*GetCvarVars)();
};
class IRehldsApi {

View File

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