summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Pig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Pig.cpp')
-rw-r--r--src/Mobs/Pig.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp
index 1f77cf613..fe0434a89 100644
--- a/src/Mobs/Pig.cpp
+++ b/src/Mobs/Pig.cpp
@@ -36,65 +36,3 @@ void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer)
-
-void cPig::OnRightClicked(cPlayer & a_Player)
-{
- if (m_bIsSaddled)
- {
- if (m_Attachee != NULL)
- {
- if (m_Attachee->GetUniqueID() == a_Player.GetUniqueID())
- {
- // This player is already sitting in, they want out.
- a_Player.Detach();
- return;
- }
-
- if (m_Attachee->IsPlayer())
- {
- // Another player is already sitting in here, cannot attach
- return;
- }
-
- // Detach whatever is sitting in this pig now:
- m_Attachee->Detach();
- }
-
- // Attach the player to this pig
- a_Player.AttachTo(this);
- }
- else if (a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE)
- {
- if (!a_Player.IsGameModeCreative())
- {
- a_Player.GetInventory().RemoveOneEquippedItem();
- }
-
- // Set saddle state & broadcast metadata
- m_bIsSaddled = true;
- m_World->BroadcastEntityMetadata(*this);
- }
-}
-
-
-
-
-
-void cPig::Tick(float a_Dt, cChunk & a_Chunk)
-{
- super::Tick(a_Dt, a_Chunk);
-
- // If the attachee player is holding a carrot-on-stick, let them drive this pig:
- if (m_bIsSaddled && (m_Attachee != NULL))
- {
- if (m_Attachee->IsPlayer() && (m_Attachee->GetEquippedWeapon().m_ItemType == E_ITEM_CARROT_ON_STICK))
- {
- MoveToPosition((m_Attachee->GetPosition()) + (m_Attachee->GetLookVector()*10));
- m_bMovingToDestination = true;
- }
- }
-}
-
-
-
-