1
0

Fixed clamping issues

This commit is contained in:
archshift
2014-07-19 01:40:29 -07:00
parent c7b7938c04
commit 041bfd5860
6 changed files with 6 additions and 33 deletions

View File

@@ -382,10 +382,7 @@ short cPlayer::DeltaExperience(short a_Xp_delta)
m_CurrentXp += a_Xp_delta;
// Make sure they didn't subtract too much
if (m_CurrentXp < 0)
{
m_CurrentXp = 0;
}
m_CurrentXp = std::max<short int>(m_CurrentXp, 0);
// Update total for score calculation
if (a_Xp_delta > 0)