diff --git a/rehlds/engine/sv_steam3.cpp b/rehlds/engine/sv_steam3.cpp index 7a0177c..f31566f 100644 --- a/rehlds/engine/sv_steam3.cpp +++ b/rehlds/engine/sv_steam3.cpp @@ -731,20 +731,20 @@ qboolean Steam_NotifyBotConnect_internal(client_t *cl) void EXT_FUNC Steam_NotifyClientDisconnect_api(IGameClient* cl) { - Steam_NotifyClientDisconnect_internal(cl->GetClient()); + g_RehldsHookchains.m_Steam_NotifyClientDisconnect.callChain(Steam_NotifyClientDisconnect_internal, cl); } void Steam_NotifyClientDisconnect(client_t *cl) { - g_RehldsHookchains.m_Steam_NotifyClientDisconnect.callChain(Steam_NotifyClientDisconnect_api, GetRehldsApiClient(cl)); + Steam_NotifyClientDisconnect_api(GetRehldsApiClient(cl)); } /* ../engine/sv_steam3.cpp:934 */ -void Steam_NotifyClientDisconnect_internal(client_t *cl) +void Steam_NotifyClientDisconnect_internal(IGameClient* cl) { if (Steam3Server()) { - Steam3Server()->NotifyClientDisconnect(cl); + Steam3Server()->NotifyClientDisconnect(cl->GetClient()); } } diff --git a/rehlds/engine/sv_steam3.h b/rehlds/engine/sv_steam3.h index f1fa188..a9ab949 100644 --- a/rehlds/engine/sv_steam3.h +++ b/rehlds/engine/sv_steam3.h @@ -203,11 +203,13 @@ bool ISteamApps_BIsSubscribedApp(uint32 appid); const char *Steam_GetCommunityName(void); qboolean Steam_NotifyClientConnect(client_t *cl, const void *pvSteam2Key, unsigned int ucbSteam2Key); qboolean Steam_NotifyClientConnect_internal(client_t *cl, const void *pvSteam2Key, unsigned int ucbSteam2Key); +qboolean Steam_NotifyClientConnect_api(IGameClient *cl, const void *pvSteam2Key, unsigned int ucbSteam2Key); qboolean Steam_NotifyBotConnect(client_t *cl); qboolean Steam_NotifyBotConnect_internal(client_t *cl); qboolean Steam_NotifyBotConnect_api(IGameClient* cl); void Steam_NotifyClientDisconnect(client_t *cl); -void Steam_NotifyClientDisconnect_internal(client_t *cl); +void Steam_NotifyClientDisconnect_internal(IGameClient *cl); +void Steam_NotifyClientDisconnect_api(IGameClient* cl); void Steam_NotifyOfLevelChange(void); void Steam_Shutdown(void); void Steam_Activate(void); diff --git a/rehlds/public/rehlds/rehlds_api.h b/rehlds/public/rehlds/rehlds_api.h index 84be7bc..d3df263 100644 --- a/rehlds/public/rehlds/rehlds_api.h +++ b/rehlds/public/rehlds/rehlds_api.h @@ -35,7 +35,7 @@ #include "model.h" #define REHLDS_API_VERSION_MAJOR 2 -#define REHLDS_API_VERSION_MINOR 7 +#define REHLDS_API_VERSION_MINOR 8 //Steam_NotifyClientConnect hook typedef IHookChain IRehldsHook_Steam_NotifyClientConnect; @@ -251,6 +251,8 @@ struct RehldsFuncs_t { void*(*GetPluginApi)(const char *name); void(*RegisterPluginApi)(const char *name, void *impl); qboolean(*SV_FileInConsistencyList)(const char *filename, struct consistency_s **ppconsist); + qboolean(*Steam_NotifyClientConnect_api)(IGameClient *cl, const void *pvSteam2Key, unsigned int ucbSteam2Key); + void(*Steam_NotifyClientDisconnect)(IGameClient* cl); }; class IRehldsApi { diff --git a/rehlds/rehlds/rehlds_api_impl.cpp b/rehlds/rehlds/rehlds_api_impl.cpp index 47682b9..068e982 100644 --- a/rehlds/rehlds/rehlds_api_impl.cpp +++ b/rehlds/rehlds/rehlds_api_impl.cpp @@ -192,7 +192,9 @@ RehldsFuncs_t g_RehldsApiFuncs = &MSG_WriteString_api, &Rehlds_GetPluginApi, &Rehlds_RegisterPluginApi, - &SV_FileInConsistencyList + &SV_FileInConsistencyList, + &Steam_NotifyClientConnect_api, + &Steam_NotifyClientDisconnect_api }; sizebuf_t* EXT_FUNC GetNetMessage_api()