update readme + add glow check

This commit is contained in:
nullifiedcat 2017-05-03 22:26:06 +03:00
parent c48f616991
commit 8fb2d03e8e
3 changed files with 57 additions and 60 deletions

View File

@ -6,7 +6,7 @@
Ubuntu (and probably Debian) users can run this script: Ubuntu (and probably Debian) users can run this script:
``` ```
sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot -y && sudo apt update && sudo apt install libc6-dev gcc-6 g++-6 g++-6-multilib gdb -y && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4 sudo apt update && sudo apt install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt update && sudo apt install gcc-snapshot -y && sudo apt update && sudo apt install git libc6-dev gcc-6 g++-6 libc6-dev:i386 g++-6-multilib gdb -y && git clone --recursive https://github.com/nullifiedcat/cathook && cd cathook && make -j4
``` ```
**Errors while installing?** **Errors while installing?**

View File

@ -67,17 +67,11 @@ void hack::ExecuteCommand(const std::string command) {
ConCommand* hack::c_Cat = 0; ConCommand* hack::c_Cat = 0;
void hack::CC_Cat(const CCommand& args) { void hack::CC_Cat(const CCommand& args) {
g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::blu), "cathook"); g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::white), "cathook");
g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::white), " by "); g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::blu), " by ");
g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::blu), "d4rkc4t\n"); g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::red), "nullifiedcat\n");
g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::white), "build: " CATHOOK_BUILD_NUMBER " \"" CATHOOK_BUILD_NAME "\"\n"); #if defined(GIT_COMMIT_HASH) && defined(GIT_COMMIT_DATE)
#if _DEVELOPER g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::white), "commit: #" GIT_COMMIT_HASH " " GIT_COMMIT_DATE "\n");
g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::red), "[DEVELOPER BUILD]\n");
#else
g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::red), "Build for user " __DRM_NAME " (Early Access)\n");
#endif
#ifdef __DRM_NOTES
g_ICvar->ConsoleColorPrintf(*reinterpret_cast<Color*>(&colors::red), "Build notes: " __DRM_NOTES "\n");
#endif #endif
} }
@ -167,7 +161,7 @@ void hack::Initialize() {
hooks::hkInput->Init((void*)g_IInput, 0); hooks::hkInput->Init((void*)g_IInput, 0);
hooks::hkInput->HookMethod((void*)GetUserCmd_hook, hooks::offGetUserCmd); hooks::hkInput->HookMethod((void*)GetUserCmd_hook, hooks::offGetUserCmd);
hooks::hkInput->Apply(); hooks::hkInput->Apply();
logging::Info("Before hacking: %s", g_ISteamFriends->GetPersonaName()); //logging::Info("Before hacking: %s", g_ISteamFriends->GetPersonaName());
hooks::hkIVModelRender = new hooks::VMTHook(); hooks::hkIVModelRender = new hooks::VMTHook();
hooks::hkIVModelRender->Init(g_IVModelRender, 0); hooks::hkIVModelRender->Init(g_IVModelRender, 0);
hooks::hkIVModelRender->HookMethod((void*)DrawModelExecute_hook, hooks::offDrawModelExecute); hooks::hkIVModelRender->HookMethod((void*)DrawModelExecute_hook, hooks::offDrawModelExecute);
@ -176,7 +170,7 @@ void hack::Initialize() {
hooks::hkSteamFriends->Init(g_ISteamFriends, 0); hooks::hkSteamFriends->Init(g_ISteamFriends, 0);
hooks::hkSteamFriends->HookMethod((void*)GetFriendPersonaName_hook, hooks::offGetFriendPersonaName); hooks::hkSteamFriends->HookMethod((void*)GetFriendPersonaName_hook, hooks::offGetFriendPersonaName);
hooks::hkSteamFriends->Apply(); hooks::hkSteamFriends->Apply();
logging::Info("After hacking: %s", g_ISteamFriends->GetPersonaName()); //logging::Info("After hacking: %s", g_ISteamFriends->GetPersonaName());
// Sadly, it doesn't work as expected :( // Sadly, it doesn't work as expected :(
/*hooks::hkBaseClientState = new hooks::VMTHook(); /*hooks::hkBaseClientState = new hooks::VMTHook();
hooks::hkBaseClientState->Init((void*)g_IBaseClientState, 0); hooks::hkBaseClientState->Init((void*)g_IBaseClientState, 0);

View File

@ -190,7 +190,9 @@ void FrameStageNotify_hook(void* thisptr, int stage) {
} }
} }
} }
static ConVar* glow_outline_effect = g_ICvar->FindVar("glow_outline_effect_enable");
if (TF && cathook && !g_Settings.bInvalid && stage == FRAME_RENDER_START) { if (TF && cathook && !g_Settings.bInvalid && stage == FRAME_RENDER_START) {
if (glow_outline_effect->GetBool()) {
if (glow_enabled) { if (glow_enabled) {
for (int i = 0; i < g_GlowObjectManager->m_GlowObjectDefinitions.m_Size; i++) { for (int i = 0; i < g_GlowObjectManager->m_GlowObjectDefinitions.m_Size; i++) {
GlowObjectDefinition_t& glowobject = g_GlowObjectManager->m_GlowObjectDefinitions[i]; GlowObjectDefinition_t& glowobject = g_GlowObjectManager->m_GlowObjectDefinitions[i];
@ -242,6 +244,7 @@ void FrameStageNotify_hook(void* thisptr, int stage) {
} }
} }
} }
}
if (force_thirdperson && !g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->entity)) { if (force_thirdperson && !g_pLocalPlayer->life_state && CE_GOOD(g_pLocalPlayer->entity)) {
CE_INT(g_pLocalPlayer->entity, netvar.nForceTauntCam) = 1; CE_INT(g_pLocalPlayer->entity, netvar.nForceTauntCam) = 1;
} }