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

@@ -327,10 +327,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
// TODO: Apply damage to armor
if (m_Health < 0)
{
m_Health = 0;
}
m_Health = std::max(m_Health, 0);
if ((IsMob() || IsPlayer()) && (a_TDI.Attacker != NULL)) // Knockback for only players and mobs
{