summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2013-12-22 15:22:50 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2013-12-22 15:22:50 +0100
commit8d51c22b368409ef1bfcc4eff5c504209c5f24f7 (patch)
treec014a253b829da375a1c74d1b56797321d5fab4b
parentFixed compiler warnings. (diff)
downloadcuberite-8d51c22b368409ef1bfcc4eff5c504209c5f24f7.tar
cuberite-8d51c22b368409ef1bfcc4eff5c504209c5f24f7.tar.gz
cuberite-8d51c22b368409ef1bfcc4eff5c504209c5f24f7.tar.bz2
cuberite-8d51c22b368409ef1bfcc4eff5c504209c5f24f7.tar.lz
cuberite-8d51c22b368409ef1bfcc4eff5c504209c5f24f7.tar.xz
cuberite-8d51c22b368409ef1bfcc4eff5c504209c5f24f7.tar.zst
cuberite-8d51c22b368409ef1bfcc4eff5c504209c5f24f7.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Floater.cpp15
1 files changed, 15 insertions, 0 deletions
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);
}