Sig fix+offsets, and flto
This commit is contained in:
parent
dd51504a76
commit
d1d7af4f60
@ -163,9 +163,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-march=native -rdynamic -ggdb -Og")
|
||||
if (Internal_Symbolized)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -ggdb -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -flto=auto -ggdb -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -s -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -flto=auto -s -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
endif()
|
||||
if (Force_CXX_23B)
|
||||
set(CMAKE_CXX_FLAGS "-std=gnu++2b ${CMAKE_CXX_FLAGS}")
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "reclasses.hpp"
|
||||
#include "e8call.hpp"
|
||||
|
||||
#define CTF_PLR_SHRD 6356
|
||||
namespace re
|
||||
{
|
||||
|
||||
@ -12,7 +13,7 @@ public:
|
||||
// Convert IClientEntity to CTFPlayerShared
|
||||
inline static CTFPlayerShared *GetPlayerShared(IClientEntity *ent)
|
||||
{
|
||||
return (CTFPlayerShared *) (((uintptr_t) ent) + 0x17cc);
|
||||
return (CTFPlayerShared *) (((uintptr_t) ent) + CTF_PLR_SHRD);
|
||||
}
|
||||
inline static bool IsDominatingPlayer(CTFPlayerShared *self, int ent_idx)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <sstream>
|
||||
|
||||
#include <steam/isteamclient.h>
|
||||
|
||||
#define GAME_PTR_OFFSET 11815160
|
||||
// class ISteamFriends002;
|
||||
|
||||
IVModelRender *g_IVModelRender = nullptr;
|
||||
@ -164,8 +164,8 @@ void CreateInterfaces()
|
||||
uintptr_t sig = gSignatures.GetClientSignature("A3 ? ? ? ? C3 8D 74 26 00 B8 FF FF FF FF 5D A3 ? ? ? ? C3");
|
||||
g_PredictionRandomSeed = *reinterpret_cast<int **>(sig + (uintptr_t) 1);
|
||||
|
||||
uintptr_t g_pGameRules_sig = gSignatures.GetClientSignature("C7 03 ? ? ? ? 89 1D ? ? ? ? 83 C4 14 5B 5D C3");
|
||||
rg_pGameRules = *reinterpret_cast<CGameRules ***>(g_pGameRules_sig + 8);
|
||||
uintptr_t g_pGameRules_sig = CSignature::GetClientSignature("55 89 E5 53 83 EC 14 8B 5D ? C7 44 24 ? ? ? ? ? 89 1C 24 E8 ? ? ? ? C7 03 ? ? ? ? C7 43 ?");
|
||||
rg_pGameRules = *reinterpret_cast<CGameRules ***>(g_pGameRules_sig + GAME_PTR_OFFSET);
|
||||
}
|
||||
g_IMaterialSystem = BruteforceInterface<IMaterialSystemFixed>("VMaterialSystem", sharedobj::materialsystem());
|
||||
g_IMDLCache = BruteforceInterface<IMDLCache>("MDLCache", sharedobj::datacache());
|
||||
|
@ -15,7 +15,8 @@
|
||||
#include "NavBot.hpp"
|
||||
#include "HookTools.hpp"
|
||||
#include "teamroundtimer.hpp"
|
||||
|
||||
// Found in C_BasePlayer. It represents "m_pCurrentCommand"
|
||||
#define CURR_CUSERCMD_PTR 4452
|
||||
#include "HookedMethods.hpp"
|
||||
#include "nospread.hpp"
|
||||
#include "Warp.hpp"
|
||||
@ -62,7 +63,7 @@ void RunEnginePrediction(IClientEntity *ent, CUserCmd *ucmd)
|
||||
}
|
||||
|
||||
// Set Usercmd for prediction
|
||||
NET_VAR(ent, 4188, CUserCmd *) = ucmd;
|
||||
NET_VAR(ent, CURR_CUSERCMD_PTR, CUserCmd *) = ucmd;
|
||||
|
||||
// Set correct CURTIME
|
||||
g_GlobalVars->curtime = g_GlobalVars->interval_per_tick * NET_INT(ent, netvar.nTickBase);
|
||||
@ -78,7 +79,7 @@ void RunEnginePrediction(IClientEntity *ent, CUserCmd *ucmd)
|
||||
g_IGameMovement->FinishTrackPredictionErrors(reinterpret_cast<CBasePlayer *>(ent));
|
||||
|
||||
// Reset User CMD
|
||||
NET_VAR(ent, 4188, CUserCmd *) = nullptr;
|
||||
NET_VAR(ent, CURR_CUSERCMD_PTR, CUserCmd *) = nullptr;
|
||||
|
||||
g_GlobalVars->frametime = frameTime;
|
||||
g_GlobalVars->curtime = curTime;
|
||||
|
@ -8,7 +8,8 @@
|
||||
#include "navparser.hpp"
|
||||
#include <settings/Bool.hpp>
|
||||
#include <boost/circular_buffer.hpp>
|
||||
|
||||
// Found in C_BasePlayer. It represents "m_pCurrentCommand"
|
||||
#define CURR_CUSERCMD_PTR 4452
|
||||
namespace hacks::shared::aimbot
|
||||
{
|
||||
extern settings::Boolean engine_projpred;
|
||||
@ -458,9 +459,9 @@ Vector EnginePrediction(CachedEntity *entity, float time, Vector *vecVelocity)
|
||||
// static Vector zerov{ 0, 0, 0 };
|
||||
// CE_VECTOR(entity, netvar.m_angEyeAngles) = zerov;
|
||||
|
||||
CUserCmd *original_cmd = NET_VAR(ent, 4188, CUserCmd *);
|
||||
CUserCmd *original_cmd = NET_VAR(ent, CURR_CUSERCMD_PTR, CUserCmd *);
|
||||
|
||||
NET_VAR(ent, 4188, CUserCmd *) = &fakecmd;
|
||||
NET_VAR(ent, CURR_CUSERCMD_PTR, CUserCmd *) = &fakecmd;
|
||||
|
||||
g_GlobalVars->curtime = g_GlobalVars->interval_per_tick * NET_INT(ent, netvar.nTickBase);
|
||||
g_GlobalVars->frametime = time;
|
||||
@ -486,7 +487,7 @@ Vector EnginePrediction(CachedEntity *entity, float time, Vector *vecVelocity)
|
||||
oFinishMove(g_IPrediction, ent, &fakecmd, pMoveData.get());
|
||||
g_IGameMovement->FinishTrackPredictionErrors(reinterpret_cast<CBasePlayer *>(ent));
|
||||
|
||||
NET_VAR(ent, 4188, CUserCmd *) = original_cmd;
|
||||
NET_VAR(ent, CURR_CUSERCMD_PTR, CUserCmd *) = original_cmd;
|
||||
|
||||
g_GlobalVars->frametime = frameTime;
|
||||
g_GlobalVars->curtime = curTime;
|
||||
|
Reference in New Issue
Block a user