parent
137ed5a556
commit
90c39c55a9
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
|
||||||
|
|
||||||
#include "Horse.h"
|
#include "Horse.h"
|
||||||
|
@ -76,6 +75,7 @@ void cHorse::Tick(float a_Dt, cChunk & a_Chunk)
|
||||||
if (m_RearTickCount == 20)
|
if (m_RearTickCount == 20)
|
||||||
{
|
{
|
||||||
m_bIsRearing = false;
|
m_bIsRearing = false;
|
||||||
|
m_RearTickCount = 0;
|
||||||
}
|
}
|
||||||
else { m_RearTickCount++;}
|
else { m_RearTickCount++;}
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ void cHorse::OnRightClicked(cPlayer & a_Player)
|
||||||
m_Attachee->Detach();
|
m_Attachee->Detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE && !m_bIsSaddled && m_bIsTame)
|
if ((a_Player.GetEquippedItem().m_ItemType == E_ITEM_SADDLE) && (!m_bIsSaddled) && (m_bIsTame))
|
||||||
{
|
{
|
||||||
if (!a_Player.IsGameModeCreative())
|
if (!a_Player.IsGameModeCreative())
|
||||||
{
|
{
|
||||||
|
@ -115,6 +115,11 @@ void cHorse::OnRightClicked(cPlayer & a_Player)
|
||||||
// Set saddle state & broadcast metadata
|
// Set saddle state & broadcast metadata
|
||||||
m_bIsSaddled = true;
|
m_bIsSaddled = true;
|
||||||
m_World->BroadcastEntityMetadata(*this);
|
m_World->BroadcastEntityMetadata(*this);
|
||||||
|
}
|
||||||
|
else if ((a_Player.GetEquippedItem().m_ItemType != E_ITEM_EMPTY) && (!m_bIsSaddled) && (!m_bIsTame))
|
||||||
|
{
|
||||||
|
m_bIsRearing = true;
|
||||||
|
m_RearTickCount = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue