// for dumbass p2p servers that give players more than 100 health if they buy a super cool package or some dumb shit
int m_iHP = std::min( 100, player->m_iHealth( ) );
// here we're gonna interpolate our health bar to have a smooth animation.
// initialize our previous hp value ( we will use this later as this will be the value we interpolate )
static float m_flPreviousHP[ 65 ] = { };
// anim speed.
constexpr float m_flSpeed= 255.00f / 1.00f;
// if our stored value is greater than stored hp value then we want to decrement it as shown below until we reach
// the current hp value giving us our super cool haxor smoothed/interpolated health value
if ( m_flPreviousHP[ player->EntIndex( ) ] > m_iHP )
m_flPreviousHP[ player->EntIndex( ) ] -= m_flSpeed * globals->m_flFrametime;
else
m_flPreviousHP[ player->EntIndex( ) ] = m_iHP;