2022-04-14 19:18:59 +02:00
|
|
|
#pragma once
|
|
|
|
|
2024-01-02 15:21:36 +01:00
|
|
|
inline bool(*v_SetupGamemode)(const char* pszPlayList);
|
2022-04-14 19:18:59 +02:00
|
|
|
|
2022-05-16 21:15:25 +02:00
|
|
|
/* ==== CONCOMMANDCALLBACK ============================================================================================================================================== */
|
2024-01-02 15:21:36 +01:00
|
|
|
inline void(*v__DownloadPlaylists_f)(void);
|
|
|
|
inline void(*v__Cmd_Exec_f)(const CCommand& args);
|
2023-10-15 10:40:46 +02:00
|
|
|
|
2022-05-16 21:15:25 +02:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2022-08-04 11:06:56 +02:00
|
|
|
void MP_GameMode_Changed_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2022-08-27 18:57:56 +02:00
|
|
|
void MP_HostName_Changed_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2022-05-16 21:15:25 +02:00
|
|
|
#ifndef DEDICATED
|
2022-11-10 15:36:04 +01:00
|
|
|
void ToggleConsole_f(const CCommand& args);
|
|
|
|
void ToggleBrowser_f(const CCommand& args);
|
2022-05-16 21:15:25 +02:00
|
|
|
#endif // !DEDICATED
|
2022-07-21 15:13:48 +02:00
|
|
|
#ifndef CLIENT_DLL
|
2022-05-16 21:15:25 +02:00
|
|
|
void Host_Kick_f(const CCommand& args);
|
|
|
|
void Host_KickID_f(const CCommand& args);
|
|
|
|
void Host_Ban_f(const CCommand& args);
|
|
|
|
void Host_BanID_f(const CCommand& args);
|
|
|
|
void Host_Unban_f(const CCommand& args);
|
2022-09-08 01:02:22 +02:00
|
|
|
void Host_ReloadBanList_f(const CCommand& args);
|
|
|
|
void Host_ReloadPlaylists_f(const CCommand& args);
|
2022-09-16 00:51:35 +02:00
|
|
|
void Host_Changelevel_f(const CCommand& args);
|
2022-11-03 17:12:22 +01:00
|
|
|
void Detour_HotSwap_f(const CCommand& args);
|
2022-07-21 15:13:48 +02:00
|
|
|
#endif // !CLIENT_DLL
|
2022-05-16 21:15:25 +02:00
|
|
|
void Pak_ListPaks_f(const CCommand& args);
|
2022-12-22 21:44:38 +00:00
|
|
|
void Pak_ListTypes_f(const CCommand& args);
|
2022-05-16 21:15:25 +02:00
|
|
|
void Pak_RequestUnload_f(const CCommand& args);
|
|
|
|
void Pak_RequestLoad_f(const CCommand& args);
|
2022-05-19 00:47:16 +02:00
|
|
|
void Pak_Swap_f(const CCommand& args);
|
2022-05-16 21:15:25 +02:00
|
|
|
void RTech_StringToGUID_f(const CCommand& args);
|
|
|
|
void RTech_Decompress_f(const CCommand& args);
|
2022-05-30 02:56:15 +02:00
|
|
|
void VPK_Pack_f(const CCommand& args);
|
2022-05-16 21:15:25 +02:00
|
|
|
void VPK_Unpack_f(const CCommand& args);
|
|
|
|
void VPK_Mount_f(const CCommand& args);
|
2022-11-06 12:21:21 +01:00
|
|
|
void VPK_Unmount_f(const CCommand& args);
|
2022-05-16 21:15:25 +02:00
|
|
|
void NET_SetKey_f(const CCommand& args);
|
|
|
|
void NET_GenerateKey_f(const CCommand& args);
|
2022-08-30 12:10:07 +02:00
|
|
|
void NET_UseRandomKeyChanged_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2023-04-30 11:34:47 +02:00
|
|
|
void NET_UseSocketsForLoopbackChanged_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2023-03-15 21:11:20 +01:00
|
|
|
void SIG_GetAdr_f(const CCommand& args);
|
2022-10-19 16:10:36 +02:00
|
|
|
void CON_Help_f(const CCommand& args);
|
2022-05-16 21:15:25 +02:00
|
|
|
#ifndef DEDICATED
|
2022-10-19 16:10:36 +02:00
|
|
|
void CON_LogHistory_f(const CCommand& args);
|
2022-10-18 02:11:52 +02:00
|
|
|
void CON_RemoveLine_f(const CCommand& args);
|
2022-10-19 16:10:36 +02:00
|
|
|
void CON_ClearLines_f(const CCommand& args);
|
|
|
|
void CON_ClearHistory_f(const CCommand& args);
|
|
|
|
|
2022-05-16 21:15:25 +02:00
|
|
|
void RCON_CmdQuery_f(const CCommand& args);
|
|
|
|
void RCON_Disconnect_f(const CCommand& args);
|
2023-08-04 17:28:01 +02:00
|
|
|
void RCON_InputOnlyChanged_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2023-09-12 17:44:24 +02:00
|
|
|
|
|
|
|
void GFX_NVN_Changed_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2022-05-16 21:15:25 +02:00
|
|
|
#endif // !DEDICATED
|
2022-07-25 19:35:08 +02:00
|
|
|
void RCON_PasswordChanged_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2023-08-17 20:22:28 +01:00
|
|
|
void LanguageChanged_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2022-07-25 19:35:08 +02:00
|
|
|
#ifndef CLIENT_DLL
|
2023-04-16 17:51:48 +02:00
|
|
|
void RCON_WhiteListAddresChanged_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2023-04-22 16:51:18 +02:00
|
|
|
void RCON_ConnectionCountChanged_f(IConVar* pConVar, const char* pOldString, float flOldValue);
|
2022-05-16 21:15:25 +02:00
|
|
|
void SQVM_ServerScript_f(const CCommand& args);
|
2022-07-25 19:35:08 +02:00
|
|
|
#endif // !CLIENT_DLL
|
2022-05-16 21:15:25 +02:00
|
|
|
#ifndef DEDICATED
|
|
|
|
void SQVM_ClientScript_f(const CCommand& args);
|
|
|
|
void SQVM_UIScript_f(const CCommand& args);
|
|
|
|
void Mat_CrossHair_f(const CCommand& args);
|
2022-07-12 17:46:47 +02:00
|
|
|
void Line_f(const CCommand& args);
|
|
|
|
void Sphere_f(const CCommand& args);
|
|
|
|
void Capsule_f(const CCommand& args);
|
2022-05-16 21:15:25 +02:00
|
|
|
#endif // !DEDICATED
|
2022-07-30 00:54:33 +02:00
|
|
|
void BHit_f(const CCommand& args);
|
2022-08-13 12:57:52 +02:00
|
|
|
|
|
|
|
void CVHelp_f(const CCommand& args);
|
2022-08-13 12:39:57 +02:00
|
|
|
void CVList_f(const CCommand& args);
|
|
|
|
void CVDiff_f(const CCommand& args);
|
2022-08-13 13:06:30 +02:00
|
|
|
void CVFlag_f(const CCommand& args);
|
2023-02-06 23:01:53 +01:00
|
|
|
#ifndef CLIENT_DLL
|
2023-01-16 15:52:33 +01:00
|
|
|
void CC_CreateFakePlayer_f(const CCommand& args);
|
2023-02-06 23:01:53 +01:00
|
|
|
#endif // !CLIENT_DLL
|
2022-04-14 19:18:59 +02:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2022-05-13 14:53:25 +02:00
|
|
|
class VCallback : public IDetour
|
2022-04-14 19:18:59 +02:00
|
|
|
{
|
|
|
|
virtual void GetAdr(void) const
|
|
|
|
{
|
2024-01-02 15:21:36 +01:00
|
|
|
LogFunAdr("SetupGamemode", v_SetupGamemode);
|
|
|
|
LogFunAdr("DownloadPlaylist_f", v__DownloadPlaylists_f);
|
|
|
|
LogFunAdr("Cmd_Exec_f", v__Cmd_Exec_f);
|
2022-04-14 19:18:59 +02:00
|
|
|
}
|
2022-04-18 03:35:08 +02:00
|
|
|
virtual void GetFun(void) const
|
|
|
|
{
|
2024-01-02 15:21:36 +01:00
|
|
|
g_GameDll.FindPatternSIMD("40 53 48 83 EC 20 48 8B D9 48 C7 C0 ?? ?? ?? ??").GetPtr(v_SetupGamemode);
|
|
|
|
g_GameDll.FindPatternSIMD("33 C9 C6 05 ?? ?? ?? ?? ?? E9 ?? ?? ?? ??").GetPtr(v__DownloadPlaylists_f);
|
|
|
|
g_GameDll.FindPatternSIMD("40 55 53 48 8D AC 24 ?? ?? ?? ?? B8 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 2B E0 48 8B D9").GetPtr(v__Cmd_Exec_f);
|
2022-04-18 03:35:08 +02:00
|
|
|
}
|
2022-04-14 19:18:59 +02:00
|
|
|
virtual void GetVar(void) const { }
|
|
|
|
virtual void GetCon(void) const { }
|
2023-11-26 13:21:20 +01:00
|
|
|
virtual void Detour(const bool bAttach) const;
|
2022-04-14 19:18:59 +02:00
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|