summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Wolf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Wolf.cpp')
-rw-r--r--src/Mobs/Wolf.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp
index b3eefdf79..3c2ec1520 100644
--- a/src/Mobs/Wolf.cpp
+++ b/src/Mobs/Wolf.cpp
@@ -5,6 +5,7 @@
#include "../World.h"
#include "../Entities/Player.h"
#include "../Items/ItemHandler.h"
+#include "Broadcaster.h"
@@ -83,13 +84,13 @@ void cWolf::OnRightClicked(cPlayer & a_Player)
SetIsTame(true);
SetOwner(a_Player.GetName(), a_Player.GetUUID());
m_World->BroadcastEntityStatus(*this, esWolfTamed);
- m_World->BroadcastParticleEffect("heart", (float) GetPosX(), (float) GetPosY(), (float) GetPosZ(), 0, 0, 0, 0, 5);
+ m_World->GetBroadcaster().BroadcastParticleEffect("heart", static_cast<Vector3f>(GetPosition()), Vector3f{}, 0, 5);
}
else
{
// Taming failed
m_World->BroadcastEntityStatus(*this, esWolfTaming);
- m_World->BroadcastParticleEffect("smoke", (float) GetPosX(), (float) GetPosY(), (float) GetPosZ(), 0, 0, 0, 0, 5);
+ m_World->GetBroadcaster().BroadcastParticleEffect("smoke", static_cast<Vector3f>(GetPosition()), Vector3f{}, 0, 5);
}
}
}
@@ -137,7 +138,7 @@ void cWolf::OnRightClicked(cPlayer & a_Player)
}
}
}
-
+
m_World->BroadcastEntityMetadata(*this);
}
@@ -203,7 +204,7 @@ void cWolf::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
}
else if (IsSitting())
{
- m_bMovingToDestination = false;
+ StopMovingToPosition();
}
}