fix glow
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include <CS2/Hook/Hook_AntiTamper.hpp>
|
||||
#include <CS2/Hook/Hook_IsLoadoutAllowed.hpp>
|
||||
#include <CS2/Hook/Hook_EquipItemInLoadout.hpp>
|
||||
#include <CS2/Hook/Hook_DrawGlow.hpp>
|
||||
|
||||
static CHook_Loader g_CHook_Loader{};
|
||||
|
||||
@@ -77,6 +78,7 @@ auto CHook_Loader::InstallSecondHook() -> bool
|
||||
{ { XorStr( "Hook::AntiTamper" ) , XorStr( "40 53 41 57 48 83 EC ? 48 89 74 24 ? 48 8B F1" ) , CLIENT_DLL } , &Hook_AntiTamper , reinterpret_cast<LPVOID*>( &AntiTamper_o ) },
|
||||
{ {XorStr("Hook::IsLoadoutAllowed") , XorStr("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 48 8B E9 48 8B 0D ? ? ? ? ? ? ? FF 50") , CLIENT_DLL } ,&Hook_IsLoadoutAllowed , reinterpret_cast<LPVOID*>(&IsLoadoutAllowed_o) , true , true } ,
|
||||
{ { XorStr( "Hook::EquipItemInLoadout" ) , XorStr( "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 89 54 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC ? 0F B7 FA" ) , CLIENT_DLL } ,& Hook_EquipItemInLoadout , reinterpret_cast<LPVOID*>( &EquipItemInLoadout_o ) },
|
||||
{ { XorStr( "Hook::DrawGlow" ) , XorStr( "40 53 48 83 EC 20 48 8B 54" ) , CLIENT_DLL } , &Hook_DrawGlow , reinterpret_cast<LPVOID*>( &DrawGlow_o ) },
|
||||
};
|
||||
|
||||
return InstallHooks();
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "Hook_DrawGlow.hpp"
|
||||
|
||||
#include <intrin.h>
|
||||
|
||||
#include <CS2/SDK/SDK.hpp>
|
||||
#include <CS2/SDK/Interface/IEngineToClient.hpp>
|
||||
|
||||
#include <AndromedaClient/Features/CVisual/CVisual.hpp>
|
||||
|
||||
auto Hook_DrawGlow( CGlowProperty* pCGlowProperty ) -> void*
|
||||
{
|
||||
auto pResult = DrawGlow_o( pCGlowProperty );
|
||||
|
||||
if ( SDK::Interfaces::EngineToClient()->IsInGame() )
|
||||
GetVisual()->OnDrawGlow( pCGlowProperty );
|
||||
|
||||
return pResult;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <Common/Common.hpp>
|
||||
|
||||
class CGlowProperty;
|
||||
|
||||
auto Hook_DrawGlow( CGlowProperty* pCGlowProperty ) -> void*;
|
||||
|
||||
using DrawGlow_t = decltype( &Hook_DrawGlow );
|
||||
inline DrawGlow_t DrawGlow_o = nullptr;
|
||||
Reference in New Issue
Block a user