Ocelots don't take fall damage (#4171)
This commit is contained in:
parent
a28a93c9ca
commit
d12804d4c0
@ -74,10 +74,12 @@ void cChicken::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
|
||||
|
||||
|
||||
void cChicken::HandleFalling(void)
|
||||
bool cChicken::DoTakeDamage(TakeDamageInfo & a_TDI)
|
||||
{
|
||||
// empty - chickens don't take fall damage
|
||||
if (a_TDI.DamageType == dtFalling)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return super::DoTakeDamage(a_TDI);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
a_Items.Add(E_ITEM_SEEDS);
|
||||
}
|
||||
|
||||
virtual void HandleFalling(void) override;
|
||||
virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -218,3 +218,13 @@ bool cOcelot::IsCatSittingOnBlock(cWorld * a_World, Vector3d a_BlockPosition)
|
||||
|
||||
|
||||
|
||||
|
||||
bool cOcelot::DoTakeDamage(TakeDamageInfo & a_TDI)
|
||||
{
|
||||
if (a_TDI.DamageType == dtFalling)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return super::DoTakeDamage(a_TDI);
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
{
|
||||
a_Items.Add(E_ITEM_RAW_FISH);
|
||||
}
|
||||
virtual bool DoTakeDamage(TakeDamageInfo & a_TDI) override;
|
||||
|
||||
// Get functions
|
||||
bool IsSitting (void) const override { return m_IsSitting; }
|
||||
|
Loading…
Reference in New Issue
Block a user