Update some SDK headers
This commit is contained in:
parent
3cdfd39448
commit
b945425f1a
2
external/source-sdk-2013-headers
vendored
2
external/source-sdk-2013-headers
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c80b09c1b6f40dc58b0a1d408832abb2b027d897
|
Subproject commit a2b2bf54816ec2ad780f4b5a509e53e4a3f58fba
|
@ -20,6 +20,7 @@ class ILocalize;
|
|||||||
|
|
||||||
class IToolFrameworkInternal;
|
class IToolFrameworkInternal;
|
||||||
class ISteamClient;
|
class ISteamClient;
|
||||||
|
class ISteamNetworkingSockets;
|
||||||
class ISteamFriends;
|
class ISteamFriends;
|
||||||
class IVEngineClient013;
|
class IVEngineClient013;
|
||||||
class IClientEntityList;
|
class IClientEntityList;
|
||||||
@ -62,6 +63,7 @@ extern TFGCClientSystem *g_TFGCClientSystem;
|
|||||||
extern CHud *g_CHUD;
|
extern CHud *g_CHUD;
|
||||||
extern ISteamClient *g_ISteamClient;
|
extern ISteamClient *g_ISteamClient;
|
||||||
extern ISteamFriends *g_ISteamFriends;
|
extern ISteamFriends *g_ISteamFriends;
|
||||||
|
extern ISteamNetworkingSockets *g_ISteamNetworkingSockets;
|
||||||
extern IVEngineClient013 *g_IEngine;
|
extern IVEngineClient013 *g_IEngine;
|
||||||
extern void *demoplayer;
|
extern void *demoplayer;
|
||||||
extern IEngineSound *g_ISoundEngine;
|
extern IEngineSound *g_ISoundEngine;
|
||||||
|
@ -18,46 +18,47 @@
|
|||||||
|
|
||||||
// class ISteamFriends002;
|
// class ISteamFriends002;
|
||||||
|
|
||||||
IVModelRender *g_IVModelRender = nullptr;
|
IVModelRender *g_IVModelRender = nullptr;
|
||||||
ISteamClient *g_ISteamClient = nullptr;
|
ISteamClient *g_ISteamClient = nullptr;
|
||||||
ISteamFriends *g_ISteamFriends = nullptr;
|
ISteamFriends *g_ISteamFriends = nullptr;
|
||||||
IVEngineClient013 *g_IEngine = nullptr;
|
ISteamNetworkingSockets *g_ISteamNetworkingSockets = nullptr;
|
||||||
void *demoplayer = nullptr;
|
IVEngineClient013 *g_IEngine = nullptr;
|
||||||
IEngineSound *g_ISoundEngine = nullptr;
|
void *demoplayer = nullptr;
|
||||||
vgui::ISurface *g_ISurface = nullptr;
|
IEngineSound *g_ISoundEngine = nullptr;
|
||||||
vgui::IPanel *g_IPanel = nullptr;
|
vgui::ISurface *g_ISurface = nullptr;
|
||||||
vgui::ILocalize *g_ILocalize = nullptr;
|
vgui::IPanel *g_IPanel = nullptr;
|
||||||
IClientEntityList *g_IEntityList = nullptr;
|
vgui::ILocalize *g_ILocalize = nullptr;
|
||||||
ICvar *g_ICvar = nullptr;
|
IClientEntityList *g_IEntityList = nullptr;
|
||||||
IGameEventManager2 *g_IEventManager2 = nullptr;
|
ICvar *g_ICvar = nullptr;
|
||||||
IBaseClientDLL *g_IBaseClient = nullptr;
|
IGameEventManager2 *g_IEventManager2 = nullptr;
|
||||||
IEngineTrace *g_ITrace = nullptr;
|
IBaseClientDLL *g_IBaseClient = nullptr;
|
||||||
IVModelInfoClient *g_IModelInfo = nullptr;
|
IEngineTrace *g_ITrace = nullptr;
|
||||||
IInputSystem *g_IInputSystem = nullptr;
|
IVModelInfoClient *g_IModelInfo = nullptr;
|
||||||
CGlobalVarsBase **rg_GlobalVars = nullptr;
|
IInputSystem *g_IInputSystem = nullptr;
|
||||||
IPrediction *g_IPrediction = nullptr;
|
CGlobalVarsBase **rg_GlobalVars = nullptr;
|
||||||
IGameMovement *g_IGameMovement = nullptr;
|
IPrediction *g_IPrediction = nullptr;
|
||||||
IInput *g_IInput = nullptr;
|
IGameMovement *g_IGameMovement = nullptr;
|
||||||
ISteamUser *g_ISteamUser = nullptr;
|
IInput *g_IInput = nullptr;
|
||||||
IAchievementMgr *g_IAchievementMgr = nullptr;
|
ISteamUser *g_ISteamUser = nullptr;
|
||||||
ISteamUserStats *g_ISteamUserStats = nullptr;
|
IAchievementMgr *g_IAchievementMgr = nullptr;
|
||||||
IStudioRender *g_IStudioRender = nullptr;
|
ISteamUserStats *g_ISteamUserStats = nullptr;
|
||||||
IVDebugOverlay *g_IVDebugOverlay = nullptr;
|
IStudioRender *g_IStudioRender = nullptr;
|
||||||
IMaterialSystemFixed *g_IMaterialSystem = nullptr;
|
IVDebugOverlay *g_IVDebugOverlay = nullptr;
|
||||||
IVRenderView *g_IVRenderView = nullptr;
|
IMaterialSystemFixed *g_IMaterialSystem = nullptr;
|
||||||
IMaterialSystem *g_IMaterialSystemHL = nullptr;
|
IVRenderView *g_IVRenderView = nullptr;
|
||||||
IMoveHelperServer *g_IMoveHelperServer = nullptr;
|
IMaterialSystem *g_IMaterialSystemHL = nullptr;
|
||||||
CBaseClientState *g_IBaseClientState = nullptr;
|
IMoveHelperServer *g_IMoveHelperServer = nullptr;
|
||||||
IGameEventManager *g_IGameEventManager = nullptr;
|
CBaseClientState *g_IBaseClientState = nullptr;
|
||||||
TFGCClientSystem *g_TFGCClientSystem = nullptr;
|
IGameEventManager *g_IGameEventManager = nullptr;
|
||||||
CHud *g_CHUD = nullptr;
|
TFGCClientSystem *g_TFGCClientSystem = nullptr;
|
||||||
CGameRules *g_pGameRules = nullptr;
|
CHud *g_CHUD = nullptr;
|
||||||
IEngineVGui *g_IEngineVGui = nullptr;
|
CGameRules *g_pGameRules = nullptr;
|
||||||
IUniformRandomStream *g_pUniformStream = nullptr;
|
IEngineVGui *g_IEngineVGui = nullptr;
|
||||||
int *g_PredictionRandomSeed = nullptr;
|
IUniformRandomStream *g_pUniformStream = nullptr;
|
||||||
IFileSystem *g_IFileSystem = nullptr;
|
int *g_PredictionRandomSeed = nullptr;
|
||||||
IMDLCache *g_IMDLCache = nullptr;
|
IFileSystem *g_IFileSystem = nullptr;
|
||||||
IToolFrameworkInternal *g_IToolFramework = nullptr;
|
IMDLCache *g_IMDLCache = nullptr;
|
||||||
|
IToolFrameworkInternal *g_IToolFramework = nullptr;
|
||||||
|
|
||||||
template <typename T> T *BruteforceInterface(std::string name, sharedobj::SharedObject &object, int start = 0)
|
template <typename T> T *BruteforceInterface(std::string name, sharedobj::SharedObject &object, int start = 0)
|
||||||
{
|
{
|
||||||
@ -87,6 +88,8 @@ template <typename T> T *BruteforceInterface(std::string name, sharedobj::Shared
|
|||||||
extern "C" typedef HSteamPipe (*GetHSteamPipe_t)();
|
extern "C" typedef HSteamPipe (*GetHSteamPipe_t)();
|
||||||
extern "C" typedef HSteamUser (*GetHSteamUser_t)();
|
extern "C" typedef HSteamUser (*GetHSteamUser_t)();
|
||||||
|
|
||||||
|
extern "C" typedef void *(*SteamInternal_FindOrCreateUserInterface_t)(HSteamUser, const char *);
|
||||||
|
|
||||||
void CreateEarlyInterfaces()
|
void CreateEarlyInterfaces()
|
||||||
{
|
{
|
||||||
g_IFileSystem = BruteforceInterface<IFileSystem>("VFileSystem", sharedobj::filesystem_stdio());
|
g_IFileSystem = BruteforceInterface<IFileSystem>("VFileSystem", sharedobj::filesystem_stdio());
|
||||||
@ -124,6 +127,8 @@ void CreateInterfaces()
|
|||||||
}
|
}
|
||||||
logging::Info("Inited SteamAPI");
|
logging::Info("Inited SteamAPI");
|
||||||
|
|
||||||
|
g_ISteamNetworkingSockets = (ISteamNetworkingSockets *) reinterpret_cast<SteamInternal_FindOrCreateUserInterface_t>(dlsym(sharedobj::steamapi().lmap, "SteamInternal_FindOrCreateUserInterface"))(su, "SteamNetworkingSockets009");
|
||||||
|
|
||||||
g_IVModelRender = BruteforceInterface<IVModelRender>("VEngineModel", sharedobj::engine(), 16);
|
g_IVModelRender = BruteforceInterface<IVModelRender>("VEngineModel", sharedobj::engine(), 16);
|
||||||
g_ISteamFriends = nullptr;
|
g_ISteamFriends = nullptr;
|
||||||
g_IEngineVGui = BruteforceInterface<IEngineVGui>("VEngineVGui", sharedobj::engine());
|
g_IEngineVGui = BruteforceInterface<IEngineVGui>("VEngineVGui", sharedobj::engine());
|
||||||
|
@ -32,7 +32,7 @@ static settings::Boolean enable_africa{ "dc.toggle-africa", "false" };
|
|||||||
|
|
||||||
typedef std::array<char, 5> CidStr_t;
|
typedef std::array<char, 5> CidStr_t;
|
||||||
|
|
||||||
struct SteamNetworkingPOPID
|
struct SteamNetworkingPOPID_decl
|
||||||
{
|
{
|
||||||
unsigned v;
|
unsigned v;
|
||||||
/* 'out' must point to array with capacity at least 5 */
|
/* 'out' must point to array with capacity at least 5 */
|
||||||
@ -95,7 +95,7 @@ static std::vector<std::string> africa_datacenters = { { "jnb" } };
|
|||||||
|
|
||||||
static CatCommand print("dc_print", "Print codes of all available data centers", []() {
|
static CatCommand print("dc_print", "Print codes of all available data centers", []() {
|
||||||
static auto GetPOPCount = *(int (**)(void *))(*(uintptr_t *) g_ISteamNetworkingUtils + 37);
|
static auto GetPOPCount = *(int (**)(void *))(*(uintptr_t *) g_ISteamNetworkingUtils + 37);
|
||||||
static auto GetPOPList = *(int (**)(void *, SteamNetworkingPOPID *, int))(*(uintptr_t *) g_ISteamNetworkingUtils + 41);
|
static auto GetPOPList = *(int (**)(void *, SteamNetworkingPOPID_decl *, int))(*(uintptr_t *) g_ISteamNetworkingUtils + 41);
|
||||||
|
|
||||||
char region[5];
|
char region[5];
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ static CatCommand print("dc_print", "Print codes of all available data centers",
|
|||||||
g_ICvar->ConsoleColorPrintf(MENU_COLOR, "List of regions is not available yet\n");
|
g_ICvar->ConsoleColorPrintf(MENU_COLOR, "List of regions is not available yet\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SteamNetworkingPOPID *list = new SteamNetworkingPOPID[count];
|
SteamNetworkingPOPID_decl *list = new SteamNetworkingPOPID_decl[count];
|
||||||
GetPOPList(g_ISteamNetworkingUtils, list, count);
|
GetPOPList(g_ISteamNetworkingUtils, list, count);
|
||||||
|
|
||||||
auto it = list;
|
auto it = list;
|
||||||
@ -156,8 +156,8 @@ static void OnRegionsUpdate(std::string regions)
|
|||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int (*o_GetDirectPingToPOP)(void *self, SteamNetworkingPOPID cid);
|
static int (*o_GetDirectPingToPOP)(void *self, SteamNetworkingPOPID_decl cid);
|
||||||
static int h_GetDirectPingToPOP(void *self, SteamNetworkingPOPID cid)
|
static int h_GetDirectPingToPOP(void *self, SteamNetworkingPOPID_decl cid)
|
||||||
{
|
{
|
||||||
CidStr_t cidStr;
|
CidStr_t cidStr;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user