summaryrefslogtreecommitdiffstats
path: root/src/Entities/Floater.cpp
diff options
context:
space:
mode:
authorAlex <sweet.giorni@gmail.com>2017-02-20 10:03:19 +0100
committerMattes D <github@xoft.cz>2017-02-20 10:03:19 +0100
commit9cb1ad546f09066cd9949fd0e4fa7fd2e54dd519 (patch)
tree628af192ab1a3827ee01fb7c9e7e6cadf62da4ca /src/Entities/Floater.cpp
parentDead bushes will generate in mega mega taigas (#3571) (diff)
downloadcuberite-9cb1ad546f09066cd9949fd0e4fa7fd2e54dd519.tar
cuberite-9cb1ad546f09066cd9949fd0e4fa7fd2e54dd519.tar.gz
cuberite-9cb1ad546f09066cd9949fd0e4fa7fd2e54dd519.tar.bz2
cuberite-9cb1ad546f09066cd9949fd0e4fa7fd2e54dd519.tar.lz
cuberite-9cb1ad546f09066cd9949fd0e4fa7fd2e54dd519.tar.xz
cuberite-9cb1ad546f09066cd9949fd0e4fa7fd2e54dd519.tar.zst
cuberite-9cb1ad546f09066cd9949fd0e4fa7fd2e54dd519.zip
Diffstat (limited to 'src/Entities/Floater.cpp')
-rw-r--r--src/Entities/Floater.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp
index 304ba6425..8f98cb36c 100644
--- a/src/Entities/Floater.cpp
+++ b/src/Entities/Floater.cpp
@@ -103,6 +103,7 @@ protected:
cFloater::cFloater(double a_X, double a_Y, double a_Z, Vector3d a_Speed, UInt32 a_PlayerID, int a_CountDownTime) :
cEntity(etFloater, a_X, a_Y, a_Z, 0.2, 0.2),
+ m_BitePos(Vector3d(a_X, a_Y, a_Z)),
m_CanPickupItem(false),
m_PickupCountDown(0),
m_CountDownTime(a_CountDownTime),
@@ -135,6 +136,7 @@ void cFloater::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
if (m_CountDownTime <= 0)
{
+ m_BitePos = GetPosition();
m_World->BroadcastSoundEffect("entity.bobber.splash", GetPosX(), GetPosY(), GetPosZ(), 1, 1);
SetPosY(GetPosY() - 1);
m_CanPickupItem = true;