Added SetWalkSpeed() to cMonster.
This commit is contained in:
@@ -89,6 +89,7 @@ cMonster::cMonster(const AString & a_ConfigName, eType a_MobType, const AString
|
||||
, m_DropChanceBoots(0.085f)
|
||||
, m_CanPickUpLoot(true)
|
||||
, m_BurnsInDaylight(false)
|
||||
, m_WalkSpeed(1.0)
|
||||
{
|
||||
if (!a_ConfigName.empty())
|
||||
{
|
||||
@@ -302,6 +303,9 @@ void cMonster::Tick(float a_Dt, cChunk & a_Chunk)
|
||||
Distance *= 0.25f;
|
||||
}
|
||||
|
||||
// Apply walk speed:
|
||||
Distance *= m_WalkSpeed;
|
||||
|
||||
AddSpeedX(Distance.x);
|
||||
AddSpeedZ(Distance.z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user