Initial support for S1

This commit is contained in:
Amos 2022-01-05 22:56:49 +01:00
parent 7c3994dfc2
commit d52bd5eeec
15 changed files with 90 additions and 22 deletions

View File

@ -9,6 +9,9 @@
#include "materialsystem/materialsystem.h" #include "materialsystem/materialsystem.h"
#include "bsplib/bsplib.h" #include "bsplib/bsplib.h"
#include "ebisusdk/EbisuSDK.h" #include "ebisusdk/EbisuSDK.h"
#ifndef DEDICATED
#include "milessdk/win64_rrthreads.h"
#endif // !DEDICATED
#ifdef DEDICATED #ifdef DEDICATED
@ -127,13 +130,12 @@ void Dedicated_Init()
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// RUNTIME: EBISUSDK // RUNTIME: EBISUSDK
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
p_EbisuSDK_SetState.Offset(0x0E).Patch({ 0xE9, 0xCB, 0x03, 0x00, 0x00 }); // JNZ --> JMP | Prevent EbisuSDK from initializing on the engine and server. p_EbisuSDK_SetState.Offset(0x0).FindPatternSelf("0F 84", ADDRESS::Direction::DOWN).Patch({ 0x0F, 0x85 }); // JE --> JNZ | Prevent EbisuSDK from initializing on the engine and server.
p_EbisuSDK_Init_Tier0.Offset(0x0B).Patch({ 0xE9, 0x63, 0x02, 0x00, 0x00, 0x00 }); // JNZ --> JMP | Prevent EbisuSDK from initializing on the engine and server.
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// RUNTIME: FAIRFIGHT // RUNTIME: FAIRFIGHT
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
FairFight_Init.Offset(0x61).Patch({ 0xE9, 0xED, 0x00, 0x00, 0x00, 0x00 }); FairFight_Init.Offset(0x0).FindPatternSelf("0F 87", ADDRESS::Direction::DOWN, 200).Patch({ 0x0F, 0x85 }); // JA --> JNZ | Prevent 'FairFight' anti-cheat from initializing on the server by comparing RAX against 0x0 instead. Init will crash since the plugins aren't shipped.
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// RUNTIME: BSP_LUMP // RUNTIME: BSP_LUMP
@ -171,14 +173,10 @@ void Dedicated_Init()
void RuntimePtc_Init() /* .TEXT */ void RuntimePtc_Init() /* .TEXT */
{ {
SCR_BeginLoadingPlaque.Offset(0x1D6).Patch({ 0xEB, 0x27 }); // JNE --> JMP | Prevent connect command from crashing by invalid call to UI function. #ifndef DEDICATED
//------------------------------------------------------------------------- p_WASAPI_GetAudioDevice.Offset(0x420).FindPattern("FF 15", ADDRESS::Direction::DOWN, 100).Patch({ 0x90, 0x90, 0x90, 0x90, 0x90, 0x90 }); // CAL --> NOP | Disable debugger check when miles searches for audio device to allow attaching the debugger to the game upon launch.
// JNE --> JMP | Allow games to be loaded without the optional texture streaming file FairFight_Init.Offset(0x0).FindPatternSelf("0F 87", ADDRESS::Direction::DOWN, 200).Patch({ 0x0F, 0x85 }); // JA --> JNZ | Prevent 'FairFight' anti-cheat from initializing on the server by comparing RAX against 0x0 instead. Init will crash since the plugins aren't shipped.
//WriteProcessMemory(GameProcess, LPVOID(dst002 + 0x8E5), "\xEB\x19", 2, NULL); #endif // !DEDICATED
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// JA --> JMP | Prevent FairFight anti-cheat from initializing on the server.
FairFight_Init.Offset(0x61).Patch({ 0xE9, 0xED, 0x00, 0x00, 0x00, 0x00 });
} }
void RuntimePtc_Toggle() /* .TEXT */ void RuntimePtc_Toggle() /* .TEXT */

View File

@ -79,12 +79,26 @@ namespace
ADDRESS CStudioRenderContext__LoadModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x4C\x89\x44\x24\x00\x48\x89\x54\x24\x00\x48\x89\x4C\x24\x00\x53\x55\x56\x57\x48\x83\xEC\x78", "xxxx?xxxx?xxxx?xxxxxxxx"); ADDRESS CStudioRenderContext__LoadModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x4C\x89\x44\x24\x00\x48\x89\x54\x24\x00\x48\x89\x4C\x24\x00\x53\x55\x56\x57\x48\x83\xEC\x78", "xxxx?xxxx?xxxx?xxxxxxxx");
#endif// 0x1404554C0 // 4C 89 44 24 ? 48 89 54 24 ? 48 89 4C 24 ? 53 55 56 57 48 83 EC 78 // #endif// 0x1404554C0 // 4C 89 44 24 ? 48 89 54 24 ? 48 89 4C 24 ? 53 55 56 57 48 83 EC 78 //
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
ADDRESS CStudioRenderContext__LoadMaterials = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x4C\x89\x44\x24\x00\x55\x56\x41\x57", "xxxx?xxxx");
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
ADDRESS CStudioRenderContext__LoadMaterials = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\xC4\x4C\x89\x40\x18\x55\x56\x41\x55", "xxxxxxxxxxx"); ADDRESS CStudioRenderContext__LoadMaterials = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\xC4\x4C\x89\x40\x18\x55\x56\x41\x55", "xxxxxxxxxxx");
// 0x140456B50 // 48 8B C4 4C 89 40 18 55 56 41 55 // #endif// 0x140456B50 // 48 8B C4 4C 89 40 18 55 56 41 55 //
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// CMODELLOADER // CMODELLOADER
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
ADDRESS CModelLoader__FindModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x55\x41\x55\x41\x56\x48\x8D\xAC\x24\x00\x00\x00\x00", "xxxxxxxxxx????");
// 0x1402A1F10 // 40 55 41 55 41 56 48 8D AC 24 ? ? ? ? //
ADDRESS CModelLoader__LoadModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x53\x57\x41\x56\x48\x81\xEC\x00\x00\x00\x00\x48\x8B\xFA", "xxxxxxxx????xxx");
// 0x1402A23B0 // 40 53 57 41 56 48 81 EC ? ? ? ? 48 8B FA //
ADDRESS CModelLoader__Studio_LoadModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x89\x5C\x24\x00\x55\x56\x57\x41\x54\x41\x56\x48\x8D\xAC\x24\x00\x00\x00\x00", "xxxx?xxxxxxxxxxx????");
// 0x140252F10 // 48 89 5C 24 ? 55 56 57 41 54 41 57 48 81 EC ? ? ? ? //
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
ADDRESS CModelLoader__FindModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x55\x41\x57\x48\x83\xEC\x48\x80\x3A\x2A", "xxxxxxxxxxx"); ADDRESS CModelLoader__FindModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x55\x41\x57\x48\x83\xEC\x48\x80\x3A\x2A", "xxxxxxxxxxx");
// 0x140253530 // 40 55 41 57 48 83 EC 48 80 3A 2A // // 0x140253530 // 40 55 41 57 48 83 EC 48 80 3A 2A //
@ -93,18 +107,26 @@ namespace
ADDRESS CModelLoader__Studio_LoadModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x89\x5C\x24\x00\x55\x56\x57\x41\x54\x41\x57\x48\x81\xEC\x00\x00\x00\x00", "xxxx?xxxxxxxxxx????"); ADDRESS CModelLoader__Studio_LoadModel = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x89\x5C\x24\x00\x55\x56\x57\x41\x54\x41\x57\x48\x81\xEC\x00\x00\x00\x00", "xxxx?xxxxxxxxxx????");
// 0x140252F10 // 48 89 5C 24 ? 55 56 57 41 54 41 57 48 81 EC ? ? ? ? // // 0x140252F10 // 48 89 5C 24 ? 55 56 57 41 54 41 57 48 81 EC ? ? ? ? //
#endif
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// CGAMESERVER // CGAMESERVER
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
ADDRESS CGameServer__SpawnServer = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x53\x55\x56\x57\x41\x55\x41\x56\x41\x57\x48\x81\xEC\x00\x00\x00\x00", "xxxxxxxxxxxxxx????");
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
ADDRESS CGameServer__SpawnServer = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\xC4\x53\x55\x56\x57\x41\x54\x41\x55\x41\x57", "xxxxxxxxxxxxx"); ADDRESS CGameServer__SpawnServer = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\xC4\x53\x55\x56\x57\x41\x54\x41\x55\x41\x57", "xxxxxxxxxxxxx");
// 0x140312D80 // 48 8B C4 53 55 56 57 41 54 41 55 41 57 // // 0x140312D80 // 48 8B C4 53 55 56 57 41 54 41 55 41 57 //
#endif
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// RUNTIME: FAIRFIGHT // RUNTIME: FAIRFIGHT
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
ADDRESS FairFight_Init = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x53\x57\x41\x57\x48\x83\xEC\x30\x8B\x81\x00\x00\x00\x00", "xxxxxxxxxxx????");
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
ADDRESS FairFight_Init = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x53\x48\x83\xEC\x20\x8B\x81\xB0\x03\x00\x00\x48\x8B\xD9\xC6", "xxxxxxxxxxxxxxxx"); ADDRESS FairFight_Init = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x53\x48\x83\xEC\x20\x8B\x81\xB0\x03\x00\x00\x48\x8B\xD9\xC6", "xxxxxxxxxxxxxxxx");
// 0x140303AE0 // 40 53 48 83 EC 20 8B 81 ? ? ? ? 48 8B D9 C6 81 ? ? ? ? ? // #endif // 0x140303AE0 // 40 53 48 83 EC 20 8B 81 ? ? ? ? 48 8B D9 C6 81 ? ? ? ? ? //
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// RUNTIME: HOST_INIT // RUNTIME: HOST_INIT
@ -133,8 +155,14 @@ namespace
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// RUNTIME: GL_SCREEN // RUNTIME: GL_SCREEN
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
ADDRESS SCR_BeginLoadingPlaque = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x89\x5C\x24\x00\x48\x89\x74\x24\x00\x57\x48\x83\xEC\x30\x0F\x29\x74\x24\x00\x48\x8B\xF9", "xxxx?xxxx?xxxxxxxxx?xxx");
// 0x14022A4A0 // 48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 30 0F 29 74 24 ? 48 8B F9 //
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
ADDRESS SCR_BeginLoadingPlaque = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x83\xEC\x38\x0F\x29\x74\x24\x00\x48\x89\x5C\x24\x00", "xxxxxxxx?xxxx?"); ADDRESS SCR_BeginLoadingPlaque = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x83\xEC\x38\x0F\x29\x74\x24\x00\x48\x89\x5C\x24\x00", "xxxxxxxx?xxxx?");
// 0x14022A4A0 // 48 83 EC 38 0F 29 74 24 ? 48 89 5C 24 ? // // 0x14022A4A0 // 48 83 EC 38 0F 29 74 24 ? 48 89 5C 24 ? //
#endif
} }
} }

View File

@ -17,6 +17,9 @@
#include "common/opcodes.h" #include "common/opcodes.h"
#include "launcher/IApplication.h" #include "launcher/IApplication.h"
#include "ebisusdk/EbisuSDK.h" #include "ebisusdk/EbisuSDK.h"
#ifndef DEDICATED
#include "milessdk/win64_rrthreads.h"
#endif // !DEDICATED
#include "vphysics/QHull.h" #include "vphysics/QHull.h"
#include "bsplib/bsplib.h" #include "bsplib/bsplib.h"
#ifndef DEDICATED #ifndef DEDICATED

View File

@ -22,7 +22,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void HNET_ShutDown(void* thisptr, const char* szReason, std::uint8_t a1, char a2) void HNET_ShutDown(void* thisptr, const char* szReason, std::uint8_t a1, char a2)
{ {
#ifndef GAMEDLL_S1 // TODO
DownloadPlaylists_f_CompletionFunc(); // Re-load playlist from disk after getting disconnected from the server. DownloadPlaylists_f_CompletionFunc(); // Re-load playlist from disk after getting disconnected from the server.
#endif
NET_Shutdown(thisptr, szReason, a1, a2); NET_Shutdown(thisptr, szReason, a1, a2);
} }
@ -181,4 +183,4 @@ void CNetChan_Trace_Detach()
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
std::string g_szNetKey = "WDNWLmJYQ2ZlM0VoTid3Yg=="; std::string g_szNetKey = "WDNWLmJYQ2ZlM0VoTid3Yg==";
std::uintptr_t g_pNetKey = g_mGameDll.StringSearch("client:NetEncryption_NewKey").FindPatternSelf("48 8D ? ? ? ? ? 48 3B", ADDRESS::Direction::UP, 150).ResolveRelativeAddressSelf(0x3, 0x7).GetPtr(); std::uintptr_t g_pNetKey = g_mGameDll.StringSearch("client:NetEncryption_NewKey").FindPatternSelf("48 8D ? ? ? ? ? 48 3B", ADDRESS::Direction::UP, 300).ResolveRelativeAddressSelf(0x3, 0x7).GetPtr();

View File

@ -7,7 +7,7 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
int HSys_Error_Internal(char* fmt, va_list args) int HSys_Error_Internal(char* fmt, va_list args)
{ {
printf("\n_____________________________________________________________\n"); printf("\n______________________________________________________________\n");
printf("] ENGINE ERROR ################################################\n"); printf("] ENGINE ERROR ################################################\n");
vprintf(fmt, args); vprintf(fmt, args);

View File

@ -3,10 +3,14 @@
namespace namespace
{ {
#if defined (GAMEDLL_S1) || defined (GAMEDLL_S1)
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
/* ==== CAPPSYSTEMGROUP ================================================================================================================================================= */ /* ==== CAPPSYSTEMGROUP ================================================================================================================================================= */
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
ADDRESS p_IAppSystem_Main = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x83\xEC\x28\x80\xB9\x00\x00\x00\x00\x00\x48\x8B\x15\x00\x00\x00\x00", "xxxxxx?????xxx????");
void* (*IAppSystem_Main)(void* a1, void* a2) = (void* (*)(void*, void*))p_IAppSystem_Main.GetPtr(); /*48 83 EC 28 80 B9 ?? ?? ?? ?? ?? 48 8B 15 ?? ?? ?? ?? */
ADDRESS p_IAppSystem_Create = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\xC4\x57\x41\x54\x41\x55\x41\x56\x41\x57\x48\x83\xEC\x60\x48\xC7\x40\x00\x00\x00\x00\x00\x48\x89\x58\x08", "xxxxxxxxxxxxxxxxxxx?????xxxx");
bool (*IAppSystem_Create)(void* a1) = (bool(*)(void*))p_IAppSystem_Create.GetPtr(); /*48 8B C4 57 41 54 41 55 41 56 41 57 48 83 EC 60 48 C7 40 ?? ?? ?? ?? ?? 48 89 58 08*/
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
ADDRESS p_IAppSystem_Main = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x53\x48\x83\xEC\x20\x80\xB9\x00\x00\x00\x00\x00\xBB\x00\x00\x00\x00", "xxxxxxxx?????x????"); ADDRESS p_IAppSystem_Main = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x40\x53\x48\x83\xEC\x20\x80\xB9\x00\x00\x00\x00\x00\xBB\x00\x00\x00\x00", "xxxxxxxx?????x????");
void* (*IAppSystem_Main)(void* a1, void* a2) = (void* (*)(void*, void*))p_IAppSystem_Main.GetPtr(); /*40 53 48 83 EC 20 80 B9 ?? ?? ?? ?? ?? BB ?? ?? ?? ??*/ void* (*IAppSystem_Main)(void* a1, void* a2) = (void* (*)(void*, void*))p_IAppSystem_Main.GetPtr(); /*40 53 48 83 EC 20 80 B9 ?? ?? ?? ?? ?? BB ?? ?? ?? ??*/

View File

@ -0,0 +1,21 @@
#pragma once
namespace
{
/* ==== WASAPI THREAD SERVICE =========================================================================================================================================== */
ADDRESS p_WASAPI_GetAudioDevice = g_mRadAudioSystemDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\xC4\x48\x89\x58\x20\x55\x56\x41\x54", "xxxxxxxxxxx");
// 0x18005AD10 // 48 8B C4 48 89 58 20 55 56 41 54 //
}
///////////////////////////////////////////////////////////////////////////////
class HWASAPIServiceThread : public IDetour
{
virtual void debugp()
{
std::cout << "| FUN: WASAPI_GetAudioDevice : 0x" << std::hex << std::uppercase << p_WASAPI_GetAudioDevice.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
};
///////////////////////////////////////////////////////////////////////////////
REGISTER(HWASAPIServiceThread);

View File

@ -145,6 +145,7 @@
<ClInclude Include="mathlib\IceKey.H" /> <ClInclude Include="mathlib\IceKey.H" />
<ClInclude Include="mathlib\parallel_for.h" /> <ClInclude Include="mathlib\parallel_for.h" />
<ClInclude Include="mathlib\vector.h" /> <ClInclude Include="mathlib\vector.h" />
<ClInclude Include="milessdk\win64_rrthreads.h" />
<ClInclude Include="networksystem\r5net.h" /> <ClInclude Include="networksystem\r5net.h" />
<ClInclude Include="networksystem\serverlisting.h" /> <ClInclude Include="networksystem\serverlisting.h" />
<ClInclude Include="networksystem\sm_protocol.h" /> <ClInclude Include="networksystem\sm_protocol.h" />

View File

@ -124,6 +124,9 @@
<Filter Include="sdk\materialsystem"> <Filter Include="sdk\materialsystem">
<UniqueIdentifier>{55bb4f60-5f5a-4780-a7a2-b3db51c53680}</UniqueIdentifier> <UniqueIdentifier>{55bb4f60-5f5a-4780-a7a2-b3db51c53680}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="sdk\milessdk">
<UniqueIdentifier>{f52dfb17-f5bd-4258-91a2-500587bee708}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="client\client.cpp"> <ClCompile Include="client\client.cpp">
@ -856,6 +859,7 @@
</ClInclude> </ClInclude>
<ClInclude Include="engine\debugoverlay.h"> <ClInclude Include="engine\debugoverlay.h">
<Filter>sdk\engine</Filter> <Filter>sdk\engine</Filter>
<ClInclude Include="milessdk\win64_rrthreads.h">
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -66,4 +66,4 @@ void IVEngineServer_Detach()
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
bool g_bIsPersistenceVarSet[128]; bool g_bIsPersistenceVarSet[MAX_PLAYERS];

View File

@ -14,7 +14,7 @@ void IVEngineServer_Attach();
void IVEngineServer_Detach(); void IVEngineServer_Detach();
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
extern bool g_bIsPersistenceVarSet[128]; extern bool g_bIsPersistenceVarSet[MAX_PLAYERS];
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class HVEngineServer : public IDetour class HVEngineServer : public IDetour

View File

@ -99,6 +99,7 @@ void IConVar_InitConVar()
cm_debug_cmdquery = IConVar_RegisterConVar("cm_debug_cmdquery", "0", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Prints the flags of each ConVar/ConCommand query to the console ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr); cm_debug_cmdquery = IConVar_RegisterConVar("cm_debug_cmdquery", "0", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Prints the flags of each ConVar/ConCommand query to the console ( !slower! ).", false, 0.f, false, 0.f, nullptr, nullptr);
cm_return_false_cmdquery_all = IConVar_RegisterConVar("cm_return_false_cmdquery_all", "0", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Returns false on every ConVar/ConCommand query ( !warning! ).", false, 0.f, false, 0.f, nullptr, nullptr); cm_return_false_cmdquery_all = IConVar_RegisterConVar("cm_return_false_cmdquery_all", "0", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Returns false on every ConVar/ConCommand query ( !warning! ).", false, 0.f, false, 0.f, nullptr, nullptr);
cm_return_false_cmdquery_cheats = IConVar_RegisterConVar("cm_return_false_cmdquery_cheats", "0", FCVAR_RELEASE, "Returns false on all FCVAR_DEVELOPMENTONLY and FCVAR_CHEAT ConVar/ConCommand queries ( !warning! ).", false, 0.f, false, 0.f, nullptr, nullptr); cm_return_false_cmdquery_cheats = IConVar_RegisterConVar("cm_return_false_cmdquery_cheats", "0", FCVAR_RELEASE, "Returns false on all FCVAR_DEVELOPMENTONLY and FCVAR_CHEAT ConVar/ConCommand queries ( !warning! ).", false, 0.f, false, 0.f, nullptr, nullptr);
r_debug_overlay_nodecay = IConVar_RegisterConVar("r_debug_overlay_nodecay", "0", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Keeps all debug overlays alive regardless of their lifetime. Use command 'clear_debug_overlays' to clear everything.", false, 0.f, false, 0.f, nullptr, nullptr);
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// SERVER | // SERVER |
sv_showconnecting = IConVar_RegisterConVar("sv_showconnecting", "1", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Logs information about the connecting client to the console.", false, 0.f, false, 0.f, nullptr, nullptr); sv_showconnecting = IConVar_RegisterConVar("sv_showconnecting", "1", FCVAR_DEVELOPMENTONLY | FCVAR_CHEAT, "Logs information about the connecting client to the console.", false, 0.f, false, 0.f, nullptr, nullptr);

View File

@ -8,6 +8,7 @@
ConVar* cm_debug_cmdquery = new ConVar(); ConVar* cm_debug_cmdquery = new ConVar();
ConVar* cm_return_false_cmdquery_all = new ConVar(); ConVar* cm_return_false_cmdquery_all = new ConVar();
ConVar* cm_return_false_cmdquery_cheats = new ConVar(); ConVar* cm_return_false_cmdquery_cheats = new ConVar();
ConVar* r_debug_overlay_nodecay = new ConVar();
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// SERVER | // SERVER |
ConVar* sv_showconnecting = new ConVar(); ConVar* sv_showconnecting = new ConVar();

View File

@ -19,6 +19,7 @@ namespace
extern ConVar* cm_debug_cmdquery; extern ConVar* cm_debug_cmdquery;
extern ConVar* cm_return_false_cmdquery_all; extern ConVar* cm_return_false_cmdquery_all;
extern ConVar* cm_return_false_cmdquery_cheats; extern ConVar* cm_return_false_cmdquery_cheats;
extern ConVar* r_debug_overlay_nodecay;
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// SERVER | // SERVER |
extern ConVar* sv_showconnecting; extern ConVar* sv_showconnecting;
@ -34,7 +35,7 @@ extern ConVar* cl_consoleoverlay_offset_y;
extern ConVar* fs_warning_level_native; extern ConVar* fs_warning_level_native;
extern ConVar* fs_packedstore_entryblock_stats; extern ConVar* fs_packedstore_entryblock_stats;
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// FILESYSTEM | // MATERIALSYSTEM |
extern ConVar* mat_showdxoutput; extern ConVar* mat_showdxoutput;
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// SQUIRREL | // SQUIRREL |

View File

@ -8,11 +8,15 @@ namespace
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) #if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
ADDRESS p_CMatSystemSurface_Unknown0 = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\x0D\x00\x00\x00\x00\x48\x8B\x01\x48\xFF\xA0\x18\x01\x00\x00", "xxx????xxxxxxxxxx"); /*48 8B 0D ?? ?? ?? ?? 48 8B 01 48 FF A0 18 01 00 00*/ ADDRESS p_CMatSystemSurface_Unknown0 = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\x0D\x00\x00\x00\x00\x48\x8B\x01\x48\xFF\xA0\x18\x01\x00\x00", "xxx????xxxxxxxxxx"); /*48 8B 0D ?? ?? ?? ?? 48 8B 01 48 FF A0 18 01 00 00*/
std::int64_t(*CMatSystemSurface_Unknown0)() = (std::int64_t(*)())p_CMatSystemSurface_Unknown0.GetPtr(); // [ AMOS ] DELETE std::int64_t(*CMatSystemSurface_Unknown0)() = (std::int64_t(*)())p_CMatSystemSurface_Unknown0.GetPtr(); // [ AMOS ] DELETE
ADDRESS g_pMatSystemSurface = p_CHLClient_PostInit.Offset(0x0).ResolveRelativeAddressSelf(0x3, 0x8).GetPtr();
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3) #elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
ADDRESS p_CMatSystemSurface_Unknown0 = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\x0D\x00\x00\x00\x00\x48\x8B\x01\x48\xFF\xA0\x20\x01\x00\x00", "xxx????xxxxxxxxxx"); /*48 8B 0D ?? ?? ?? ?? 48 8B 01 48 FF A0 20 01 00 00*/ ADDRESS p_CMatSystemSurface_Unknown0 = g_mGameDll.FindPatternSIMD((std::uint8_t*)"\x48\x8B\x0D\x00\x00\x00\x00\x48\x8B\x01\x48\xFF\xA0\x20\x01\x00\x00", "xxx????xxxxxxxxxx"); /*48 8B 0D ?? ?? ?? ?? 48 8B 01 48 FF A0 20 01 00 00*/
void*(*CMatSystemSurface_Unknown0)() = (void*(*)())p_CMatSystemSurface_Unknown0.GetPtr(); // [ AMOS ] DELETE void*(*CMatSystemSurface_Unknown0)() = (void*(*)())p_CMatSystemSurface_Unknown0.GetPtr(); // [ AMOS ] DELETE
ADDRESS g_pMatSystemSurface = p_CHLClient_PostInit.Offset(0x0).FindPatternSelf("48 83 3D", ADDRESS::Direction::DOWN, 40).ResolveRelativeAddressSelf(0x3, 0x8).GetPtr();
#endif #endif
ADDRESS g_pMatSystemSurface = p_CHLClient_PostInit.FindPatternSelf("48 83 3D", ADDRESS::Direction::DOWN, 40).ResolveRelativeAddressSelf(0x3, 0x8).GetPtr();
} }
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////