Merge branch 'master' into redstoneTests
Conflicts: src/Blocks/ChunkInterface.h
This commit is contained in:
@@ -89,6 +89,7 @@ cMonster::cMonster(const AString & a_ConfigName, eMonsterType a_MobType, const A
|
||||
, m_DropChanceBoots(0.085f)
|
||||
, m_CanPickUpLoot(true)
|
||||
, m_BurnsInDaylight(false)
|
||||
, m_RelativeWalkSpeed(1.0)
|
||||
{
|
||||
if (!a_ConfigName.empty())
|
||||
{
|
||||
@@ -282,7 +283,7 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
}
|
||||
}
|
||||
|
||||
Vector3f Distance = m_Destination - GetPosition();
|
||||
Vector3d Distance = m_Destination - GetPosition();
|
||||
if (!ReachedDestination() && !ReachedFinalDestination()) // If we haven't reached any sort of destination, move
|
||||
{
|
||||
Distance.y = 0;
|
||||
@@ -302,6 +303,9 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
Distance *= 0.25f;
|
||||
}
|
||||
|
||||
// Apply walk speed:
|
||||
Distance *= m_RelativeWalkSpeed;
|
||||
|
||||
AddSpeedX(Distance.x);
|
||||
AddSpeedZ(Distance.z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user