diff options
| author | navewindre <boneyaard@gmail.com> | 2018-09-19 21:51:56 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2018-09-19 21:51:56 +0200 |
| commit | b1cd9458f103d99f4de1807f512ed9ffd2e38220 (patch) | |
| tree | 8bf1d12c82bb1786f992b1bee8b45a3ae343c659 /internal_rewrite/visual_world.cpp | |
| parent | 62f253525bcc13fedba4df1b6d6be7eef2410d4e (diff) | |
dsad
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 );
}
}
}
|
