ESP fix
my bad hitboxupdate isn't fixed
This commit is contained in:
parent
82231a7ca4
commit
59ea88464a
2
TODO
2
TODO
@ -8,6 +8,8 @@ fix skyboxchanger (not working and crash)
|
||||
|
||||
add rev distance to cathook (optional)
|
||||
|
||||
fix hitboxupdate in ESP (crash) i had delete it
|
||||
|
||||
need regenerate nav files
|
||||
|
||||
update ClassIDs
|
||||
|
@ -81,7 +81,7 @@ class ESPData
|
||||
{
|
||||
public:
|
||||
int string_count{ 0 };
|
||||
std::vector<std::pair<std::string, rgba_t>> strings{};
|
||||
boost::unordered_flat_map<std::string, rgba_t> strings{};
|
||||
rgba_t color{ colors::empty };
|
||||
bool needs_paint{ false };
|
||||
bool has_collide{ false };
|
||||
@ -94,27 +94,10 @@ boost::unordered_flat_map<u_int16_t, ESPData> data;
|
||||
inline void AddEntityString(CachedEntity *entity, const std::string &string, const rgba_t &color = colors::empty)
|
||||
{
|
||||
ESPData &entity_data = data[entity->m_IDX];
|
||||
entity_data.strings.emplace_back(string, color);
|
||||
++(entity_data.string_count);
|
||||
if (entity_data.strings.try_emplace(string, color).second)
|
||||
++(entity_data.string_count);
|
||||
entity_data.needs_paint = true;
|
||||
}
|
||||
void _FASTCALL hitboxUpdate(CachedEntity *ent)
|
||||
{
|
||||
// Check to prevent crashes
|
||||
if (CE_BAD(ent) || !ent->m_bAlivePlayer())
|
||||
return;
|
||||
if (ent->m_Type() == ENTITY_PLAYER)
|
||||
{
|
||||
auto hit = ent->hitboxes.GetHitbox(0);
|
||||
if (!hit)
|
||||
return;
|
||||
Vector hbm, hbx;
|
||||
if (draw::WorldToScreen(hit->min, hbm) && draw::WorldToScreen(hit->max, hbx))
|
||||
{
|
||||
Vector head_scr;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Sets an entitys esp color
|
||||
void SetEntityColor(CachedEntity *entity, const rgba_t &color)
|
||||
{
|
||||
@ -384,7 +367,6 @@ static void cm()
|
||||
// Get an entity from the loop tick and process it
|
||||
|
||||
ProcessEntity(ent);
|
||||
hitboxUpdate(ent);
|
||||
ESPData &ent_dat = data.try_emplace(ent->m_IDX, ESPData{}).first->second;
|
||||
|
||||
if (ent_dat.needs_paint)
|
||||
@ -413,7 +395,6 @@ static void cm()
|
||||
if (player)
|
||||
{
|
||||
ProcessEntity(ent_index);
|
||||
hitboxUpdate(ent_index);
|
||||
}
|
||||
else if (entity_tick)
|
||||
ProcessEntity(ent_index);
|
||||
@ -932,8 +913,6 @@ void ProcessEntityPT()
|
||||
if (ent_data.string_count)
|
||||
DrawStrings(type, transparent, screen, ent_data, ent);
|
||||
}
|
||||
for (auto &[key, esp_data] : data)
|
||||
esp_data.strings.clear();
|
||||
}
|
||||
static std::string write_str;
|
||||
// Used to process entities from CreateMove
|
||||
|
Reference in New Issue
Block a user