mirror of
https://github.com/rei-2/Amalgam
synced 2026-10-10 04:43:09 +08:00
condense debug hook preprocessor & vars
This commit is contained in:
@@ -582,6 +582,8 @@ static void* s_pCTFGameStats = nullptr;
|
||||
MAKE_HOOK(CTFGameStats_FindPlayerStats, S::CTFGameStats_FindPlayerStats(), void*,
|
||||
void* rcx, CBasePlayer* pPlayer)
|
||||
{
|
||||
DEBUG_RETURN(CTFGameStats_FindPlayerStats, rcx, pPlayer);
|
||||
|
||||
s_pCTFGameStats = rcx;
|
||||
return CALL_ORIGINAL(rcx, pPlayer);
|
||||
}
|
||||
|
||||
@@ -617,10 +617,7 @@ void CVisuals::DrawHitboxes(int iStore)
|
||||
MAKE_HOOK(CBaseAnimating_DrawServerHitboxes, S::CBaseAnimating_DrawServerHitboxes(), void,
|
||||
void* rcx, float duration, bool monocolor)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_DrawServerHitboxes[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, duration, monocolor);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseAnimating_DrawServerHitboxes, rcx, duration, monocolor);
|
||||
|
||||
if (s_bBoxesHeadOnly)
|
||||
monocolor = false;
|
||||
@@ -631,10 +628,7 @@ MAKE_HOOK(CBaseAnimating_DrawServerHitboxes, S::CBaseAnimating_DrawServerHitboxe
|
||||
MAKE_HOOK(NDebugOverlay_BoxAngles, S::NDebugOverlay_BoxAngles(), void,
|
||||
Vector& origin, Vector& mins, Vector& maxs, QAngle& angles, int r, int g, int b, int a, float duration)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::NDebugOverlay_BoxAngles[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(origin, mins, maxs, angles, r, g, b, a, duration);
|
||||
#endif
|
||||
DEBUG_RETURN(NDebugOverlay_BoxAngles, origin, mins, maxs, angles, r, g, b, a, duration);
|
||||
|
||||
if (s_bBoxesHeadOnly)
|
||||
{
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CAchievementMgr_CheckAchievementsEnabled, "client.dll", "40 53 48
|
||||
MAKE_HOOK(CAchievementMgr_CheckAchievementsEnabled, S::CAchievementMgr_CheckAchievementsEnabled(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CAchievementMgr_CheckAchievementsEnabled[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CAchievementMgr_CheckAchievementsEnabled, rcx);
|
||||
|
||||
return !I::EngineClient->IsPlayingDemo();
|
||||
}
|
||||
@@ -11,10 +11,7 @@ static inline int ColorToInt(Color_t col)
|
||||
MAKE_HOOK(CAttributeManager_AttribHookInt, S::CAttributeManager_AttribHookInt(), int,
|
||||
int value, const char* name, void* econent, void* buffer, bool isGlobalConstString)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CAttributeManager_AttribHookInt[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(value, name, econent, buffer, isGlobalConstString);
|
||||
#endif
|
||||
DEBUG_RETURN(CAttributeManager_AttribHookInt, value, name, econent, buffer, isGlobalConstString);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CTFPlayer_FireEvent_AttribHookValue_Call();
|
||||
|
||||
@@ -8,10 +8,7 @@ MAKE_SIGNATURE(CBaseAnimating_Interpolate, "client.dll", "48 8B C4 48 89 70 ? F3
|
||||
MAKE_HOOK(CBaseAnimating_Interpolate, S::CBaseAnimating_Interpolate(), bool,
|
||||
void* rcx, float currentTime)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_Interpolate[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, currentTime);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseAnimating_Interpolate, rcx, currentTime);
|
||||
|
||||
if (rcx == H::Entities.GetLocal() ? F::Ticks.m_bRecharge : Vars::Visuals::Removals::Interpolation.Value)
|
||||
return true;
|
||||
|
||||
@@ -5,8 +5,5 @@ MAKE_SIGNATURE(CBaseAnimating_MaintainSequenceTransitions, "client.dll", "4C 89
|
||||
MAKE_HOOK(CBaseAnimating_MaintainSequenceTransitions, S::CBaseAnimating_MaintainSequenceTransitions(), void,
|
||||
void* rcx, void* boneSetup, float flCycle, Vec3 pos[], Vector4D q[])
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_MaintainSequenceTransitions[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, boneSetup, flCycle, pos, q);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseAnimating_MaintainSequenceTransitions, rcx, boneSetup, flCycle, pos, q);
|
||||
}
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CBaseAnimating_SetSequence, "client.dll", "40 53 48 83 EC ? 48 8B
|
||||
MAKE_HOOK(CBaseAnimating_SetSequence, S::CBaseAnimating_SetSequence(), void,
|
||||
void* rcx, int nSequence)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_SetSequence[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, nSequence);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseAnimating_SetSequence, rcx, nSequence);
|
||||
|
||||
auto pEntity = reinterpret_cast<CBaseAnimating*>(rcx);
|
||||
if (pEntity->m_nSequence() != nSequence && !pEntity->m_bSequenceLoops())
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CBaseAnimating_SetupBones, "client.dll", "48 8B C4 44 89 40 ? 48
|
||||
MAKE_HOOK(CBaseAnimating_SetupBones, S::CBaseAnimating_SetupBones(), bool,
|
||||
void* rcx, matrix3x4* pBoneToWorldOut, int nMaxBones, int boneMask, float currentTime)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_SetupBones[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pBoneToWorldOut, nMaxBones, boneMask, currentTime);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseAnimating_SetupBones, rcx, pBoneToWorldOut, nMaxBones, boneMask, currentTime);
|
||||
|
||||
if (!Vars::Misc::Game::SetupBonesOptimization.Value || F::Backtrack.IsSettingUpBones())
|
||||
return CALL_ORIGINAL(rcx, pBoneToWorldOut, nMaxBones, boneMask, currentTime);
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CBaseAnimating_UpdateClientSideAnimation, "client.dll", "48 89 5C
|
||||
MAKE_HOOK(CBaseAnimating_UpdateClientSideAnimation, S::CBaseAnimating_UpdateClientSideAnimation(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_UpdateClientSideAnimation[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseAnimating_UpdateClientSideAnimation, rcx);
|
||||
|
||||
auto pLocal = H::Entities.GetLocal();
|
||||
auto pPlayer = reinterpret_cast<CTFPlayer*>(rcx);
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CBaseEntity_BaseInterpolatePart1, "client.dll", "48 89 5C 24 ? 56
|
||||
MAKE_HOOK(CBaseEntity_BaseInterpolatePart1, S::CBaseEntity_BaseInterpolatePart1(), int,
|
||||
void* rcx, float& currentTime, Vector& oldOrigin, QAngle& oldAngles, Vector& oldVel, int& bNoMoreChanges)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_BaseInterpolatePart1[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, currentTime, oldOrigin, oldAngles, oldVel, bNoMoreChanges);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseEntity_BaseInterpolatePart1, rcx, currentTime, oldOrigin, oldAngles, oldVel, bNoMoreChanges);
|
||||
|
||||
auto pEntity = reinterpret_cast<CBaseEntity*>(rcx);
|
||||
if (pEntity && pEntity->GetClassID() == ETFClassID::CTFViewModel && F::Ticks.m_bRecharge)
|
||||
|
||||
@@ -6,10 +6,7 @@
|
||||
MAKE_HOOK(CBaseEntity_EstimateAbsVelocity, S::CBaseEntity_EstimateAbsVelocity(), void,
|
||||
void* rcx, Vector& vel)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_EstimateAbsVelocity[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, vel);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseEntity_EstimateAbsVelocity, rcx, vel);
|
||||
|
||||
auto pPlayer = reinterpret_cast<CTFPlayer*>(rcx);
|
||||
if (!pPlayer->IsPlayer())
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CBaseEntity_ResetLatched, "client.dll", "40 56 48 83 EC ? 48 8B 0
|
||||
MAKE_HOOK(CBaseEntity_ResetLatched, S::CBaseEntity_ResetLatched(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_ResetLatched[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseEntity_ResetLatched, rcx);
|
||||
|
||||
if (rcx == H::Entities.GetLocal())
|
||||
return;
|
||||
|
||||
@@ -57,10 +57,7 @@ MAKE_SIGNATURE(CBasePlayer_PostDataUpdate_SetAbsVelocity_Call, "client.dll", "0F
|
||||
MAKE_HOOK(CBaseEntity_SetAbsVelocity, S::CBaseEntity_SetAbsVelocity(), void,
|
||||
void* rcx, const Vec3& vecAbsVelocity)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_SetAbsVelocity[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, vecAbsVelocity);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseEntity_SetAbsVelocity, rcx, vecAbsVelocity);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CBasePlayer_PostDataUpdate_SetAbsVelocity_Call();
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(MainViewOrigin, "client.dll", "48 8D 05 ? ? ? ? C3 CC CC CC CC CC
|
||||
MAKE_HOOK(CBaseEntity_WorldSpaceCenter, S::CBaseEntity_WorldSpaceCenter(), const Vec3&,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseEntity_WorldSpaceCenter[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseEntity_WorldSpaceCenter, rcx);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CDamageAccountPanel_DisplayDamageFeedback_WorldSpaceCenter_Call();
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CBaseHudChatLine_InsertAndColorizeText, "client.dll", "44 89 44 2
|
||||
MAKE_HOOK(CBaseHudChatLine_InsertAndColorizeText, S::CBaseHudChatLine_InsertAndColorizeText(), void,
|
||||
void* rcx, wchar_t* buf, int clientIndex)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseHudChatLine_InsertAndColorizeText[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, buf, clientIndex);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseHudChatLine_InsertAndColorizeText, rcx, buf, clientIndex);
|
||||
|
||||
auto pResource = H::Entities.GetResource();
|
||||
if (!pResource || !pResource->IsValid(clientIndex))
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CBasePlayer_CalcObserverView, "client.dll", "48 89 5C 24 ? 48 89
|
||||
MAKE_HOOK(CBasePlayer_CalcObserverView, S::CBasePlayer_CalcObserverView(), void,
|
||||
void* rcx, Vector& eyeOrigin, QAngle& eyeAngles, float& fov)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_CalcObserverView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, eyeOrigin, eyeAngles, fov);
|
||||
#endif
|
||||
DEBUG_RETURN(CBasePlayer_CalcObserverView, rcx, eyeOrigin, eyeAngles, fov);
|
||||
|
||||
if (!F::Spectate.HasTarget())
|
||||
return CALL_ORIGINAL(rcx, eyeOrigin, eyeAngles, fov);
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CBasePlayer_CalcView, "client.dll", "40 57 48 83 EC ? 44 8B 91",
|
||||
MAKE_HOOK(CBasePlayer_CalcView, S::CBasePlayer_CalcView(), void,
|
||||
void* rcx, Vector& eyeOrigin, QAngle& eyeAngles, float& zNear, float& zFar, float& fov)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_CalcView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, eyeOrigin, eyeAngles, zNear, zFar, fov);
|
||||
#endif
|
||||
DEBUG_RETURN(CBasePlayer_CalcView, rcx, eyeOrigin, eyeAngles, zNear, zFar, fov);
|
||||
|
||||
if (!Vars::Visuals::Removals::ViewPunch.Value && !F::Spectate.HasTarget())
|
||||
return CALL_ORIGINAL(rcx, eyeOrigin, eyeAngles, zNear, zFar, fov);
|
||||
|
||||
@@ -6,10 +6,7 @@ MAKE_SIGNATURE(CBasePlayer_CalcViewModelView, "client.dll", "48 89 5C 24 ? 48 89
|
||||
MAKE_HOOK(CBaseViewModel_CalcViewModelView, S::CBaseViewModel_CalcViewModelView(), void,
|
||||
void* rcx, CBasePlayer* owner, /*const*/ Vector& eyePosition, /*const*/ QAngle& eyeAngles)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseViewModel_CalcViewModelView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, owner, eyePosition, eyeAngles);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseViewModel_CalcViewModelView, rcx, owner, eyePosition, eyeAngles);
|
||||
|
||||
Vec3 vOffset = { Vars::Visuals::Viewmodel::OffsetX.Value, Vars::Visuals::Viewmodel::OffsetY.Value, Vars::Visuals::Viewmodel::OffsetZ.Value };
|
||||
Vec3 vAngles = { Vars::Visuals::Viewmodel::Pitch.Value, Vars::Visuals::Viewmodel::Yaw.Value, Vars::Visuals::Viewmodel::Roll.Value };
|
||||
@@ -50,10 +47,7 @@ MAKE_HOOK(CBaseViewModel_CalcViewModelView, S::CBaseViewModel_CalcViewModelView(
|
||||
MAKE_HOOK(CBasePlayer_CalcViewModelView, S::CBasePlayer_CalcViewModelView(), void,
|
||||
void* rcx, /*const*/ Vector& eyeOrigin, /*const*/ QAngle& eyeAngles)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_CalcViewModelView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, eyeOrigin, eyeAngles);
|
||||
#endif
|
||||
DEBUG_RETURN(CBasePlayer_CalcViewModelView, rcx, eyeOrigin, eyeAngles);
|
||||
|
||||
Vector vOldEyeOrigin = eyeOrigin, vOldEyeAngles = eyeAngles;
|
||||
CALL_ORIGINAL(rcx, eyeOrigin, eyeAngles);
|
||||
|
||||
@@ -69,10 +69,7 @@ typedef enum
|
||||
MAKE_HOOK(CBasePlayer_ItemPostFrame, S::CBasePlayer_ItemPostFrame(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_ItemPostFrame[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CBasePlayer_ItemPostFrame, rcx);
|
||||
|
||||
auto pLocal = reinterpret_cast<CTFPlayer*>(rcx);
|
||||
auto pWeapon = H::Entities.GetWeapon();
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CBaseViewModel_ShouldFlipViewModel, "client.dll", "40 57 48 83 EC
|
||||
MAKE_HOOK(CBaseViewModel_ShouldFlipViewModel, S::CBaseViewModel_ShouldFlipViewModel(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseViewModel_ShouldFlipViewModel[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseViewModel_ShouldFlipViewModel, rcx);
|
||||
|
||||
return G::FlipViewmodels = CALL_ORIGINAL(rcx);
|
||||
}
|
||||
@@ -9,10 +9,7 @@
|
||||
MAKE_HOOK(CClientModeShared_DoPostScreenSpaceEffects, U::Memory.GetVirtual(I::ClientModeShared, 39), bool,
|
||||
void* rcx, const CViewSetup* pSetup)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientModeShared_DoPostScreenSpaceEffects[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pSetup);
|
||||
#endif
|
||||
DEBUG_RETURN(CClientModeShared_DoPostScreenSpaceEffects, rcx, pSetup);
|
||||
|
||||
if (SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL(rcx, pSetup);
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
MAKE_HOOK(CClientModeShared_OverrideView, U::Memory.GetVirtual(I::ClientModeShared, 16), void,
|
||||
void* rcx, CViewSetup* pView)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientModeShared_OverrideView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pView);
|
||||
#endif
|
||||
DEBUG_RETURN(CClientModeShared_OverrideView, rcx, pView);
|
||||
|
||||
CALL_ORIGINAL(rcx, pView);
|
||||
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
MAKE_HOOK(CClientModeShared_ShouldDrawViewModel, U::Memory.GetVirtual(I::ClientModeShared, 24), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientModeShared_ShouldDrawViewModel[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CClientModeShared_ShouldDrawViewModel, rcx);
|
||||
|
||||
if (Vars::Visuals::UI::ZoomFieldOfView.Value)
|
||||
{
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CClientState_GetClientInterpAmount, "engine.dll", "48 83 EC ? 48
|
||||
MAKE_HOOK(CClientState_GetClientInterpAmount, S::CClientState_GetClientInterpAmount(), float,
|
||||
CClientState* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientState_GetClientInterpAmount[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CClientState_GetClientInterpAmount, rcx);
|
||||
|
||||
G::Lerp = CALL_ORIGINAL(rcx);
|
||||
return 0.f;
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CClientState_ProcessFixAngle, "engine.dll", "40 53 48 83 EC ? F3
|
||||
MAKE_HOOK(CClientState_ProcessFixAngle, S::CClientState_ProcessFixAngle(), bool,
|
||||
CClientState* rcx, SVC_FixAngle* msg)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientState_ProcessFixAngle[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, msg);
|
||||
#endif
|
||||
DEBUG_RETURN(CClientState_ProcessFixAngle, rcx, msg);
|
||||
|
||||
if (Vars::Visuals::Removals::AngleForcing.Value)
|
||||
return false;
|
||||
|
||||
@@ -231,10 +231,7 @@ static inline void AntiCheatCompatibility(CUserCmd* pCmd, bool* pSendPacket)
|
||||
MAKE_HOOK(CHLClient_CreateMove, U::Memory.GetVirtual(I::Client, 21), void,
|
||||
void* rcx, int sequence_number, float input_sample_frametime, bool active)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHLClient_CreateMove[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, sequence_number, input_sample_frametime, active);
|
||||
#endif
|
||||
DEBUG_RETURN(CHLClient_CreateMove, rcx, sequence_number, input_sample_frametime, active);
|
||||
|
||||
CALL_ORIGINAL(rcx, sequence_number, input_sample_frametime, active);
|
||||
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
MAKE_HOOK(CHLClient_DispatchUserMessage, U::Memory.GetVirtual(I::Client, 36), bool,
|
||||
void* rcx, UserMessageType type, bf_read& msgData)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHLClient_DispatchUserMessage[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, type, msgData);
|
||||
#endif
|
||||
DEBUG_RETURN(CHLClient_DispatchUserMessage, rcx, type, msgData);
|
||||
|
||||
auto bufData = reinterpret_cast<const char*>(msgData.m_pData);
|
||||
msgData.SetAssertOnOverflow(false);
|
||||
|
||||
@@ -18,10 +18,7 @@
|
||||
MAKE_HOOK(CHLClient_FrameStageNotify, U::Memory.GetVirtual(I::Client, 35), void,
|
||||
void* rcx, ClientFrameStage_t curStage)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHLClient_FrameStageNotify[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, curStage);
|
||||
#endif
|
||||
DEBUG_RETURN(CHLClient_FrameStageNotify, rcx, curStage);
|
||||
|
||||
if (G::Unload)
|
||||
return CALL_ORIGINAL(rcx, curStage);
|
||||
|
||||
@@ -6,10 +6,7 @@
|
||||
MAKE_HOOK(CHLClient_LevelShutdown, U::Memory.GetVirtual(I::Client, 7), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHLClient_LevelShutdown[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CHLClient_LevelShutdown, rcx);
|
||||
|
||||
H::Entities.Clear(true);
|
||||
F::EnginePrediction.Unload();
|
||||
|
||||
@@ -9,10 +9,7 @@ MAKE_SIGNATURE(CHLTVCamera_GetMode, "client.dll", "40 53 48 83 EC ? 48 8B D9 8B
|
||||
MAKE_HOOK(CHLTVCamera_CalcView, S::CHLTVCamera_CalcView(), void,
|
||||
void* rcx, Vector& origin, QAngle& angles, float& fov)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHLTVCamera_CalcView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, origin, angles, fov);
|
||||
#endif
|
||||
DEBUG_RETURN(CHLTVCamera_CalcView, rcx, origin, angles, fov);
|
||||
|
||||
auto pHLTVCamera = reinterpret_cast<CHLTVCamera*>(rcx);
|
||||
|
||||
@@ -37,10 +34,7 @@ MAKE_HOOK(CHLTVCamera_CalcView, S::CHLTVCamera_CalcView(), void,
|
||||
MAKE_HOOK(CHLTVCamera_GetPrimaryTarget, S::CHLTVCamera_GetPrimaryTarget(), CBaseEntity*,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHLTVCamera_GetPrimaryTarget[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CHLTVCamera_GetPrimaryTarget, rcx);
|
||||
|
||||
auto pHLTVCamera = reinterpret_cast<CHLTVCamera*>(rcx);
|
||||
|
||||
@@ -53,10 +47,7 @@ MAKE_HOOK(CHLTVCamera_GetPrimaryTarget, S::CHLTVCamera_GetPrimaryTarget(), CBase
|
||||
MAKE_HOOK(CHLTVCamera_GetMode, S::CHLTVCamera_GetMode(), int,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHLTVCamera_GetMode[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CHLTVCamera_GetMode, rcx);
|
||||
|
||||
auto pHLTVCamera = reinterpret_cast<CHLTVCamera*>(rcx);
|
||||
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CHudCrosshair_GetDrawPosition, "client.dll", "48 8B C4 55 53 56 4
|
||||
MAKE_HOOK(CHudCrosshair_GetDrawPosition, S::CHudCrosshair_GetDrawPosition(), void,
|
||||
float* pX, float* pY, bool* pbBehindCamera, Vec3 angleCrosshairOffset)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CHudCrosshair_GetDrawPosition[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pX, pY, pbBehindCamera, angleCrosshairOffset);
|
||||
#endif
|
||||
DEBUG_RETURN(CHudCrosshair_GetDrawPosition, pX, pY, pbBehindCamera, angleCrosshairOffset);
|
||||
|
||||
if (!Vars::Visuals::Viewmodel::CrosshairAim.Value && !Vars::Visuals::Thirdperson::Crosshair.Value || SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL(pX, pY, pbBehindCamera, angleCrosshairOffset);
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
MAKE_HOOK(CInput_GetUserCmd, U::Memory.GetVirtual(I::Input, 8), CUserCmd*,
|
||||
void* rcx, int sequence_number)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CInput_GetUserCmd[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, sequence_number);
|
||||
#endif
|
||||
DEBUG_RETURN(CInput_GetUserCmd, rcx, sequence_number);
|
||||
|
||||
return &I::Input->m_pCommands[sequence_number % MULTIPLAYER_BACKUP];
|
||||
}
|
||||
@@ -5,8 +5,5 @@ MAKE_SIGNATURE(CInput_ValidateUserCmd, "client.dll", "48 89 5C 24 ? 48 89 74 24
|
||||
MAKE_HOOK(CInput_ValidateUserCmd, S::CInput_ValidateUserCmd(), void,
|
||||
void* rcx, CUserCmd* usercmd, int sequence_number)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CInput_ValidateUserCmd[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, usercmd, sequence_number);
|
||||
#endif
|
||||
DEBUG_RETURN(CInput_ValidateUserCmd, rcx, usercmd, sequence_number);
|
||||
}
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CInventoryManager_ShowItemsPickedUp, "client.dll", "44 88 4C 24 ?
|
||||
MAKE_HOOK(CInventoryManager_ShowItemsPickedUp, S::CInventoryManager_ShowItemsPickedUp(), bool,
|
||||
void* rcx, bool bForce, bool bReturnToGame, bool bNoPanel)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CInventoryManager_ShowItemsPickedUp[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, bForce, bReturnToGame, bNoPanel);
|
||||
#endif
|
||||
DEBUG_RETURN(CInventoryManager_ShowItemsPickedUp, rcx, bForce, bReturnToGame, bNoPanel);
|
||||
|
||||
if (Vars::Misc::Automation::AcceptItemDrops.Value)
|
||||
{
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CL_CheckForPureServerWhitelist, "engine.dll", "40 56 48 83 EC ? 8
|
||||
MAKE_HOOK(CL_CheckForPureServerWhitelist, S::CL_CheckForPureServerWhitelist(), void,
|
||||
void **pFilesToReload)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CL_CheckForPureServerWhitelist[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pFilesToReload);
|
||||
#endif
|
||||
DEBUG_RETURN(CL_CheckForPureServerWhitelist, pFilesToReload);
|
||||
|
||||
if (Vars::Misc::Exploits::PureBypass.Value)
|
||||
return;
|
||||
|
||||
@@ -14,10 +14,7 @@ MAKE_SIGNATURE(CL_Move, "engine.dll", "40 55 53 48 8D AC 24 ? ? ? ? B8 ? ? ? ? E
|
||||
MAKE_HOOK(CL_Move, S::CL_Move(), void,
|
||||
float accumulated_extra_samples, bool bFinalTick)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CL_Move[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(accumulated_extra_samples, bFinalTick);
|
||||
#endif
|
||||
DEBUG_RETURN(CL_Move, accumulated_extra_samples, bFinalTick);
|
||||
|
||||
if (G::Unload)
|
||||
return CALL_ORIGINAL(accumulated_extra_samples, bFinalTick);
|
||||
|
||||
@@ -12,10 +12,7 @@ struct CriticalStorage_t
|
||||
MAKE_HOOK(CL_ProcessPacketEntities, S::CL_ProcessPacketEntities(), bool,
|
||||
SVC_PacketEntities* entmsg)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CL_ProcessPacketEntities[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(entmsg);
|
||||
#endif
|
||||
DEBUG_RETURN(CL_ProcessPacketEntities, entmsg);
|
||||
|
||||
if (entmsg->m_bIsDelta) // we won't need to restore
|
||||
return CALL_ORIGINAL(entmsg);
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CL_ReadPackets, "engine.dll", "4C 8B DC 49 89 5B ? 55 56 57 41 54
|
||||
MAKE_HOOK(CL_ReadPackets, S::CL_ReadPackets(), void,
|
||||
bool bFinalTick)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CL_ReadPackets[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(bFinalTick);
|
||||
#endif
|
||||
DEBUG_RETURN(CL_ReadPackets, bFinalTick);
|
||||
|
||||
if (F::NetworkFix.ShouldReadPackets())
|
||||
CALL_ORIGINAL(bFinalTick);
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CMatchInviteNotification_OnTick, "client.dll", "40 53 48 83 EC ?
|
||||
MAKE_HOOK(CMatchInviteNotification_OnTick, S::CMatchInviteNotification_OnTick(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CMatchInviteNotification_OnTick[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CMatchInviteNotification_OnTick, rcx);
|
||||
|
||||
if (Vars::Misc::Queueing::FreezeQueue.Value)
|
||||
*reinterpret_cast<double*>(uintptr_t(rcx) + 616) = 0.0;
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CMaterial_Uncache, "materialsystem.dll", "48 89 5C 24 ? 48 89 6C
|
||||
MAKE_HOOK(CMaterial_Uncache, S::CMaterial_Uncache(), void,
|
||||
IMaterial* rcx, bool bPreserveVars)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CMaterial_Uncache[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, bPreserveVars);
|
||||
#endif
|
||||
DEBUG_RETURN(CMaterial_Uncache, rcx, bPreserveVars);
|
||||
|
||||
if (F::Materials.m_mMatList.contains(rcx))
|
||||
return;
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CNetChannel_SendDatagram, "engine.dll", "40 55 57 41 56 48 8D AC
|
||||
MAKE_HOOK(CNetChannel_SendDatagram, S::CNetChannel_SendDatagram(), int,
|
||||
CNetChannel* pNetChan, bf_write* datagram)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CNetChannel_SendDatagram[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pNetChan, datagram);
|
||||
#endif
|
||||
DEBUG_RETURN(CNetChannel_SendDatagram, pNetChan, datagram);
|
||||
|
||||
if (datagram)
|
||||
return CALL_ORIGINAL(pNetChan, datagram);
|
||||
|
||||
@@ -9,10 +9,7 @@ MAKE_SIGNATURE(CNetChannel_SendNetMsg, "engine.dll", "48 89 5C 24 ? 48 89 74 24
|
||||
MAKE_HOOK(CNetChannel_SendNetMsg, S::CNetChannel_SendNetMsg(), bool,
|
||||
CNetChannel* pNetChan, INetMessage& msg, bool bForceReliable, bool bVoice)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CNetChannel_SendNetMsg[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pNetChan, msg, bForceReliable, bVoice);
|
||||
#endif
|
||||
DEBUG_RETURN(CNetChannel_SendNetMsg, pNetChan, msg, bForceReliable, bVoice);
|
||||
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
||||
@@ -73,10 +73,7 @@ struct ParticleRenderData_t
|
||||
MAKE_HOOK(COPRenderSprites_Render, S::COPRenderSprites_Render(), void,
|
||||
void* rcx, IMatRenderContext* pRenderContext, CParticleCollection* pParticles, void* pContext)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::COPRenderSprites_Render[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pRenderContext, pParticles, pContext);
|
||||
#endif
|
||||
DEBUG_RETURN(COPRenderSprites_Render, rcx, pRenderContext, pParticles, pContext);
|
||||
|
||||
if (!Vars::Visuals::Effects::DrawIconsThroughWalls.Value || SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL(rcx, pRenderContext, pParticles, pContext);
|
||||
@@ -166,10 +163,7 @@ MAKE_HOOK(COPRenderSprites_Render, S::COPRenderSprites_Render(), void,
|
||||
MAKE_HOOK(COPRenderSprites_RenderSpriteCard, S::COPRenderSprites_RenderSpriteCard(), void,
|
||||
void* rcx, void* meshBuilder, void* pCtx, SpriteRenderInfo_t& info, int hParticle, ParticleRenderData_t* pSortList, void* pCamera)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::COPRenderSprites_RenderSpriteCard[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, meshBuilder, pCtx, info, hParticle, pSortList, pCamera);
|
||||
#endif
|
||||
DEBUG_RETURN(COPRenderSprites_RenderSpriteCard, rcx, meshBuilder, pCtx, info, hParticle, pSortList, pCamera);
|
||||
|
||||
if (!(Vars::Visuals::World::Modulations.Value & Vars::Visuals::World::ModulationsEnum::Particle) || SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL(rcx, meshBuilder, pCtx, info, hParticle, pSortList, pCamera);
|
||||
@@ -185,10 +179,7 @@ MAKE_HOOK(COPRenderSprites_RenderSpriteCard, S::COPRenderSprites_RenderSpriteCar
|
||||
MAKE_HOOK(COPRenderSprites_RenderTwoSequenceSpriteCard, S::COPRenderSprites_RenderTwoSequenceSpriteCard(), void,
|
||||
void* rcx, void* meshBuilder, void* pCtx, SpriteRenderInfo_t& info, int hParticle, ParticleRenderData_t* pSortList, void* pCamera)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::COPRenderSprites_RenderTwoSequenceSpriteCard[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, meshBuilder, pCtx, info, hParticle, pSortList, pCamera);
|
||||
#endif
|
||||
DEBUG_RETURN(COPRenderSprites_RenderTwoSequenceSpriteCard, rcx, meshBuilder, pCtx, info, hParticle, pSortList, pCamera);
|
||||
|
||||
if (!(Vars::Visuals::World::Modulations.Value &Vars::Visuals::World::ModulationsEnum::Particle) || SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL(rcx, meshBuilder, pCtx, info, hParticle, pSortList, pCamera);
|
||||
|
||||
@@ -12,10 +12,7 @@ MAKE_SIGNATURE(CWeaponMedigun_ManageChargeEffect_CreateName_Call, "client.dll",
|
||||
MAKE_HOOK(CParticleProperty_Create_Name, S::CParticleProperty_Create_Name(), void*,
|
||||
void* rcx, const char* pszParticleName, ParticleAttachment_t iAttachType, const char* pszAttachmentName)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CParticleProperty_Create_Name[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pszParticleName, iAttachType, pszAttachmentName);
|
||||
#endif
|
||||
DEBUG_RETURN(CParticleProperty_Create_Name, rcx, pszParticleName, iAttachType, pszAttachmentName);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwUpdateEffects1 = S::CWeaponMedigun_UpdateEffects_CreateName_Call1();
|
||||
@@ -96,10 +93,7 @@ MAKE_HOOK(CParticleProperty_Create_Name, S::CParticleProperty_Create_Name(), voi
|
||||
MAKE_HOOK(CParticleProperty_Create_Point, S::CParticleProperty_Create_Point(), void*,
|
||||
void* rcx, const char* pszParticleName, ParticleAttachment_t iAttachType, int iAttachmentPoint, Vector vecOriginOffset)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CParticleProperty_Create_Point[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pszParticleName, iAttachType, iAttachmentPoint, vecOriginOffset);
|
||||
#endif
|
||||
DEBUG_RETURN(CParticleProperty_Create_Point, rcx, pszParticleName, iAttachType, iAttachmentPoint, vecOriginOffset);
|
||||
|
||||
if (pszParticleName)
|
||||
{
|
||||
@@ -214,10 +208,7 @@ MAKE_HOOK(CParticleProperty_Create_Point, S::CParticleProperty_Create_Point(), v
|
||||
MAKE_HOOK(CParticleProperty_AddControlPoint_Pointer, S::CParticleProperty_AddControlPoint_Pointer(), void,
|
||||
void* rcx, void* pEffect, int iPoint, CBaseEntity* pEntity, ParticleAttachment_t iAttachType, const char* pszAttachmentName, Vector vecOriginOffset)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CParticleProperty_AddControlPoint_Pointer[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pEffect, iPoint, pEntity, iAttachType, pszAttachmentName, vecOriginOffset);
|
||||
#endif
|
||||
DEBUG_RETURN(CParticleProperty_AddControlPoint_Pointer, rcx, pEffect, iPoint, pEntity, iAttachType, pszAttachmentName, vecOriginOffset);
|
||||
|
||||
if (!pEffect)
|
||||
return; // crash fix
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CPlayerResource_GetPlayerName, "client.dll", "48 89 5C 24 ? 56 48
|
||||
MAKE_HOOK(CPlayerResource_GetPlayerName, S::CPlayerResource_GetPlayerName(), const char*,
|
||||
void* rcx, int iIndex)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CPlayerResource_GetPlayerName[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iIndex);
|
||||
#endif
|
||||
DEBUG_RETURN(CPlayerResource_GetPlayerName, rcx, iIndex);
|
||||
|
||||
return F::PlayerUtils.GetPlayerName(iIndex, CALL_ORIGINAL(rcx, iIndex));
|
||||
}
|
||||
@@ -16,10 +16,7 @@ static std::vector<TickbaseFix_t> s_vTickbaseFixes = {};
|
||||
MAKE_HOOK(CPrediction_RunSimulation, S::CPrediction_RunSimulation(), void,
|
||||
void* rcx, int current_command, float curtime, CUserCmd* cmd, CTFPlayer* localPlayer)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CPrediction_RunSimulation[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, current_command, curtime, cmd, localPlayer);
|
||||
#endif
|
||||
DEBUG_RETURN(CPrediction_RunSimulation, rcx, current_command, curtime, cmd, localPlayer);
|
||||
|
||||
if (F::Ticks.m_bShifting && F::Ticks.m_iShiftedTicks + 1 == F::Ticks.m_iShiftStart)
|
||||
{
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CRendering3dView_EnableWorldFog, "client.dll", "40 53 48 83 EC ?
|
||||
MAKE_HOOK(CRendering3dView_EnableWorldFog, S::CRendering3dView_EnableWorldFog(), void,
|
||||
)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CRendering3dView_EnableWorldFog[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL();
|
||||
#endif
|
||||
DEBUG_RETURN(CRendering3dView_EnableWorldFog);
|
||||
|
||||
if (!(Vars::Visuals::World::Modulations.Value & Vars::Visuals::World::ModulationsEnum::Fog) || SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL();
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CSkyboxView_Enable3dSkyboxFog, "client.dll", "40 57 48 83 EC ? E8
|
||||
MAKE_HOOK(CSkyboxView_Enable3dSkyboxFog, S::CSkyboxView_Enable3dSkyboxFog(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSkyboxView_Enable3dSkyboxFog[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CSkyboxView_Enable3dSkyboxFog, rcx);
|
||||
|
||||
if (!(Vars::Visuals::World::Modulations.Value & Vars::Visuals::World::ModulationsEnum::Fog) || SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL(rcx);
|
||||
|
||||
@@ -12,10 +12,7 @@ static Vec3 s_vEyeAngles;
|
||||
MAKE_HOOK(CSniperDot_GetRenderingPositions, S::CSniperDot_GetRenderingPositions(), bool,
|
||||
void* rcx, CTFPlayer* pPlayer, Vec3& vecAttachment, Vec3& vecEndPos, float& flSize)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSniperDot_GetRenderingPositions[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pPlayer, vecAttachment, vecEndPos, flSize);
|
||||
#endif
|
||||
DEBUG_RETURN(CSniperDot_GetRenderingPositions, rcx, pPlayer, vecAttachment, vecEndPos, flSize);
|
||||
|
||||
if (pPlayer && pPlayer->entindex() != I::EngineClient->GetLocalPlayer())
|
||||
{
|
||||
@@ -31,10 +28,7 @@ MAKE_HOOK(CSniperDot_GetRenderingPositions, S::CSniperDot_GetRenderingPositions(
|
||||
MAKE_HOOK(CBasePlayer_EyePosition, S::CBasePlayer_EyePosition(), Vec3*,
|
||||
void* rcx, void* rdx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_EyePosition[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, rdx);
|
||||
#endif
|
||||
DEBUG_RETURN(CBasePlayer_EyePosition, rcx, rdx);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CSniperDot_GetRenderingPositions_EyePosition_Call();
|
||||
@@ -48,10 +42,7 @@ MAKE_HOOK(CBasePlayer_EyePosition, S::CBasePlayer_EyePosition(), Vec3*,
|
||||
MAKE_HOOK(CTFPlayer_EyeAngles, S::CTFPlayer_EyeAngles(), Vec3*,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_EyeAngles[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_EyeAngles, rcx);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CSniperDot_GetRenderingPositions_EyeAngles_Call();
|
||||
|
||||
@@ -133,10 +133,7 @@ static inline bool ShouldBlockSound(const char* pSound)
|
||||
MAKE_HOOK(CSoundEmitterSystem_EmitSound, S::CSoundEmitterSystem_EmitSound(), void,
|
||||
void* rcx, IRecipientFilter& filter, int entindex, const EmitSound_t& ep)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CSoundEmitterSystem_EmitSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, filter, entindex, ep);
|
||||
#endif
|
||||
DEBUG_RETURN(CSoundEmitterSystem_EmitSound, rcx, filter, entindex, ep);
|
||||
|
||||
if (ShouldBlockSound(ep.m_pSoundName))
|
||||
return;
|
||||
@@ -148,10 +145,7 @@ MAKE_HOOK(CSoundEmitterSystem_EmitSound, S::CSoundEmitterSystem_EmitSound(), voi
|
||||
MAKE_HOOK(S_StartDynamicSound, S::S_StartDynamicSound(), int,
|
||||
StartSoundParams_t& params)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::S_StartDynamicSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(params);
|
||||
#endif
|
||||
DEBUG_RETURN(S_StartDynamicSound, params);
|
||||
|
||||
H::Entities.ManualNetwork(params);
|
||||
if (params.pSfx && ShouldBlockSound(params.pSfx->getname()))
|
||||
@@ -164,10 +158,7 @@ MAKE_HOOK(S_StartDynamicSound, S::S_StartDynamicSound(), int,
|
||||
MAKE_HOOK(S_StartSound, S::S_StartSound(), int,
|
||||
StartSoundParams_t& params)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::S_StartSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(params);
|
||||
#endif
|
||||
DEBUG_RETURN(S_StartSound, params);
|
||||
|
||||
if (!params.staticsound)
|
||||
H::Entities.ManualNetwork(params);
|
||||
@@ -180,6 +171,8 @@ MAKE_HOOK(S_StartSound, S::S_StartSound(), int,
|
||||
MAKE_HOOK(CBaseEntity_EmitSound, S::CBaseEntity_EmitSound(), void,
|
||||
void* rcx, const char* soundname, float soundtime, float* duration)
|
||||
{
|
||||
DEBUG_RETURN(CBaseEntity_EmitSound, rcx, soundname, soundtime, duration);
|
||||
|
||||
if (soundname)
|
||||
{
|
||||
switch (FNV1A::Hash32(soundname))
|
||||
|
||||
@@ -41,10 +41,7 @@ public:
|
||||
MAKE_HOOK(CStaticPropMgr_ComputePropOpacity, S::CStaticPropMgr_ComputePropOpacity(), void,
|
||||
void* rcx, CStaticProp* pProp)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStaticPropMgr_ComputePropOpacity[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pProp);
|
||||
#endif
|
||||
DEBUG_RETURN(CStaticPropMgr_ComputePropOpacity, rcx, pProp);
|
||||
|
||||
if (Vars::Visuals::World::NoPropFade.Value && pProp)
|
||||
{
|
||||
|
||||
@@ -7,10 +7,7 @@ static bool s_bDrawingProps = false;
|
||||
MAKE_HOOK(CStaticPropMgr_DrawStaticProps, S::CStaticPropMgr_DrawStaticProps(), void,
|
||||
void* rcx, IClientRenderable** pProps, int count, bool bShadowDepth, bool drawVCollideWireframe)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStaticPropMgr_DrawStaticProps[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pProps, count, bShadowDepth, drawVCollideWireframe);
|
||||
#endif
|
||||
DEBUG_RETURN(CStaticPropMgr_DrawStaticProps, rcx, pProps, count, bShadowDepth, drawVCollideWireframe);
|
||||
|
||||
s_bDrawingProps = true;
|
||||
CALL_ORIGINAL(rcx, pProps, count, bShadowDepth, drawVCollideWireframe);
|
||||
@@ -20,10 +17,7 @@ MAKE_HOOK(CStaticPropMgr_DrawStaticProps, S::CStaticPropMgr_DrawStaticProps(), v
|
||||
MAKE_HOOK(CStudioRender_SetColorModulation, U::Memory.GetVirtual(I::StudioRender, 27), void,
|
||||
void* rcx, const float* pColor)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStudioRender_SetColorModulation[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pColor);
|
||||
#endif
|
||||
DEBUG_RETURN(CStudioRender_SetColorModulation, rcx, pColor);
|
||||
|
||||
if (!s_bDrawingProps || !(Vars::Visuals::World::Modulations.Value & Vars::Visuals::World::ModulationsEnum::Prop) || SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL(rcx, pColor);
|
||||
@@ -39,10 +33,7 @@ MAKE_HOOK(CStudioRender_SetColorModulation, U::Memory.GetVirtual(I::StudioRender
|
||||
MAKE_HOOK(CStudioRender_SetAlphaModulation, U::Memory.GetVirtual(I::StudioRender, 28), void,
|
||||
void* rcx, float flAlpha)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStudioRender_SetAlphaModulation[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, flAlpha);
|
||||
#endif
|
||||
DEBUG_RETURN(CStudioRender_SetAlphaModulation, rcx, flAlpha);
|
||||
|
||||
if (!s_bDrawingProps || !(Vars::Visuals::World::Modulations.Value & Vars::Visuals::World::ModulationsEnum::Prop) || SDK::CleanScreenshot())
|
||||
return CALL_ORIGINAL(rcx, flAlpha);
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
MAKE_HOOK(CStudioRender_DrawModelStaticProp, U::Memory.GetVirtual(I::StudioRender, 30), void,
|
||||
void* rcx, const DrawModelState_t& pState, const matrix3x4& modelToWorld, int flags)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CStudioRender_DrawModelStaticProp[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pState, modelToWorld, flags);
|
||||
#endif
|
||||
DEBUG_RETURN(CStudioRender_DrawModelStaticProp, rcx, pState, modelToWorld, flags);
|
||||
|
||||
if (Vars::Visuals::World::NearPropFade.Value)
|
||||
{
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CTFBadgePanel_SetupBadge, "client.dll", "48 85 D2 0F 84 ? ? ? ? 4
|
||||
MAKE_HOOK(CTFBadgePanel_SetupBadge, S::CTFBadgePanel_SetupBadge(), void,
|
||||
void* rcx, const IMatchGroupDescription* pMatchDesc, /*const*/ LevelInfo_t& levelInfo, const CSteamID& steamID)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFBadgePanel_SetupBadge[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pMatchDesc, levelInfo, steamID);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFBadgePanel_SetupBadge, rcx, pMatchDesc, levelInfo, steamID);
|
||||
|
||||
int nOldLevelNum = levelInfo.m_nLevelNum;
|
||||
|
||||
|
||||
@@ -41,10 +41,7 @@ static inline void SetScoreboardColor(int iIndex, Color_t& tColor)
|
||||
MAKE_HOOK(CAvatarImage_SetAvatarSteamID, S::CAvatarImage_SetAvatarSteamID(), bool,
|
||||
void* rcx, CSteamID steamIDUser, EAvatarSize avatarSize)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CAvatarImage_SetAvatarSteamID[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, steamIDUser, avatarSize);
|
||||
#endif
|
||||
DEBUG_RETURN(CAvatarImage_SetAvatarSteamID, rcx, steamIDUser, avatarSize);
|
||||
|
||||
if (!(F::PlayerUtils.GetNameType(steamIDUser.GetAccountID()) & NameTypeEnum::Privacy))
|
||||
return CALL_ORIGINAL(rcx, steamIDUser, avatarSize);
|
||||
@@ -55,10 +52,7 @@ MAKE_HOOK(CAvatarImage_SetAvatarSteamID, S::CAvatarImage_SetAvatarSteamID(), boo
|
||||
MAKE_HOOK(CAvatarImagePanel_SetPlayer, S::CAvatarImagePanel_SetPlayer(), void,
|
||||
void* rcx, CSteamID steamIDForPlayer, EAvatarSize avatarSize)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CAvatarImagePanel_SetPlayer[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, steamIDForPlayer, avatarSize);
|
||||
#endif
|
||||
DEBUG_RETURN(CAvatarImagePanel_SetPlayer, rcx, steamIDForPlayer, avatarSize);
|
||||
|
||||
if (!(F::PlayerUtils.GetNameType(steamIDForPlayer.GetAccountID()) & NameTypeEnum::Privacy))
|
||||
return CALL_ORIGINAL(rcx, steamIDForPlayer, avatarSize);
|
||||
@@ -69,10 +63,7 @@ MAKE_HOOK(CAvatarImagePanel_SetPlayer, S::CAvatarImagePanel_SetPlayer(), void,
|
||||
MAKE_HOOK(CTFClientScoreBoardDialog_UpdatePlayerAvatar, S::CTFClientScoreBoardDialog_UpdatePlayerAvatar(), void,
|
||||
void* rcx, int playerIndex, KeyValues* kv)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFClientScoreBoardDialog_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFClientScoreBoardDialog_UpdatePlayerAvatar, rcx, playerIndex, kv);
|
||||
|
||||
s_iPlayerIndex = playerIndex;
|
||||
|
||||
@@ -83,10 +74,7 @@ MAKE_HOOK(CTFClientScoreBoardDialog_UpdatePlayerAvatar, S::CTFClientScoreBoardDi
|
||||
MAKE_HOOK(CTFMatchSummary_UpdatePlayerAvatar, S::CTFMatchSummary_UpdatePlayerAvatar(), void,
|
||||
void* rcx, int playerIndex, KeyValues* kv)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFMatchSummary_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFMatchSummary_UpdatePlayerAvatar, rcx, playerIndex, kv);
|
||||
|
||||
if (!(F::PlayerUtils.GetNameType(playerIndex) & NameTypeEnum::Privacy))
|
||||
CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
@@ -95,10 +83,7 @@ MAKE_HOOK(CTFMatchSummary_UpdatePlayerAvatar, S::CTFMatchSummary_UpdatePlayerAva
|
||||
MAKE_HOOK(CTFHudMannVsMachineScoreboard_UpdatePlayerAvatar, S::CTFHudMannVsMachineScoreboard_UpdatePlayerAvatar(), void,
|
||||
void* rcx, int playerIndex, KeyValues* kv)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFHudMannVsMachineScoreboard_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFHudMannVsMachineScoreboard_UpdatePlayerAvatar, rcx, playerIndex, kv);
|
||||
|
||||
if (!(F::PlayerUtils.GetNameType(playerIndex) & NameTypeEnum::Privacy))
|
||||
CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
@@ -107,10 +92,7 @@ MAKE_HOOK(CTFHudMannVsMachineScoreboard_UpdatePlayerAvatar, S::CTFHudMannVsMachi
|
||||
MAKE_HOOK(CTFHudMatchStatus_UpdatePlayerAvatar, S::CTFHudMatchStatus_UpdatePlayerAvatar(), void,
|
||||
void* rcx, int playerIndex, KeyValues* kv)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFHudMatchStatus_UpdatePlayerAvatar[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFHudMatchStatus_UpdatePlayerAvatar, rcx, playerIndex, kv);
|
||||
|
||||
if (!(F::PlayerUtils.GetNameType(playerIndex) & NameTypeEnum::Privacy))
|
||||
CALL_ORIGINAL(rcx, playerIndex, kv);
|
||||
@@ -119,10 +101,7 @@ MAKE_HOOK(CTFHudMatchStatus_UpdatePlayerAvatar, S::CTFHudMatchStatus_UpdatePlaye
|
||||
MAKE_HOOK(SectionedListPanel_SetItemFgColor, S::SectionedListPanel_SetItemFgColor(), void,
|
||||
void* rcx, int itemID, Color_t color)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::SectionedListPanel_SetItemFgColor[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, itemID, color);
|
||||
#endif
|
||||
DEBUG_RETURN(SectionedListPanel_SetItemFgColor, rcx, itemID, color);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CTFClientScoreBoardDialog_UpdatePlayerList_SetItemFgColor_Call();
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
MAKE_HOOK(CTFGCClientSystem_UpdateAssignedLobby, S::CTFGCClientSystem_UpdateAssignedLobby(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFGCClientSystem_UpdateAssignedLobby[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFGCClientSystem_UpdateAssignedLobby, rcx);
|
||||
|
||||
bool bReturn = CALL_ORIGINAL(rcx);
|
||||
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CTFPlayerShared_CalculateChargeCap, "client.dll", "48 83 EC ? 4C
|
||||
MAKE_HOOK(CTFInput_ApplyMouse, S::CTFInput_ApplyMouse(), void,
|
||||
void* rcx, QAngle& viewangles, CUserCmd* cmd, float mouse_x, float mouse_y)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFInput_ApplyMouse[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, viewangles, cmd, mouse_x, mouse_y);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFInput_ApplyMouse, rcx, viewangles, cmd, mouse_x, mouse_y);
|
||||
|
||||
// we should maybe predict the shield cond for better accuracy
|
||||
|
||||
@@ -44,10 +41,7 @@ MAKE_HOOK(CTFInput_ApplyMouse, S::CTFInput_ApplyMouse(), void,
|
||||
MAKE_HOOK(CTFInput_CAM_CapYaw, S::CTFInput_CAM_CapYaw(), float,
|
||||
void* rcx, float fVal)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFInput_CAM_CapYaw[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, fVal);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFInput_CAM_CapYaw, rcx, fVal);
|
||||
|
||||
if (!Vars::Misc::Movement::ShieldTurnRate.Value)
|
||||
return CALL_ORIGINAL(rcx, fVal);
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CTFPlayerInventory_GetMaxItemCount, "client.dll", "40 53 48 83 EC
|
||||
MAKE_HOOK(CTFPlayerInventory_GetMaxItemCount, S::CTFPlayerInventory_GetMaxItemCount(), int,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerInventory_GetMaxItemCount[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerInventory_GetMaxItemCount, rcx);
|
||||
|
||||
if (Vars::Misc::Exploits::BackpackExpander.Value)
|
||||
return 4000;
|
||||
|
||||
@@ -8,10 +8,7 @@ MAKE_SIGNATURE(CEquipSlotItemSelectionPanel_UpdateModelPanelsForSelection_GetIte
|
||||
MAKE_HOOK(CTFPlayerInventory_VerifyChangedLoadoutsAreValid, S::CTFPlayerInventory_VerifyChangedLoadoutsAreValid(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerInventory_VerifyChangedLoadoutsAreValid[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerInventory_VerifyChangedLoadoutsAreValid, rcx);
|
||||
|
||||
if (!Vars::Misc::Exploits::EquipRegionUnlock.Value)
|
||||
CALL_ORIGINAL(rcx);
|
||||
@@ -20,10 +17,7 @@ MAKE_HOOK(CTFPlayerInventory_VerifyChangedLoadoutsAreValid, S::CTFPlayerInventor
|
||||
MAKE_HOOK(GenerateEquipRegionConflictMask, S::GenerateEquipRegionConflictMask(), uint32_t,
|
||||
int iClass, int iUpToSlot, int iIgnoreSlot)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::GenerateEquipRegionConflictMask[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(iClass, iUpToSlot, iIgnoreSlot);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerInventory_VerifyChangedLoadoutsAreValid, iClass, iUpToSlot, iIgnoreSlot);
|
||||
|
||||
if (Vars::Misc::Exploits::EquipRegionUnlock.Value)
|
||||
return 0;
|
||||
@@ -34,10 +28,7 @@ MAKE_HOOK(GenerateEquipRegionConflictMask, S::GenerateEquipRegionConflictMask(),
|
||||
MAKE_HOOK(CTFInventoryManager_GetItemInLoadoutForClass, S::CTFInventoryManager_GetItemInLoadoutForClass(), void*,
|
||||
void* rcx, int iClass, int iSlot, CSteamID* pID)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFInventoryManager_GetItemInLoadoutForClass[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iClass, iSlot, pID);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerInventory_VerifyChangedLoadoutsAreValid, rcx, iClass, iSlot, pID);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CEquipSlotItemSelectionPanel_UpdateModelPanelsForSelection_GetItemInLoadoutForClass_Call();
|
||||
|
||||
@@ -33,10 +33,7 @@ static inline void SetScoreboardColor(int iIndex, Color_t& tColor)
|
||||
MAKE_HOOK(CTFPlayerPanel_GetTeam, S::CTFPlayerPanel_GetTeam(), int,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerPanel_GetTeam[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerPanel_GetTeam, rcx);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CTFTeamStatusPlayerPanel_Update_GetTeam_Call();
|
||||
@@ -63,10 +60,7 @@ MAKE_HOOK(CTFPlayerPanel_GetTeam, S::CTFPlayerPanel_GetTeam(), int,
|
||||
MAKE_HOOK(vgui_Panel_SetBgColor, S::vgui_Panel_SetBgColor(), void,
|
||||
void* rcx, Color_t color)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::vgui_Panel_SetBgColor[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, color);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerPanel_GetTeam, rcx, color);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CTFTeamStatusPlayerPanel_Update_SetBgColor_Call();
|
||||
@@ -80,10 +74,7 @@ MAKE_HOOK(vgui_Panel_SetBgColor, S::vgui_Panel_SetBgColor(), void,
|
||||
MAKE_HOOK(CTFTeamStatus_OnTick, S::CTFTeamStatus_OnTick(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFTeamStatus_OnTick[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFTeamStatus_OnTick, rcx);
|
||||
|
||||
s_pTeamStatus = rcx;
|
||||
|
||||
@@ -93,10 +84,7 @@ MAKE_HOOK(CTFTeamStatus_OnTick, S::CTFTeamStatus_OnTick(), void,
|
||||
MAKE_HOOK(CVGui_RunFrame, S::CVGui_RunFrame(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CVGui_RunFrame[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CVGui_RunFrame, rcx);
|
||||
|
||||
if (!s_pTeamStatus)
|
||||
return CALL_ORIGINAL(rcx);
|
||||
|
||||
@@ -11,10 +11,7 @@ MAKE_SIGNATURE(CTFInput_ApplyMouse_InCond_Call, "client.dll", "84 C0 74 ? F3 0F
|
||||
MAKE_HOOK(CTFPlayerShared_InCond, S::CTFPlayerShared_InCond(), bool,
|
||||
void* rcx, ETFCond nCond)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerShared_InCond[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, nCond);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerShared_InCond, rcx, nCond);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwZoomPlayer = S::CTFPlayer_ShouldDraw_InCond_Call();
|
||||
|
||||
@@ -10,10 +10,7 @@ MAKE_SIGNATURE(CClientScoreBoardDialog_NeedsUpdate, "client.dll", "48 8B 05 ? ?
|
||||
MAKE_HOOK(CTFPlayerShared_IsPlayerDominated, S::CTFPlayerShared_IsPlayerDominated(), bool,
|
||||
void* rcx, int index)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerShared_IsPlayerDominated[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, index);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerShared_IsPlayerDominated, rcx, index);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CTFClientScoreBoardDialog_UpdatePlayerList_IsPlayerDominated_Call();
|
||||
@@ -30,10 +27,7 @@ MAKE_HOOK(CTFPlayerShared_IsPlayerDominated, S::CTFPlayerShared_IsPlayerDominate
|
||||
MAKE_HOOK(KeyValues_SetInt, S::KeyValues_SetInt(), void,
|
||||
void* rcx, const char* keyName, int value)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::KeyValues_SetInt[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, keyName, value);
|
||||
#endif
|
||||
DEBUG_RETURN(KeyValues_SetInt, rcx, keyName, value);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CTFClientScoreBoardDialog_UpdatePlayerList_SetInt_Call();
|
||||
@@ -48,10 +42,7 @@ MAKE_HOOK(KeyValues_SetInt, S::KeyValues_SetInt(), void,
|
||||
MAKE_HOOK(CClientScoreBoardDialog_NeedsUpdate, S::CClientScoreBoardDialog_NeedsUpdate(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CClientScoreBoardDialog_NeedsUpdate[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CClientScoreBoardDialog_NeedsUpdate, rcx);
|
||||
|
||||
static bool bStaticMod = false;
|
||||
const bool bLastMod = bStaticMod;
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CTFPlayerShared_ShouldSuppressPrediction, "client.dll", "8B 81 ?
|
||||
MAKE_HOOK(CTFPlayerShared_ShouldSuppressPrediction, S::CTFPlayerShared_ShouldSuppressPrediction(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayerShared_ShouldSuppressPrediction[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayerShared_ShouldSuppressPrediction, rcx);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CTFPlayer_AvoidPlayers, "client.dll", "48 89 54 24 ? 55 41 56", 0
|
||||
MAKE_HOOK(CTFPlayer_AvoidPlayers, S::CTFPlayer_AvoidPlayers(), void,
|
||||
void* rcx, CUserCmd* pCmd)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_AvoidPlayers[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pCmd);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_AvoidPlayers, rcx, pCmd);
|
||||
|
||||
if (Vars::Misc::Movement::NoPush.Value)
|
||||
return;
|
||||
|
||||
@@ -6,10 +6,7 @@ MAKE_SIGNATURE(CTFRagdoll_CreateTFRagdoll_BRenderAsZombie_Call, "client.dll", "8
|
||||
MAKE_HOOK(CTFPlayer_BRenderAsZombie, S::CTFPlayer_BRenderAsZombie(), bool,
|
||||
void* rcx, bool bWeaponsCheck)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_BRenderAsZombie[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, bWeaponsCheck);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_BRenderAsZombie, rcx, bWeaponsCheck);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CTFRagdoll_CreateTFRagdoll_BRenderAsZombie_Call();
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CTFPlayer_BuildTransformations, "client.dll", "48 8B C4 48 89 58
|
||||
MAKE_HOOK(CTFPlayer_BuildTransformations, S::CTFPlayer_BuildTransformations(), void,
|
||||
void* rcx, CStudioHdr* hdr, Vector* pos, Quaternion q[], const matrix3x4& cameraTransform, int boneMask, void* boneComputed)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_BuildTransformations[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, hdr, pos, q, cameraTransform, boneMask, boneComputed);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_BuildTransformations, rcx, hdr, pos, q, cameraTransform, boneMask, boneComputed);
|
||||
|
||||
auto pPlayer = reinterpret_cast<CTFPlayer*>(rcx);
|
||||
auto iOriginal = pPlayer->m_fFlags();
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CTFPlayer_DoAnimationEvent, "client.dll", "48 89 6C 24 ? 48 89 74
|
||||
MAKE_HOOK(CTFPlayer_DoAnimationEvent, S::CTFPlayer_DoAnimationEvent(), void,
|
||||
void* rcx, PlayerAnimEvent_t event, int nData)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_DoAnimationEvent[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, event, nData);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_DoAnimationEvent, rcx, event, nData);
|
||||
|
||||
auto pPlayer = reinterpret_cast<CTFPlayer*>(rcx);
|
||||
if (pPlayer->entindex() != I::EngineClient->GetLocalPlayer())
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CTFPlayer_FireBullet, "client.dll", "48 89 74 24 ? 55 57 41 55 41
|
||||
MAKE_HOOK(CTFPlayer_FireBullet, S::CTFPlayer_FireBullet(), void,
|
||||
void* rcx, CBaseCombatWeapon* pWeapon, const FireBulletsInfo_t& info, bool bDoEffects, int nDamageType, int nCustomDamageType)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_FireBullet[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pWeapon, info, nDamageType, nDamageType, nCustomDamageType);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_FireBullet, rcx, pWeapon, info, nDamageType, nDamageType, nCustomDamageType);
|
||||
|
||||
auto pLocal = reinterpret_cast<CTFPlayer*>(rcx);
|
||||
if (pLocal != H::Entities.GetLocal() || !pWeapon)
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CTFPlayer_GetMinFOV, "client.dll", "F3 0F 10 05 ? ? ? ? C3 CC CC
|
||||
MAKE_HOOK(CTFPlayer_GetMinFOV, S::CTFPlayer_GetMinFOV(), float,
|
||||
/*void* rcx*/)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_GetMinFOV[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(/*rcx*/);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_GetMinFOV, /*rcx*/);
|
||||
|
||||
return 0.f;
|
||||
}
|
||||
@@ -6,10 +6,7 @@ MAKE_SIGNATURE(CDamageAccountPanel_DisplayDamageFeedback_IsPlayerClass_Call, "cl
|
||||
MAKE_HOOK(CTFPlayer_IsPlayerClass, S::CTFPlayer_IsPlayerClass(), bool,
|
||||
void* rcx, int iClass)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_IsPlayerClass[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iClass);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_IsPlayerClass, rcx, iClass);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
static const auto dwDesired = S::CDamageAccountPanel_DisplayDamageFeedback_IsPlayerClass_Call();
|
||||
|
||||
@@ -14,10 +14,7 @@ MAKE_SIGNATURE(CBasePlayer_BuildFirstPersonMeathookTransformations_ShouldDrawThi
|
||||
MAKE_HOOK(CTFPlayer_ShouldDraw, S::CTFPlayer_ShouldDraw(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPlayer_ShouldDraw[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPlayer_ShouldDraw, rcx);
|
||||
|
||||
if (F::Spectate.HasTarget() && !I::EngineClient->IsHLTV())
|
||||
{
|
||||
@@ -35,10 +32,7 @@ MAKE_HOOK(CTFPlayer_ShouldDraw, S::CTFPlayer_ShouldDraw(), bool,
|
||||
MAKE_HOOK(CBasePlayer_ShouldDrawThisPlayer, S::CBasePlayer_ShouldDrawThisPlayer(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_ShouldDrawThisPlayer[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CBasePlayer_ShouldDrawThisPlayer, rcx);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
//const auto dwDesired = S::CTFWeaponBase_PostDataUpdate_ShouldDrawThisPlayer_Call();
|
||||
@@ -66,10 +60,7 @@ MAKE_HOOK(CBasePlayer_ShouldDrawThisPlayer, S::CBasePlayer_ShouldDrawThisPlayer(
|
||||
MAKE_HOOK(CBasePlayer_ShouldDrawLocalPlayer, S::CBasePlayer_ShouldDrawLocalPlayer(), bool,
|
||||
/*void* rcx*/)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBasePlayer_ShouldDrawLocalPlayer[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(/*rcx*/);
|
||||
#endif
|
||||
DEBUG_RETURN(CBasePlayer_ShouldDrawThisPlayer, /*rcx*/);
|
||||
|
||||
//const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
//const auto dwDesired = S::CBaseCombatWeapon_CalcOverrideModelIndex_ShouldDrawLocalPlayer_Call();
|
||||
@@ -90,10 +81,7 @@ MAKE_HOOK(CBasePlayer_ShouldDrawLocalPlayer, S::CBasePlayer_ShouldDrawLocalPlaye
|
||||
MAKE_HOOK(CBaseCombatWeapon_ShouldDraw, S::CBaseCombatWeapon_ShouldDraw(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseCombatWeapon_ShouldDraw[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseCombatWeapon_ShouldDraw, rcx);
|
||||
|
||||
if (F::Spectate.HasTarget() && !I::EngineClient->IsHLTV())
|
||||
{
|
||||
@@ -108,10 +96,7 @@ MAKE_HOOK(CBaseCombatWeapon_ShouldDraw, S::CBaseCombatWeapon_ShouldDraw(), bool,
|
||||
MAKE_HOOK(CViewRender_DrawViewModels, S::CViewRender_DrawViewModels(), void,
|
||||
void* rcx, const CViewSetup& viewRender, bool drawViewmodel)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_DrawViewModels[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, viewRender, drawViewmodel);
|
||||
#endif
|
||||
DEBUG_RETURN(CViewRender_DrawViewModels, rcx, viewRender, drawViewmodel);
|
||||
|
||||
CALL_ORIGINAL(rcx, viewRender, F::Spectate.HasTarget() && !I::EngineClient->IsHLTV() ? false : drawViewmodel);
|
||||
}
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CTFRagdoll_CreateTFRagdoll, "client.dll", "48 89 4C 24 ? 55 53 56
|
||||
MAKE_HOOK(CTFRagdoll_CreateTFRagdoll, S::CTFRagdoll_CreateTFRagdoll(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFRagdoll_CreateTFRagdoll[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFRagdoll_CreateTFRagdoll, rcx);
|
||||
|
||||
if (Vars::Visuals::Removals::Ragdolls.Value)
|
||||
return;
|
||||
|
||||
@@ -6,10 +6,7 @@ MAKE_SIGNATURE(CTFRocketLauncher_FireProjectile, "client.dll", "48 89 74 24 ? 57
|
||||
MAKE_HOOK(CTFRocketLauncher_CheckReloadMisfire, S::CTFRocketLauncher_CheckReloadMisfire(), bool,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFRocketLauncher_CheckReloadMisfire[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFRocketLauncher_CheckReloadMisfire, rcx);
|
||||
|
||||
auto pWeapon = reinterpret_cast<CTFWeaponBase*>(rcx);
|
||||
if (!SDK::AttribHookValue(0, "can_overload", pWeapon))
|
||||
@@ -40,10 +37,7 @@ MAKE_HOOK(CTFRocketLauncher_CheckReloadMisfire, S::CTFRocketLauncher_CheckReload
|
||||
MAKE_HOOK(CTFRocketLauncher_FireProjectile, S::CTFRocketLauncher_FireProjectile(), CBaseEntity*,
|
||||
void* rcx, CTFPlayer* pPlayer)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFRocketLauncher_FireProjectile[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pPlayer);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFRocketLauncher_FireProjectile, rcx, pPlayer);
|
||||
|
||||
auto pWeapon = reinterpret_cast<CTFWeaponBase*>(rcx);
|
||||
pWeapon->m_bRemoveable() = false;
|
||||
@@ -57,10 +51,7 @@ MAKE_SIGNATURE(CTFBat_Wood_LaunchBall, "client.dll", "40 53 48 83 EC ? 48 8B D9
|
||||
MAKE_HOOK(CTFBat_Wood_LaunchBall, S::CTFBat_Wood_LaunchBall(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFBat_Wood_LaunchBall[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFBat_Wood_LaunchBall, rcx);
|
||||
|
||||
auto pWeapon = reinterpret_cast<CTFWeaponBase*>(rcx);
|
||||
pWeapon->CalcIsAttackCritical();
|
||||
|
||||
@@ -7,10 +7,7 @@ static int s_iCurrentSeed = -1;
|
||||
MAKE_HOOK(CTFWeaponBase_CalcIsAttackCritical, S::CTFWeaponBase_CalcIsAttackCritical(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFWeaponBase_CalcIsAttackCritical[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFWeaponBase_CalcIsAttackCritical, rcx);
|
||||
|
||||
auto pWeapon = reinterpret_cast<CTFWeaponBase*>(rcx);
|
||||
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CTFWeaponBase_CanFireRandomCriticalShot, "client.dll", "F3 0F 58
|
||||
MAKE_HOOK(CTFWeaponBase_CanFireRandomCriticalShot, S::CTFWeaponBase_CanFireRandomCriticalShot(), bool,
|
||||
void* rcx, float flCritChance)
|
||||
{ // not present on the client so it will always be a crit behind otherwise
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFWeaponBase_CanFireRandomCriticalShot[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, flCritChance);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFWeaponBase_CanFireRandomCriticalShot, rcx, flCritChance);
|
||||
|
||||
int nRandomRangedCritDamage = F::CritHack.GetCritDamage();
|
||||
int nTotalDamage = F::CritHack.GetRangedDamage();
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CTFWeaponBase_GetShootSound, "client.dll", "40 55 56 41 56 48 83
|
||||
MAKE_HOOK(CTFWeaponBase_GetShootSound, S::CTFWeaponBase_GetShootSound(), const char*,
|
||||
void* rcx, int iIndex)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFWeaponBase_GetShootSound[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iIndex);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFWeaponBase_GetShootSound, rcx, iIndex);
|
||||
|
||||
if (Vars::Misc::Sound::GiantWeaponSounds.Value)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,5 @@ MAKE_SIGNATURE(CThirdPersonManager_Update, "client.dll", "40 53 48 83 EC ? 48 8B
|
||||
MAKE_HOOK(CThirdPersonManager_Update, S::CThirdPersonManager_Update(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CThirdPersonManager_Update[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CThirdPersonManager_Update, rcx);
|
||||
}
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CViewRender_DrawUnderwaterOverlay, "client.dll", "4C 8B DC 41 56
|
||||
MAKE_HOOK(CViewRender_DrawUnderwaterOverlay, S::CViewRender_DrawUnderwaterOverlay(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_DrawUnderwaterOverlay[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CViewRender_DrawUnderwaterOverlay, rcx);
|
||||
|
||||
if (!Vars::Visuals::Removals::ScreenOverlays.Value || SDK::CleanScreenshot())
|
||||
CALL_ORIGINAL(rcx);
|
||||
|
||||
@@ -12,10 +12,7 @@
|
||||
MAKE_HOOK(CViewRender_LevelInit, U::Memory.GetVirtual(I::ViewRender, 1), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_LevelInit[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CViewRender_LevelInit, rcx);
|
||||
|
||||
F::Materials.ReloadMaterials();
|
||||
F::Visuals.OverrideWorldTextures();
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CViewRender_PerformScreenOverlay, "client.dll", "4C 8B DC 49 89 5
|
||||
MAKE_HOOK(CViewRender_PerformScreenOverlay, S::CViewRender_PerformScreenOverlay(), void,
|
||||
void* rcx, int x, int y, int w, int h)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_PerformScreenOverlay[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, x, y, w, h);
|
||||
#endif
|
||||
DEBUG_RETURN(CViewRender_PerformScreenOverlay, rcx, x, y, w, h);
|
||||
|
||||
if (!Vars::Visuals::Removals::ScreenOverlays.Value || SDK::CleanScreenshot())
|
||||
CALL_ORIGINAL(rcx, x, y, w, h);
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
MAKE_HOOK(CViewRender_RenderView, U::Memory.GetVirtual(I::ViewRender, 6), void,
|
||||
void* rcx, const CViewSetup& view, ClearFlags_t nClearFlags, RenderViewInfo_t whatToDraw)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CViewRender_RenderView[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, view, nClearFlags, whatToDraw);
|
||||
#endif
|
||||
DEBUG_RETURN(CViewRender_RenderView, rcx, view, nClearFlags, whatToDraw);
|
||||
|
||||
CALL_ORIGINAL(rcx, view, nClearFlags, whatToDraw);
|
||||
if (SDK::CleanScreenshot() || G::Unload)
|
||||
|
||||
@@ -14,10 +14,7 @@ struct Restore_t
|
||||
MAKE_HOOK(CWeaponMedigun_PrimaryAttack, S::CWeaponMedigun_PrimaryAttack(), void,
|
||||
void* rcx)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CWeaponMedigun_PrimaryAttack[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx);
|
||||
#endif
|
||||
DEBUG_RETURN(CWeaponMedigun_PrimaryAttack, rcx);
|
||||
|
||||
auto pWeapon = reinterpret_cast<CWeaponMedigun*>(rcx);
|
||||
auto pOwner = pWeapon->m_hOwner()->As<CTFPlayer>();
|
||||
|
||||
@@ -214,10 +214,7 @@ static std::vector<std::function<void()>> s_vDynamic = {
|
||||
MAKE_HOOK(Cbuf_ExecuteCommand, S::Cbuf_ExecuteCommand(), void,
|
||||
CCommand& args, cmd_source_t source)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::Cbuf_ExecuteCommand[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(args, source);
|
||||
#endif
|
||||
DEBUG_RETURN(Cbuf_ExecuteCommand, args, source);
|
||||
|
||||
if (args.ArgC())
|
||||
{
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(CHudInspectPanel_UserCmd_InspectTarget_BIsFriendOrPartyMember_Cal
|
||||
MAKE_HOOK(ClientModeTFNormal_BIsFriendOrPartyMember, S::ClientModeTFNormal_BIsFriendOrPartyMember(), bool,
|
||||
void* rcx, CBaseEntity* pEntity)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::ClientModeTFNormal_BIsFriendOrPartyMember[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pEntity);
|
||||
#endif
|
||||
DEBUG_RETURN(ClientModeTFNormal_BIsFriendOrPartyMember, rcx, pEntity);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CHudInspectPanel_UserCmd_InspectTarget_BIsFriendOrPartyMember_Call();
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(DSP_Process, "engine.dll", "48 89 5C 24 ? 55 41 54 41 57 48 83 EC
|
||||
MAKE_HOOK(DSP_Process, S::DSP_Process(), void,
|
||||
unsigned int idsp, int* pbfront, int* pbrear, int* pbcenter, int sampleCount)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::DSP_Process[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(idsp, pbfront, pbrear, pbcenter, sampleCount);
|
||||
#endif
|
||||
DEBUG_RETURN(DSP_Process, idsp, pbfront, pbrear, pbcenter, sampleCount);
|
||||
|
||||
if (!Vars::Misc::Sound::RemoveDSP.Value)
|
||||
CALL_ORIGINAL(idsp, pbfront, pbrear, pbcenter, sampleCount);
|
||||
|
||||
@@ -9,6 +9,8 @@ extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg
|
||||
MAKE_HOOK(Direct3DDevice9_Present, U::Memory.GetVirtual(I::DirectXDevice, 17), HRESULT,
|
||||
IDirect3DDevice9* pDevice, const RECT* pSource, const RECT* pDestination, const RGNDATA* pDirtyRegion)
|
||||
{
|
||||
DEBUG_RETURN(Direct3DDevice9_Present, pDevice, pSource, pDestination, pDirtyRegion);
|
||||
|
||||
if (!G::Unload)
|
||||
F::Render.Render(pDevice);
|
||||
|
||||
@@ -18,6 +20,8 @@ MAKE_HOOK(Direct3DDevice9_Present, U::Memory.GetVirtual(I::DirectXDevice, 17), H
|
||||
MAKE_HOOK(Direct3DDevice9_Reset, U::Memory.GetVirtual(I::DirectXDevice, 16), HRESULT,
|
||||
LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters)
|
||||
{
|
||||
DEBUG_RETURN(Direct3DDevice9_Reset, pDevice, pPresentationParameters);
|
||||
|
||||
ImGui_ImplDX9_InvalidateDeviceObjects();
|
||||
const HRESULT Original = CALL_ORIGINAL(pDevice, pPresentationParameters);
|
||||
ImGui_ImplDX9_CreateDeviceObjects();
|
||||
@@ -46,6 +50,8 @@ LONG __stdcall WndProc::Func(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
MAKE_HOOK(VGuiSurface_LockCursor, U::Memory.GetVirtual(I::MatSystemSurface, 62), void,
|
||||
void* rcx)
|
||||
{
|
||||
DEBUG_RETURN(VGuiSurface_LockCursor, rcx);
|
||||
|
||||
if (F::Menu.m_bIsOpen)
|
||||
return I::MatSystemSurface->UnlockCursor();
|
||||
|
||||
@@ -55,6 +61,8 @@ MAKE_HOOK(VGuiSurface_LockCursor, U::Memory.GetVirtual(I::MatSystemSurface, 62),
|
||||
MAKE_HOOK(VGuiSurface_SetCursor, U::Memory.GetVirtual(I::MatSystemSurface, 51), void,
|
||||
void* rcx, HCursor cursor)
|
||||
{
|
||||
DEBUG_RETURN(VGuiSurface_SetCursor, rcx, cursor);
|
||||
|
||||
if (F::Menu.m_bIsOpen)
|
||||
{
|
||||
switch (F::Render.Cursor)
|
||||
|
||||
@@ -5,10 +5,7 @@ MAKE_SIGNATURE(DoEnginePostProcessing, "client.dll", "48 8B C4 44 89 48 ? 44 89
|
||||
MAKE_HOOK(DoEnginePostProcessing, S::DoEnginePostProcessing(), void,
|
||||
int x, int y, int w, int h, bool bFlashlightIsOn, bool bPostVGui)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::DoEnginePostProcessing[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(x, y, w, h, bFlashlightIsOn, bPostVGui);
|
||||
#endif
|
||||
DEBUG_RETURN(DoEnginePostProcessing, x, y, w, h, bFlashlightIsOn, bPostVGui);
|
||||
|
||||
if (!Vars::Visuals::Removals::PostProcessing.Value || SDK::CleanScreenshot())
|
||||
CALL_ORIGINAL(x, y, w, h, bFlashlightIsOn, bPostVGui);
|
||||
|
||||
@@ -10,10 +10,7 @@ MAKE_SIGNATURE(CTFWeaponBaseGun_FireBullet_FireBullets_Call, "client.dll", "0F 2
|
||||
MAKE_HOOK(FX_FireBullets, S::FX_FireBullets(), void,
|
||||
CTFWeaponBase* pWpn, int iPlayer, const Vec3& vecOrigin, const Vec3& vecAngles, int iWeapon, int iMode, int iSeed, float flSpread, float flDamage, bool bCritical)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::FX_FireBullets[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pWpn, iPlayer, vecOrigin, vecAngles, iWeapon, iMode, iSeed, flSpread, flDamage, bCritical);
|
||||
#endif
|
||||
DEBUG_RETURN(FX_FireBullets, pWpn, iPlayer, vecOrigin, vecAngles, iWeapon, iMode, iSeed, flSpread, flDamage, bCritical);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CTFWeaponBaseGun_FireBullet_FireBullets_Call();
|
||||
@@ -33,10 +30,7 @@ MAKE_SIGNATURE(CBasePlayer_ProcessUsercmds, "server.dll", "40 53 55 56 57 41 54
|
||||
MAKE_HOOK(FX_FireBullets_Server, S::FX_FireBullets_Server(), void,
|
||||
CTFWeaponBase* pWpn, int iPlayer, const Vec3& vecOrigin, const Vec3& vecAngles, int iWeapon, int iMode, int iSeed, float flSpread, float flDamage, bool bCritical)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::FX_FireBullets[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pWpn, iPlayer, vecOrigin, vecAngles, iWeapon, iMode, iSeed, flSpread, flDamage, bCritical);
|
||||
#endif
|
||||
DEBUG_RETURN(FX_FireBullets_Server, pWpn, iPlayer, vecOrigin, vecAngles, iWeapon, iMode, iSeed, flSpread, flDamage, bCritical);
|
||||
|
||||
if (Vars::Aimbot::General::NoSpread.Value)
|
||||
SDK::Output("FX_FireBullets", std::format("{}", iSeed).c_str(), { 0, 255, 0 });
|
||||
@@ -46,6 +40,8 @@ MAKE_HOOK(FX_FireBullets_Server, S::FX_FireBullets_Server(), void,
|
||||
MAKE_HOOK(CBasePlayer_ProcessUsercmds, S::CBasePlayer_ProcessUsercmds(), void,
|
||||
void* rcx, CUserCmd* cmds, int numcmds, int totalcmds, int dropped_packets, bool paused)
|
||||
{
|
||||
DEBUG_RETURN(CBasePlayer_ProcessUsercmds, rcx, cmds, numcmds, totalcmds, dropped_packets, paused);
|
||||
|
||||
bool bInAttack = false;
|
||||
for (int i = totalcmds - 1; i >= 0; i--)
|
||||
{
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(CNetGraphPanel_DrawTextFields_GetClientInterpAmount_Call2, "clien
|
||||
MAKE_HOOK(GetClientInterpAmount, S::GetClientInterpAmount(), float,
|
||||
)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::GetClientInterpAmount[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL();
|
||||
#endif
|
||||
DEBUG_RETURN(GetClientInterpAmount);
|
||||
|
||||
if (!Vars::Visuals::Removals::Lerp.Value && !Vars::Visuals::Removals::Interpolation.Value)
|
||||
return CALL_ORIGINAL();
|
||||
|
||||
@@ -8,10 +8,7 @@ MAKE_SIGNATURE(HostState_Restart, "engine.dll", "C7 05 ? ? ? ? ? ? ? ? C3 CC CC
|
||||
MAKE_HOOK(HostState_Shutdown, S::HostState_Shutdown(), void,
|
||||
)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::HostState_Shutdown[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL();
|
||||
#endif
|
||||
DEBUG_RETURN(HostState_Shutdown);
|
||||
|
||||
U::Core.m_bUnload = true;
|
||||
CALL_ORIGINAL();
|
||||
@@ -20,10 +17,7 @@ MAKE_HOOK(HostState_Shutdown, S::HostState_Shutdown(), void,
|
||||
MAKE_HOOK(HostState_Restart, S::HostState_Restart(), void,
|
||||
)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::HostState_Restart[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL();
|
||||
#endif
|
||||
DEBUG_RETURN(HostState_Restart);
|
||||
|
||||
U::Core.m_bUnload = true;
|
||||
CALL_ORIGINAL();
|
||||
|
||||
@@ -41,10 +41,7 @@ static bool s_bOriginalStartSolid = false;
|
||||
MAKE_HOOK(IEngineTrace_SetTraceEntity, U::Memory.GetVirtual(I::EngineTrace, 20), void,
|
||||
void* rcx, ICollideable* pCollideable, trace_t* pTrace)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::IEngineTrace_SetTraceEntity[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pCollideable, pTrace);
|
||||
#endif
|
||||
DEBUG_RETURN(IEngineTrace_SetTraceEntity, rcx, pCollideable, pTrace);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::IEngineTrace_TraceRay_SetTraceEntity_Call();
|
||||
@@ -58,10 +55,7 @@ MAKE_HOOK(IEngineTrace_SetTraceEntity, U::Memory.GetVirtual(I::EngineTrace, 20),
|
||||
MAKE_HOOK(CM_BoxTrace, S::CM_BoxTrace(), void,
|
||||
const Ray_t& ray, int headnode, int brushmask, bool computeEndpt, trace_t& tr)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CM_BoxTrace[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(ray, headnode, brushmask, computeEndpt, tr);
|
||||
#endif
|
||||
DEBUG_RETURN(CM_BoxTrace, ray, headnode, brushmask, computeEndpt, tr);
|
||||
|
||||
CALL_ORIGINAL(ray, headnode, brushmask, computeEndpt, tr);
|
||||
|
||||
@@ -71,10 +65,7 @@ MAKE_HOOK(CM_BoxTrace, S::CM_BoxTrace(), void,
|
||||
MAKE_HOOK(CM_TraceToLeaf_True, S::CM_TraceToLeaf_True(), void,
|
||||
TraceInfo_t* pTraceInfo, int ndxLeaf, float startFrac, float endFrac)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CM_TraceToLeaf_True[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pTraceInfo, ndxLeaf, startFrac, endFrac);
|
||||
#endif
|
||||
DEBUG_RETURN(CM_TraceToLeaf_True, pTraceInfo, ndxLeaf, startFrac, endFrac);
|
||||
|
||||
if (pTraceInfo->m_contents & CONTENTS_NOSTARTSOLID)
|
||||
{
|
||||
@@ -91,10 +82,7 @@ MAKE_HOOK(CM_TraceToLeaf_True, S::CM_TraceToLeaf_True(), void,
|
||||
MAKE_HOOK(CM_TraceToLeaf_False, S::CM_TraceToLeaf_False(), void,
|
||||
TraceInfo_t* pTraceInfo, int ndxLeaf, float startFrac, float endFrac)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CM_TraceToLeaf_False[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pTraceInfo, ndxLeaf, startFrac, endFrac);
|
||||
#endif
|
||||
DEBUG_RETURN(CM_TraceToLeaf_False, pTraceInfo, ndxLeaf, startFrac, endFrac);
|
||||
|
||||
if (pTraceInfo->m_contents & CONTENTS_NOSTARTSOLID)
|
||||
{
|
||||
@@ -111,10 +99,7 @@ MAKE_HOOK(CM_TraceToLeaf_False, S::CM_TraceToLeaf_False(), void,
|
||||
MAKE_HOOK(CM_ClipBoxToBrush_True, S::CM_ClipBoxToBrush_True(), void,
|
||||
TraceInfo_t* pTraceInfo, void* brush)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CM_ClipBoxToBrush_True[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pTraceInfo, brush);
|
||||
#endif
|
||||
DEBUG_RETURN(CM_ClipBoxToBrush_True, pTraceInfo, brush);
|
||||
|
||||
CALL_ORIGINAL(pTraceInfo, brush);
|
||||
|
||||
@@ -128,10 +113,7 @@ MAKE_HOOK(CM_ClipBoxToBrush_True, S::CM_ClipBoxToBrush_True(), void,
|
||||
MAKE_HOOK(CM_ClipBoxToBrush_False, S::CM_ClipBoxToBrush_False(), void,
|
||||
TraceInfo_t* pTraceInfo, void* brush)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CM_ClipBoxToBrush_False[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(pTraceInfo, brush);
|
||||
#endif
|
||||
DEBUG_RETURN(CM_ClipBoxToBrush_False, pTraceInfo, brush);
|
||||
|
||||
CALL_ORIGINAL(pTraceInfo, brush);
|
||||
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
MAKE_HOOK(IEngineTrace_TraceRay, U::Memory.GetVirtual(I::EngineTrace, 4), void,
|
||||
void* rcx, const Ray_t& ray, unsigned int fMask, ITraceFilter* pTraceFilter, trace_t* pTrace)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::IEngineTrace_TraceRay[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, ray, fMask, pTraceFilter, pTrace);
|
||||
#endif
|
||||
DEBUG_RETURN(IEngineTrace_TraceRay, rcx, ray, fMask, pTraceFilter, pTrace);
|
||||
|
||||
CALL_ORIGINAL(rcx, ray, fMask, pTraceFilter, pTrace);
|
||||
if (Vars::Debug::VisualizeTraces.Value)
|
||||
|
||||
@@ -17,10 +17,7 @@
|
||||
MAKE_HOOK(IEngineVGui_Paint, U::Memory.GetVirtual(I::EngineVGui, 14), void,
|
||||
void* rcx, int iMode)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::IEngineVGui_Paint[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, iMode);
|
||||
#endif
|
||||
DEBUG_RETURN(IEngineVGui_Paint, rcx, iMode);
|
||||
|
||||
if (G::Unload)
|
||||
return CALL_ORIGINAL(rcx, iMode);
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
MAKE_HOOK(IMatSystemSurface_OnScreenSizeChanged, U::Memory.GetVirtual(I::MatSystemSurface, 111), void,
|
||||
void* rcx, int nOldWidth, int nOldHeight)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::IMatSystemSurface_OnScreenSizeChanged[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, nOldWidth, nOldHeight);
|
||||
#endif
|
||||
DEBUG_RETURN(IMatSystemSurface_OnScreenSizeChanged, rcx, nOldWidth, nOldHeight);
|
||||
|
||||
CALL_ORIGINAL(rcx, nOldWidth, nOldHeight);
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
MAKE_HOOK(IMaterialSystem_FindTexture, U::Memory.GetVirtual(I::MaterialSystem, 79), ITexture*,
|
||||
void* rcx, char const* pTextureName, const char* pTextureGroupName, bool complain, int nAdditionalCreationFlags)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::IMaterialSystem_FindTexture[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pTextureName, pTextureGroupName, complain, nAdditionalCreationFlags);
|
||||
#endif
|
||||
DEBUG_RETURN(IMaterialSystem_FindTexture, rcx, pTextureName, pTextureGroupName, complain, nAdditionalCreationFlags);
|
||||
|
||||
auto pReturn = CALL_ORIGINAL(rcx, pTextureName, pTextureGroupName, complain, nAdditionalCreationFlags);
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
MAKE_HOOK(IPanel_PaintTraverse, U::Memory.GetVirtual(I::Panel, 41), void,
|
||||
void* rcx, VPANEL vguiPanel, bool forceRepaint, bool allowForce)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::IPanel_PaintTraverse[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, vguiPanel, forceRepaint, allowForce);
|
||||
#endif
|
||||
DEBUG_RETURN(IPanel_PaintTraverse, rcx, vguiPanel, forceRepaint, allowForce);
|
||||
|
||||
if (!Vars::Visuals::UI::StreamerMode.Value)
|
||||
return CALL_ORIGINAL(rcx, vguiPanel, forceRepaint, allowForce);
|
||||
|
||||
@@ -7,10 +7,7 @@ MAKE_SIGNATURE(GetPlayerNameForSteamID_GetFriendPersonaName_Call, "client.dll",
|
||||
MAKE_HOOK(ISteamFriends_GetFriendPersonaName, U::Memory.GetVirtual(I::SteamFriends, 7), const char*,
|
||||
void* rcx, CSteamID steamIDFriend)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::ISteamFriends_GetFriendPersonaName[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, steamIDFriend);
|
||||
#endif
|
||||
DEBUG_RETURN(ISteamFriends_GetFriendPersonaName, rcx, steamIDFriend);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::GetPlayerNameForSteamID_GetFriendPersonaName_Call();
|
||||
|
||||
@@ -54,10 +54,7 @@ static inline int GetDatacenter(uint32_t uHash)
|
||||
MAKE_HOOK(ISteamNetworkingUtils_GetPingToDataCenter, U::Memory.GetVirtual(I::SteamNetworkingUtils, 8), int,
|
||||
void* rcx, SteamNetworkingPOPID popID, SteamNetworkingPOPID* pViaRelayPoP)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::ISteamNetworkingUtils_GetPingToDataCenter[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, popID, pViaRelayPoP);
|
||||
#endif
|
||||
DEBUG_RETURN(ISteamNetworkingUtils_GetPingToDataCenter, rcx, popID, pViaRelayPoP);
|
||||
|
||||
int iReturn = CALL_ORIGINAL(rcx, popID, pViaRelayPoP);
|
||||
if (!Vars::Misc::Queueing::ForceRegions.Value || iReturn < 0)
|
||||
@@ -74,10 +71,7 @@ MAKE_HOOK(ISteamNetworkingUtils_GetPingToDataCenter, U::Memory.GetVirtual(I::Ste
|
||||
MAKE_HOOK(CTFPartyClient_RequestQueueForMatch, S::CTFPartyClient_RequestQueueForMatch(), void,
|
||||
void* rcx, int eMatchGroup)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CTFPartyClient_RequestQueueForMatch[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, eMatchGroup);
|
||||
#endif
|
||||
DEBUG_RETURN(CTFPartyClient_RequestQueueForMatch, rcx, eMatchGroup);
|
||||
|
||||
I::TFGCClientSystem->SetPendingPingRefresh(true);
|
||||
I::TFGCClientSystem->PingThink();
|
||||
|
||||
@@ -12,10 +12,7 @@ MAKE_SIGNATURE(CBaseAnimating_InternalDrawModel, "client.dll", "48 8B C4 55 56 4
|
||||
MAKE_HOOK(IVModelRender_DrawModelExecute, U::Memory.GetVirtual(I::ModelRender, 19), void,
|
||||
void* rcx, const DrawModelState_t& pState, const ModelRenderInfo_t& pInfo, matrix3x4* pBoneToWorld)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::IVModelRender_DrawModelExecute[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, pState, pInfo, pBoneToWorld);
|
||||
#endif
|
||||
DEBUG_RETURN(IVModelRender_DrawModelExecute, rcx, pState, pInfo, pBoneToWorld);
|
||||
|
||||
if (I::EngineVGui->IsGameUIVisible() || SDK::CleanScreenshot()
|
||||
|| F::CameraWindow.m_bDrawing || !F::Materials.m_bLoaded || G::Unload)
|
||||
@@ -46,10 +43,7 @@ static bool s_bDrawingViewmodel = false;
|
||||
MAKE_HOOK(CBaseAnimating_DrawModel, S::CBaseAnimating_DrawModel(), int,
|
||||
void* rcx, int flags)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_DrawModel[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, flags);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseAnimating_DrawModel, rcx, flags);
|
||||
|
||||
const auto dwRetAddr = uintptr_t(_ReturnAddress());
|
||||
const auto dwDesired = S::CEconEntity_DrawOverriddenViewmodel_DrawModel_Call();
|
||||
@@ -67,10 +61,7 @@ MAKE_HOOK(CBaseAnimating_DrawModel, S::CBaseAnimating_DrawModel(), int,
|
||||
MAKE_HOOK(CBaseAnimating_InternalDrawModel, S::CBaseAnimating_InternalDrawModel(), int,
|
||||
void* rcx, int flags)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::CBaseAnimating_InternalDrawModel[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, flags);
|
||||
#endif
|
||||
DEBUG_RETURN(CBaseAnimating_InternalDrawModel, rcx, flags);
|
||||
|
||||
if (!s_bDrawingViewmodel || !(flags & STUDIO_RENDER))
|
||||
return CALL_ORIGINAL(rcx, flags);
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
MAKE_HOOK(IVModelRender_ForcedMaterialOverride, U::Memory.GetVirtual(I::ModelRender, 1), void,
|
||||
IVModelRender* rcx, IMaterial* mat, OverrideType_t type)
|
||||
{
|
||||
#ifdef DEBUG_HOOKS
|
||||
if (!Vars::Hooks::IVModelRender_ForcedMaterialOverride[DEFAULT_BIND])
|
||||
return CALL_ORIGINAL(rcx, mat, type);
|
||||
#endif
|
||||
DEBUG_RETURN(IVModelRender_ForcedMaterialOverride, rcx, mat, type);
|
||||
|
||||
if (F::Chams.m_bRendering || F::Glow.m_bRendering)
|
||||
return;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user