Mobs are assigned MaxHealth from monsters.ini; reading monsters.ini doesn't need settings.ini values anymore.
Fixes FS #409. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1662 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -431,6 +431,15 @@ void cEntity::Heal(int a_HitPoints)
|
||||
|
||||
|
||||
|
||||
void cEntity::SetHealth(int a_Health)
|
||||
{
|
||||
m_Health = std::max(0, std::min(m_MaxHealth, a_Health));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cEntity::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
{
|
||||
if (m_AttachedTo != NULL)
|
||||
|
||||
Reference in New Issue
Block a user