Advertisement
test12333

Untitled

Sep 30th, 2022
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.94 KB | None | 0 0
  1. if ( pGui->lasthit_glow ) {
  2.                             C_BaseEntity* LocalEntity = reinterpret_cast<C_BaseEntity*>(global::g_LocalEntity);
  3.                             if ( LocalEntity->GetHealth( ) > 0 && (!strcmp( ent->Schema_DynamicBinding( )->binary_name, "C_DOTA_BaseNPC_Creep_Lane" )) ) {
  4.  
  5.                                 const float dmg_multiplier = (1 - ((0.06 * ent->GetArmorValue( )) / (1 + 0.06 * std::fabs( ent->GetArmorValue( ) ))));
  6.                                 const float dmg = (((LocalEntity->GetMinDamage( ) + LocalEntity->GetMaxDamage( )) / 2 + LocalEntity->GetBonusDamage( )) * dmg_multiplier);
  7.  
  8.                                 if ( (pGui->lasthit_glow_ally) ) {
  9.                                     if ( (!ally && dmg >= ent->GetHealth( )) || (ally && (ent->GetHealth( ) <= (ent->GetMaxHealth( ) / 2)) && ((dmg * 0.5) > ent->GetHealth( ))) ) {
  10.                                         ent->SetEntityColor( pGui->lasthit_glow_r, pGui->lasthit_glow_g, pGui->lasthit_glow_b, 255 );
  11.                                     }
  12.                                     else {
  13.                                         ent->SetEntityColor( 255, 255, 255, 255 );
  14.                                     }
  15.                                 }
  16.  
  17.                             }
  18.                         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement