diff options
Diffstat (limited to 'internal_rewrite/visual_world.cpp')
| -rw-r--r-- | internal_rewrite/visual_world.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/internal_rewrite/visual_world.cpp b/internal_rewrite/visual_world.cpp index b9b3430..5ceffba 100644 --- a/internal_rewrite/visual_world.cpp +++ b/internal_rewrite/visual_world.cpp @@ -179,15 +179,20 @@ namespace features if( !strstr( hdr->name, xors( "thrown" ) ) && !strstr( hdr->name, xors( "dropped" ) ) )
continue;
+ bool fade = false;
+
std::string name = xors( "nade" );
if( strstr( hdr->name, xors( "flash" ) ) ) {
name = xors( "flash" );
+ fade = true;
}
else if( strstr( hdr->name, xors( "smoke" ) ) ) {
name = xors( "smoke" );
+ fade = true;
}
else if( strstr( hdr->name, xors( "decoy" ) ) ) {
name = xors( "decoy" );
+ fade = true;
}
else if( strstr( hdr->name, xors( "incendiary" ) ) || strstr( hdr->name, xors( "molotov" ) ) ) {
name = xors( "molotov" );
@@ -205,15 +210,18 @@ namespace features auto dist = g_ctx.m_local->m_vecOrigin( ).dist_to( pos );
clr_t col = g_settings.visuals.grenade_esp_clr;
- if( dist > 250.f && !strstr( hdr->name, xors( "thrown" ) ) ) {
- col.a( ) *= ( 750.f - ( dist - 250.f ) ) / 750.f;
+ if( dist > 250.f ) {
+ col.a( ) *= std::min( 750.f - ( dist - 250.f ), 0.f ) / 750.f;
}
draw_string( w2s.x, w2s.y, ALIGN_CENTER, false,
col, name.c_str( ) );
+ char name[ 32 ];
+ cutie->get_name_safe( name );
+
if( g_settings.visuals.grenade_owner( ) )
- draw_string( w2s.x, w2s.y + 10, ALIGN_CENTER, false, col, cutie->get_info( ).name );
+ draw_string( w2s.x, w2s.y + 10, ALIGN_CENTER, false, col, name );
}
}
}
|
