From 8d51c22b368409ef1bfcc4eff5c504209c5f24f7 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 22 Dec 2013 15:22:50 +0100 Subject: Fishing underground is slower and fishing while raining is faster. --- src/Entities/Floater.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/Entities/Floater.cpp') diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp index d908167df..5e3338968 100644 --- a/src/Entities/Floater.cpp +++ b/src/Entities/Floater.cpp @@ -59,7 +59,22 @@ void cFloater::Tick(float a_Dt, cChunk & a_Chunk) m_ParticlePos = (m_ParticlePos + (GetPosition() - m_ParticlePos) / 6); m_World->BroadcastParticleEffect("splash", (float) m_ParticlePos.x, (float) m_ParticlePos.y, (float) m_ParticlePos.z, 0, 0, 0, 0, 15); } + m_CountDownTime--; + if (m_World->GetHeight((int) GetPosX(), (int) GetPosZ()) == (int) GetPosY()) + { + if (m_World->IsWeatherWet() && m_World->GetTickRandomNumber(3) == 0) // 25% chance of an extra countdown when being rained on. + { + m_CountDownTime--; + } + } + else // if the floater is underground it has a 50% chance of not decreasing the countdown. + { + if (m_World->GetTickRandomNumber(1) == 0) + { + m_CountDownTime++; + } + } } SetSpeedY(0.7); } -- cgit v1.2.3