Administrator xpro Posted October 29 Administrator Share Posted October 29 char.cpp void CHARACTER::BroadcastTargetPacket() Find: p.bHPPercent = MINMAX (0, (GetHP()* 100) / GetMaxHP(), 100); Change: p.bHPPercent = int(float(GetHP()) / float(GetMaxHP()) * 100.0f); In function void CHARACTER::SetTarget(LPCHARACTER pkChrTarget) Find: p.bHPPercent = MINMAX(0, (m_pkChrTarget->GetHP() * 100) / m_pkChrTarget->GetMaxHP(), 100); Change: p.bHPPercent = m_pkChrTarget->GetMaxHP() <= 0 ? 0 : int(float(m_pkChrTarget->GetHP()) / float(m_pkChrTarget->GetMaxHP()) * 100.0f); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.