Visible only backtracking dots
I recently added backtracking to my paste. I added the backtracking cross to visualize the backtracking. But it shows trough walls. any way to make it visible only?
void CEsp::BacktrackingCross(IClientEntity* pEntity)
{
for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); i++)
{
player_info_t pinfo;
if (pEntity && pEntity != hackManager.pLocal() && !pEntity->IsDormant())
{
if (Interfaces::Engine->GetPlayerInfo(i, &pinfo) && pEntity->IsAlive())
{
if (Menu::Window.LegitBotTab.BacktrackingBacktrack.GetState())
{
if (hackManager.pLocal()->IsAlive())
{
for (int t = 0; t < 12; ++t)
{
Vector screenbacktrack[64][12];
if (headPositions[i][t].simtime && headPositions[i][t].simtime + 1 > hackManager.pLocal()->GetSimulationTime())
{
if (Render::WorldToScreen(headPositions[i][t].hitboxPos, screenbacktrack[i][t]))
{
Interfaces::Surface->DrawSetColor(Color(255, 0, 0, 255));
Interfaces::Surface->DrawOutlinedRect(screenbacktrack[i][t].x, screenbacktrack[i][t].y, screenbacktrack[i][t].x + 2, screenbacktrack[i][t].y + 2);
}
}
}
}
else
{
memset(&headPositions[0][0], 0, sizeof(headPositions));
}
}
{
if (hackManager.pLocal()->IsAlive())
{
for (int t = 0; t < 12; ++t)
{
Vector screenbacktrack[64];
if (backtracking->records[i].tick_count + 12 > Interfaces::Globals->tickcount)
{
if (Render::WorldToScreen(backtracking->records[i].headPosition, screenbacktrack[i]))
{
Interfaces::Surface->DrawSetColor(Color(255, 0, 0, 255));
Interfaces::Surface->DrawOutlinedRect(screenbacktrack[i].x, screenbacktrack[i].y, screenbacktrack[i].x + 2, screenbacktrack[i].y + 2);
}
}
}
}
else
{
memset(&backtracking->records[0], 0, sizeof(backtracking->records));
}
}
}
}
}
}
|