Merge branch 'master' into EntityCustomName
Conflicts: src/ClientHandle.cpp src/ClientHandle.h src/Protocol/Protocol.h src/Protocol/Protocol125.cpp src/Protocol/Protocol125.h src/Protocol/Protocol17x.cpp src/Protocol/Protocol17x.h src/Protocol/ProtocolRecognizer.cpp src/Protocol/ProtocolRecognizer.h src/World.cpp src/World.h
This commit is contained in:
@@ -91,6 +91,7 @@ cMonster::cMonster(const AString & a_ConfigName, eType a_MobType, const AString
|
||||
, m_DropChanceBoots(0.085f)
|
||||
, m_CanPickUpLoot(true)
|
||||
, m_BurnsInDaylight(false)
|
||||
, m_RelativeWalkSpeed(1.0)
|
||||
{
|
||||
if (!a_ConfigName.empty())
|
||||
{
|
||||
@@ -284,7 +285,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;
|
||||
@@ -304,6 +305,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