diff --git a/include/visual/EffectChams.hpp b/include/visual/EffectChams.hpp index e1dca2fe..a48e8e4d 100755 --- a/include/visual/EffectChams.hpp +++ b/include/visual/EffectChams.hpp @@ -34,6 +34,7 @@ public: return enabled; }; + void SetEntityColor(CachedEntity* ent, rgba_t color); rgba_t ChamsColor(IClientEntity *entity); bool ShouldRenderChams(IClientEntity *entity); void RenderChams(int idx); diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 9aa94e1f..a9a838f9 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -216,7 +216,9 @@ void CreateMove() } #if ENABLE_VISUALS == 1 + static effect_chams::EffectChams Effectchams; hacks::shared::esp::SetEntityColor(target_entity, colors::pink); + Effectchams.SetEntityColor(target_entity, colors::pink); #endif // Local player check + Aimkey diff --git a/src/visual/EffectChams.cpp b/src/visual/EffectChams.cpp index d3e87393..2bc016d1 100755 --- a/src/visual/EffectChams.cpp +++ b/src/visual/EffectChams.cpp @@ -101,10 +101,15 @@ void EffectChams::EndRenderChams() CMatRenderContextPtr ptr(GET_RENDER_CONTEXT); g_IVModelRender->ForcedMaterialOverride(nullptr); } - +bool data[32] = {}; +void EffectChams::SetEntityColor (CachedEntity* ent, rgba_t color) { + data[ent->m_IDX] = color; +} rgba_t EffectChams::ChamsColor(IClientEntity *entity) { CachedEntity *ent = ENTITY(entity->entindex()); + if (data[entity->entindex()]) + return colors::pink; if (CE_BAD(ent)) return colors::white; if (re::C_BaseCombatWeapon::IsBaseCombatWeapon(entity))