Remove dead code

This commit is contained in:
TotallyNotElite 2019-03-17 18:32:31 +01:00
parent e5f6abcd8e
commit 9b84271d9d
4 changed files with 2 additions and 92 deletions

View File

@ -131,14 +131,6 @@ void CreateInterfaces()
g_IPrediction = BruteforceInterface<IPrediction>("VClientPrediction", sharedobj::client());
g_IGameMovement = BruteforceInterface<IGameMovement>("GameMovement", sharedobj::client());
IF_GAME(IsTF2())
{
// g_IMoveHelper =
// *(reinterpret_cast<IMoveHelper**>(gSignatures.GetClientSignature("? ?
// ? ? 8B 10 89 04 24 FF 52 28 0F B7 CF 8B 10 89 4C 24 04 89 04 24 FF 52
// 1C 8B 13 89 1C 24 89 44 24 04 FF 92 74 05 00 00 8D 95 C8 FE FF FF C7
// 44 24 08 00 00 00 00")));
}
IF_GAME(IsTF2())
{
g_IInput = **(reinterpret_cast<IInput ***>((uintptr_t) 1 + gSignatures.GetClientSignature("A1 ? ? ? ? C6 05 ? ? ? ? 01 8B 10 89 04 24 FF "
"92 B4 00 00 00 A1 ? ? ? ? 8B 10")));
@ -169,17 +161,6 @@ void CreateInterfaces()
uintptr_t g_pGameRules_sig = gSignatures.GetClientSignature("C7 03 ? ? ? ? 89 1D ? ? ? ? 83 C4 14 5B 5D C3");
g_pGameRules = *reinterpret_cast<CGameRules **>(g_pGameRules_sig + 8);
}
IF_GAME(IsTF2())
{
/*
uintptr_t gcsystem_sig = gSignatures.GetClientSignature("E8 ? ? ? ? C7
44 24 04 04 00 00 00 89 04 24 E8 ? ? ? ? E9 17 FF FF FF") + 1; typedef
TFGCClientSystem*(*func_t)(void); logging::Info("GCSystem = 0x%08x",
gcsystem_sig); uintptr_t gcc_p = *(uintptr_t*)(gcsystem_sig); func_t
get_gc = (gcc_p + gcsystem_sig + 4); logging::Info("GTFGCClientSystem()
= 0x%08x", get_gc); g_TFGCClientSystem = get_gc();
*/
}
g_IMaterialSystem = BruteforceInterface<IMaterialSystemFixed>("VMaterialSystem", sharedobj::materialsystem());
#if ENABLE_VISUALS

View File

@ -454,29 +454,3 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time, CUs
return ret;
}
} // namespace hooked_methods
/*float o_curtime;
float o_frametime;
void Start() {
g_IGameMovement->StartTrackPredictionErrors((CBasePlayer*)(RAW_ENT(LOCAL_E)));
IClientEntity* player = RAW_ENT(LOCAL_E);
// CPredictableId::ResetInstanceCounters();
*(reinterpret_cast<CUserCmd*>(reinterpret_cast<uintptr_t>(player) + 1047)) =
current_user_cmd; o_curtime = g_GlobalVars->curtime; o_frametime =
g_GlobalVars->frametime; *g_PredictionRandomSeed =
MD5_PseudoRandom(current_user_cmd->command_number) & 0x7FFFFFFF;
g_GlobalVars->curtime
= CE_INT(LOCAL_E, netvar.nTickBase) * g_GlobalVars->interval_per_tick;
g_GlobalVars->frametime = g_GlobalVars->interval_per_tick;
CMoveData data;
}
void End() {
*g_PredictionRandomSeed = -1;
g_GlobalVars->curtime = o_curtime;
g_GlobalVars->frametime = o_frametime;
}*/

View File

@ -31,9 +31,6 @@ CatCommand join("mm_join", "Join mm Match", []() {
void *pure_orig = nullptr;
void **pure_addr = nullptr;
// static CatVar disable_ban_tf(CV_SWITCH, "disable_mm_ban", "0", "Disable MM
// ban", "Disable matchmaking ban");
bool replaced = false;
namespace hooked_methods
{
@ -80,34 +77,13 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_, unsigned int pane
#if not ENABLE_VISUALS
if (checkmmban.test_and_set(1000))
{
if (tfmm::isMMBanned())
{
*(int *) nullptr = 0;
if (tfmm::isMMBanned())
exit(1);
}
*(int *) nullptr = 0;
}
#endif
/*
static bool replacedban = false;
if (disable_ban_tf && !replacedban)
{
static unsigned char patch[] = { 0x31, 0xe0 };
static unsigned char patch2[] = { 0xb0, 0x01, 0x90 };
uintptr_t addr = gSignatures.GetClientSignature("31 C0 5B 5E 5F 5D C3 8D
B6 00 00 00 00 BA");
uintptr_t addr2 = gSignatures.GetClientSignature("0F 92 C0 83 C4 ? 5B 5E
5F 5D C3 8D B4 26 00 00 00 00 83 C4");
if (addr && addr2)
{
logging::Info("MM Banned: 0x%08x, 0x%08x", addr, addr2);
Patch((void*) addr, (void *) patch, sizeof(patch));
Patch((void*) addr2, (void *) patch2, sizeof(patch2));
replacedban = true;
}
else
logging::Info("No disable ban Signature");
}*/
if (no_reportlimit && !replaced)
{
static BytePatch no_report_limit(gSignatures.GetClientSignature, "55 89 E5 57 56 53 81 EC ? ? ? ? 8B 5D ? 8B 7D ? 89 D8", 0x75, { 0xB8, 0x01, 0x00, 0x00, 0x00 });
@ -146,19 +122,6 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_, unsigned int pane
if (software_cursor->GetBool())
software_cursor->SetValue(0);
break;
#if ENABLE_GUI
/*
case 3:
if (cur != g_pGUI->Visible()) {
software_cursor->SetValue(g_pGUI->Visible());
}
break;
case 4:
if (cur == g_pGUI->Visible()) {
software_cursor->SetValue(!g_pGUI->Visible());
}
*/
#endif
}
}
if (call_default)
@ -201,9 +164,6 @@ DEFINE_HOOKED_METHOD(PaintTraverse, void, vgui::IPanel *this_, unsigned int pane
if (clean_screenshots && g_IEngine->IsTakingScreenshot())
return;
#if ENABLE_GUI
// FIXME
#endif
draw::UpdateWTS();
}
} // namespace hooked_methods

View File

@ -13,11 +13,6 @@ bool *allowSecureServers{ nullptr };
void EXPOSED_Epic_VACBypass_1337_DoNotSteal_xXx_$1_xXx_MLG()
{
// Does not work
// ((ICommandLine*(*)(void))dlsym(sharedobj::tier0().lmap,
// "CommandLine_Tier0"))()->RemoveParm("-textmode");
// ((ICommandLine*(*)(void))dlsym(sharedobj::tier0().lmap,
// "CommandLine_Tier0"))()->RemoveParm("-insecure");
uintptr_t Host_IsSecureServerAllowed_addr = gSignatures.GetEngineSignature("55 89 E5 83 EC ? E8 ? ? ? ? 8B 10 C7 44 24 ? ? ? ? ? 89 04 24 FF 52 ? 85 C0 74 ? C6 05");
// +0x21 = allowSecureServers
// logging::Info("1337 VAC bypass: 0x%08x",