summaryrefslogtreecommitdiffstats
path: root/src/Mobs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Monster.cpp9
-rw-r--r--src/Mobs/Ocelot.cpp1
-rw-r--r--src/Mobs/Wolf.cpp1
3 files changed, 11 insertions, 0 deletions
diff --git a/src/Mobs/Monster.cpp b/src/Mobs/Monster.cpp
index 447e66261..d99f2cddc 100644
--- a/src/Mobs/Monster.cpp
+++ b/src/Mobs/Monster.cpp
@@ -605,6 +605,15 @@ void cMonster::KilledBy(TakeDamageInfo & a_TDI)
{
m_World->BroadcastSoundEffect(m_SoundDeath, GetPosition(), 1.0f, 0.8f);
}
+
+ if (IsTame())
+ {
+ if ((m_MobType == mtWolf) || (m_MobType == mtOcelot) || (m_MobType == mtCat) || (m_MobType == mtParrot))
+ {
+ BroadcastDeathMessage(a_TDI);
+ }
+ }
+
int Reward;
switch (m_MobType)
{
diff --git a/src/Mobs/Ocelot.cpp b/src/Mobs/Ocelot.cpp
index e095e827a..a3c505e96 100644
--- a/src/Mobs/Ocelot.cpp
+++ b/src/Mobs/Ocelot.cpp
@@ -26,6 +26,7 @@ cOcelot::cOcelot(void) :
m_IsTame(false),
m_IsBegging(false),
m_CatType(ctWildOcelot),
+ m_CheckPlayerTickCount(),
m_OwnerName()
{
}
diff --git a/src/Mobs/Wolf.cpp b/src/Mobs/Wolf.cpp
index 0a3a12ea7..2b45faa2b 100644
--- a/src/Mobs/Wolf.cpp
+++ b/src/Mobs/Wolf.cpp
@@ -166,6 +166,7 @@ void cWolf::ReceiveNearbyFightInfo(const cUUID & a_PlayerID, cPawn * a_Opponent,
void cWolf::OnRightClicked(cPlayer & a_Player)
{
+ cMonster::OnRightClicked(a_Player);
const cItem & EquippedItem = a_Player.GetEquippedItem();
const int EquippedItemType = EquippedItem.m_ItemType;