From dc8e3eff47c4ad5df059ef0fa70f58faa87bafeb Mon Sep 17 00:00:00 2001 From: bencat07 Date: Mon, 10 Jun 2019 23:09:46 +0200 Subject: [PATCH] Fix ESP related player resource issues --- src/hacks/ESP.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hacks/ESP.cpp b/src/hacks/ESP.cpp index 3df16d10..bee61add 100644 --- a/src/hacks/ESP.cpp +++ b/src/hacks/ESP.cpp @@ -1041,7 +1041,7 @@ void _FASTCALL ProcessEntity(CachedEntity *ent) // If text health is true, then add a string with the health if ((int) show_health == 1 || (int) show_health == 3) { - AddEntityString(ent, format(g_pPlayerResource->GetHealth(ent), '/', g_pPlayerResource->GetMaxHealth(ent), " HP"), colors::Health(g_pPlayerResource->GetHealth(ent), g_pPlayerResource->GetMaxHealth(ent))); + AddEntityString(ent, format(ent->m_iHealth(), '/', ent->m_iMaxHealth(), " HP"), colors::Health(ent->m_iHealth(), ent->m_iMaxHealth())); } // Set the entity to repaint espdata.needs_paint = true; @@ -1145,7 +1145,7 @@ void _FASTCALL ProcessEntity(CachedEntity *ent) // Health esp if ((int) show_health == 1 || (int) show_health == 3) { - AddEntityString(ent, format(ent->m_iHealth(), '/', ent->m_iMaxHealth(), " HP"), colors::Health(ent->m_iHealth(), ent->m_iMaxHealth())); + AddEntityString(ent, format(g_pPlayerResource->GetHealth(ent), '/', g_pPlayerResource->GetMaxHealth(ent), " HP"), colors::Health(g_pPlayerResource->GetHealth(ent), g_pPlayerResource->GetMaxHealth(ent))); } IF_GAME(IsTF()) {