diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-24 22:55:04 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-24 22:55:04 +0100 |
commit | a988063915aa288bf0183509783987941574e2ae (patch) | |
tree | 6b458c94b769bf9e550296c1564aad9787768a58 /src/Mobs/Monster.cpp | |
parent | Changed a condition to IsGameMode (diff) | |
download | cuberite-a988063915aa288bf0183509783987941574e2ae.tar cuberite-a988063915aa288bf0183509783987941574e2ae.tar.gz cuberite-a988063915aa288bf0183509783987941574e2ae.tar.bz2 cuberite-a988063915aa288bf0183509783987941574e2ae.tar.lz cuberite-a988063915aa288bf0183509783987941574e2ae.tar.xz cuberite-a988063915aa288bf0183509783987941574e2ae.tar.zst cuberite-a988063915aa288bf0183509783987941574e2ae.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Monster.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp index bd7894bf9..3b453552b 100644 --- a/src/Mobs/Monster.cpp +++ b/src/Mobs/Monster.cpp @@ -74,13 +74,12 @@ cMonster::cMonster(const AString & a_ConfigName, eType a_MobType, const AString , m_AttackRate(3) , m_IdleInterval(0) , m_bMovingToDestination(false) - , m_DestinationTime( 0 ) - , m_DestroyTimer( 0 ) + , m_DestroyTimer(0) , m_MobType(a_MobType) , m_SoundHurt(a_SoundHurt) , m_SoundDeath(a_SoundDeath) - , m_AttackDamage(1.0f) - , m_AttackRange(2.0f) + , m_AttackDamage(1) + , m_AttackRange(2) , m_AttackInterval(0) , m_BurnsInDaylight(false) { @@ -492,7 +491,7 @@ void cMonster::KilledBy(cEntity * a_Killer) void cMonster::CheckEventSeePlayer(void) { // TODO: Rewrite this to use cWorld's DoWithPlayers() - cPlayer * Closest = m_World->FindClosestPlayer(GetPosition(), m_SightDistance); + cPlayer * Closest = m_World->FindClosestPlayer(GetPosition(), (float)m_SightDistance); if (Closest != NULL) { |