diff options
author | Mattes D <github@xoft.cz> | 2014-12-03 10:06:14 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-12-03 10:06:14 +0100 |
commit | efb5f86cfa5e7c95537bc9f82dd4d4916b2b52b2 (patch) | |
tree | 446b691e49f9f6a598107019a186eb71fe916aee /src/Mobs | |
parent | Merge pull request #1640 from p-mcgowan/mooshroomMobSpawnerRule (diff) | |
parent | clearing CheckBasicStyle.lua messages (diff) | |
download | cuberite-efb5f86cfa5e7c95537bc9f82dd4d4916b2b52b2.tar cuberite-efb5f86cfa5e7c95537bc9f82dd4d4916b2b52b2.tar.gz cuberite-efb5f86cfa5e7c95537bc9f82dd4d4916b2b52b2.tar.bz2 cuberite-efb5f86cfa5e7c95537bc9f82dd4d4916b2b52b2.tar.lz cuberite-efb5f86cfa5e7c95537bc9f82dd4d4916b2b52b2.tar.xz cuberite-efb5f86cfa5e7c95537bc9f82dd4d4916b2b52b2.tar.zst cuberite-efb5f86cfa5e7c95537bc9f82dd4d4916b2b52b2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Pig.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Mobs/Pig.cpp b/src/Mobs/Pig.cpp index 50b69e44f..1e4c35acd 100644 --- a/src/Mobs/Pig.cpp +++ b/src/Mobs/Pig.cpp @@ -49,17 +49,17 @@ void cPig::OnRightClicked(cPlayer & a_Player) 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); } @@ -100,7 +100,7 @@ void cPig::Tick(float a_Dt, cChunk & a_Chunk) bool cPig::DoTakeDamage(TakeDamageInfo & a_TDI) -{ +{ if (!super::DoTakeDamage(a_TDI)) { return false; |