Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarPlant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/game/StarPlant.cpp')
-rw-r--r--source/game/StarPlant.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/StarPlant.cpp b/source/game/StarPlant.cpp
index 4690722..d0c6efe 100644
--- a/source/game/StarPlant.cpp
+++ b/source/game/StarPlant.cpp
@@ -718,18 +718,18 @@ float Plant::branchRotation(float xPos, float rotoffset) const {
return copysign(0.00117f, m_windLevel) * (std::sin(m_windTime + rotoffset + xPos / 10.0f) * intensity - intensity / 300.0f);
}
-void Plant::update(uint64_t) {
- m_windTime += WorldTimestep;
+void Plant::update(float dt, uint64_t) {
+ m_windTime += dt;
m_windTime = std::fmod(m_windTime, 628.32f);
m_windLevel = world()->windLevel(Vec2F(m_tilePosition));
if (isMaster()) {
if (m_tileDamageStatus.damaged())
- m_tileDamageStatus.recover(m_tileDamageParameters, WorldTimestep);
+ m_tileDamageStatus.recover(m_tileDamageParameters, dt);
} else {
if (m_tileDamageStatus.damaged() && !m_tileDamageStatus.damageProtected()) {
float damageEffectPercentage = m_tileDamageStatus.damageEffectPercentage();
- m_windTime += damageEffectPercentage * 10 * WorldTimestep;
+ m_windTime += damageEffectPercentage * 10 * dt;
m_windLevel += damageEffectPercentage * 20;
}