1
0

Added pig riding.

Now you can ride a pig using a carrot on a stick.
This commit is contained in:
tonibm19
2014-06-20 10:50:21 +02:00
parent 4c7545a82a
commit 3e15c92d18
2 changed files with 14 additions and 0 deletions

View File

@@ -76,5 +76,18 @@ void cPig::OnRightClicked(cPlayer & a_Player)
}
}
void cPig::Tick(float a_Dt, cChunk & a_Chunk)
{
super::Tick(a_Dt, a_Chunk);
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;
}
}
}