From 716be28826ac61491944490373402c39123a1d75 Mon Sep 17 00:00:00 2001 From: navewindre Date: Mon, 3 Dec 2018 22:03:34 +0100 Subject: boris is cool --- cheat/internal_rewrite/visual_player.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'cheat/internal_rewrite/visual_player.cpp') diff --git a/cheat/internal_rewrite/visual_player.cpp b/cheat/internal_rewrite/visual_player.cpp index b685adc..cb99fb7 100644 --- a/cheat/internal_rewrite/visual_player.cpp +++ b/cheat/internal_rewrite/visual_player.cpp @@ -361,8 +361,20 @@ namespace features int idx = snd.sound_source; auto ent = g_csgo.m_entlist( )->GetClientEntity( idx ); - if( ent && ent->is_player( ) && ent->ce( )->IsDormant( ) ) - update_position( idx, snd.origin[ 0 ] ); + if( ent && ent->is_player( ) ) { + if( ent->ce( )->IsDormant( ) ) + update_position( idx, snd.origin[ 0 ] ); + else { + static float last_time[ 65 ]{ }; + + if( std::abs( g_csgo.m_globals->m_curtime - last_time[ idx ] ) > 1.f ) { + vec3_t pos = ent->m_vecOrigin( ); + pos.z += 10.f; + store_sound( idx, pos ); + last_time[ idx ] = g_csgo.m_globals->m_curtime; + } + } + } } } } @@ -544,7 +556,6 @@ namespace features float delta = ( ent->m_flSimulationTime( ) - update ) * 0.9f; if( delta >= 0.f && delta <= 1.f ) { - //don't allocate 20000000 bytes on the stack thx static vertex_t v[ 48 ]; @@ -572,6 +583,13 @@ namespace features g_renderer.draw_filled_circle( x_pos + radius / 2 + 2, y_pos + radius / 2 + 2, radius + 1, clr_t( 0, 0, 0, 170 * alpha ) ); g_renderer.draw_polygon( progress, v, g_settings.visuals.lby_bar_clr ); } + else { + draw_string( x_pos, y_pos, ALIGN_LEFT, false, + clr_t( 255, 255, 255, 255 * alpha ), + xors( "fake" ) ); + + right_pos += 9; + } } else { draw_string( x_pos, y_pos, ALIGN_LEFT, false, -- cgit v1.2.3