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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/game/objects/StarFarmableObject.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/game/objects/StarFarmableObject.cpp b/source/game/objects/StarFarmableObject.cpp
index cfb550d..8b8f617 100644
--- a/source/game/objects/StarFarmableObject.cpp
+++ b/source/game/objects/StarFarmableObject.cpp
@@ -42,8 +42,13 @@ void FarmableObject::update(float dt, uint64_t currentStep) {
enterStage(m_stage);
}
- while (!m_finalStage && world()->epochTime() >= m_nextStageTime)
+
+ while (!m_finalStage && world()->epochTime() >= m_nextStageTime) {
+ int lastStage = m_stage;
enterStage(m_stage + 1);
+ if (m_stage == lastStage)
+ break;
+ }
// update immersion and check whether farmable should break
m_immersion.update(bind(&Object::liquidFillLevel, this));