summaryrefslogtreecommitdiff
path: root/cheat/internal_rewrite/visual_player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cheat/internal_rewrite/visual_player.cpp')
-rw-r--r--cheat/internal_rewrite/visual_player.cpp24
1 files changed, 21 insertions, 3 deletions
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,