CSoundEsp::CSoundEsp()
{
SoundColor = Color::White();
}
void CSoundEsp::Update()
{
for ( size_t i = 0; i < Sound.size(); i++ )
{
if ( Sound[i].dwTime + 800 <= GetTickCount64() )
{
Sound.erase( Sound.begin() + i );
}
}
}
void CSoundEsp::AddSound( Vector vOrigin )
{
Sound_s Sound_Entry;
Sound_Entry.dwTime = GetTickCount64();
Sound_Entry.vOrigin = vOrigin;
Sound.push_back( Sound_Entry );
}
void CSoundEsp::DrawSoundEsp()
{
for ( size_t i = 0; i < Sound.size(); i++ )
{
Vector vScreen;
if ( WorldToScreen( Sound[i].vOrigin , vScreen ) )
{
if ( Settings::Esp::esp_Sound )
g_pRender->DrawBox( (int)vScreen.x , (int)vScreen.y , 10 , 10 , SoundColor );
}
}
}
[CODE]