Revving and taunting condition esp (#1144)

This commit is contained in:
NotAnUser1 2020-10-28 16:27:03 +03:00 committed by GitHub
parent 46e139a44e
commit dc91ef291f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/*
/*
* HEsp.cpp
*
* Created on: Oct 6, 2016
@ -218,6 +218,8 @@ std::unordered_map<studiohdr_t *, bonelist_s> bonelist_map{};
const std::string hoovy_str = "Hoovy";
const std::string dormant_str = "*Dormant*";
const std::string jarated_str = "*Jarate*";
const std::string taunting_str = "*Taunt*";
const std::string revving_str = "*Revved*";
const std::string slowed_str = "*Slow*";
const std::string zooming_str = "*Zoom*";
const std::string crit_str = "*Crits*";
@ -1476,19 +1478,26 @@ void _FASTCALL ProcessEntity(CachedEntity *ent)
// Crit
if (IsPlayerCritBoosted(ent))
AddEntityString(ent, crit_str, colors::orange);
// We want revving, zoomed and slowed to be mutually exclusive. Otherwise slowed and zoomed/revving will show at the same time.
// Revving
auto weapon_idx = CE_INT(ent, netvar.hActiveWeapon) & 0xFFF;
CachedEntity *weapon = IDX_GOOD(weapon_idx) ? ENTITY(weapon_idx) : nullptr;
if (CE_GOOD(weapon) && weapon->m_iClassID() == CL_CLASS(CTFMinigun) && CE_INT(weapon, netvar.iWeaponState) != 0)
AddEntityString(ent, revving_str, colors::FromRGBA8(220.0f, 220.0f, 220.0f, 255.0f));
// Zoomed
if (HasCondition<TFCond_Zoomed>(ent))
{
else if (HasCondition<TFCond_Zoomed>(ent))
AddEntityString(ent, zooming_str, colors::FromRGBA8(220.0f, 220.0f, 220.0f, 255.0f));
// Slowed
}
// Slowed
else if (HasCondition<TFCond_Slowed>(ent))
{
AddEntityString(ent, slowed_str, colors::FromRGBA8(220.0f, 220.0f, 220.0f, 255.0f));
}
// Jarated
if (HasCondition<TFCond_Jarated>(ent))
AddEntityString(ent, jarated_str, colors::yellow);
// Taunting
if (HasCondition<TFCond_Taunting>(ent))
AddEntityString(ent, taunting_str, colors::FromRGBA8(220.0f, 220.0f, 220.0f, 255.0f));
// Dormant
if (CE_VALID(ent) && RAW_ENT(ent)->IsDormant())
AddEntityString(ent, dormant_str, colors::red);

View File

@ -390,9 +390,10 @@ void Draw()
}
if (!debug_info)
return;
if (CE_GOOD(g_pLocalPlayer->weapon()))
auto local = LOCAL_W;
if (CE_GOOD(local))
{
AddSideString(format("Slot: ", re::C_BaseCombatWeapon::GetSlot(RAW_ENT(g_pLocalPlayer->weapon()))));
AddSideString(format("Slot: ", re::C_BaseCombatWeapon::GetSlot(RAW_ENT(local))));
AddSideString(format("Taunt Concept: ", CE_INT(LOCAL_E, netvar.m_iTauntConcept)));
AddSideString(format("Taunt Index: ", CE_INT(LOCAL_E, netvar.m_iTauntIndex)));
AddSideString(format("Sequence: ", CE_INT(LOCAL_E, netvar.m_nSequence)));
@ -408,6 +409,8 @@ void Draw()
if (current_user_cmd)
AddSideString(format("command_number: ", last_cmd_number));
AddSideString(format("clip: ", CE_INT(g_pLocalPlayer->weapon(), netvar.m_iClip1)));
if (local->m_iClassID() == CL_CLASS(CTFMinigun))
AddSideString(format("Weapon state: ", CE_INT(local, netvar.iWeaponState)));
/*AddSideString(colors::white, "Weapon: %s [%i]",
RAW_ENT(g_pLocalPlayer->weapon())->GetClientClass()->GetName(),
g_pLocalPlayer->weapon()->m_iClassID());