summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Cow.cpp
diff options
context:
space:
mode:
authorSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-11-30 07:58:02 +0100
committerSafwat Halaby <SafwatHalaby@users.noreply.github.com>2015-11-30 07:58:02 +0100
commit1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9 (patch)
tree0da79374832cae75ae5d9e6822712b3b62cbdbe8 /src/Mobs/Cow.cpp
parentUpdated DumpInfo plugin (diff)
parentimplement breeding (diff)
downloadcuberite-1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9.tar
cuberite-1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9.tar.gz
cuberite-1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9.tar.bz2
cuberite-1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9.tar.lz
cuberite-1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9.tar.xz
cuberite-1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9.tar.zst
cuberite-1a9c023d6c69d5aa37ed0d3726e0f4af77b974f9.zip
Diffstat (limited to 'src/Mobs/Cow.cpp')
-rw-r--r--src/Mobs/Cow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Mobs/Cow.cpp b/src/Mobs/Cow.cpp
index a45010201..dec8eface 100644
--- a/src/Mobs/Cow.cpp
+++ b/src/Mobs/Cow.cpp
@@ -36,7 +36,10 @@ void cCow::GetDrops(cItems & a_Drops, cEntity * a_Killer)
void cCow::OnRightClicked(cPlayer & a_Player)
{
- if ((a_Player.GetEquippedItem().m_ItemType == E_ITEM_BUCKET))
+ super::OnRightClicked(a_Player);
+
+ short HeldItem = a_Player.GetEquippedItem().m_ItemType;
+ if (HeldItem == E_ITEM_BUCKET)
{
if (!a_Player.IsGameModeCreative())
{
@@ -45,4 +48,3 @@ void cCow::OnRightClicked(cPlayer & a_Player)
}
}
}
-