fix sapling infinite loop
This commit is contained in:
parent
e3462c3c69
commit
3c9c65fa38
@ -42,8 +42,13 @@ void FarmableObject::update(float dt, uint64_t currentStep) {
|
|||||||
enterStage(m_stage);
|
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);
|
enterStage(m_stage + 1);
|
||||||
|
if (m_stage == lastStage)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// update immersion and check whether farmable should break
|
// update immersion and check whether farmable should break
|
||||||
m_immersion.update(bind(&Object::liquidFillLevel, this));
|
m_immersion.update(bind(&Object::liquidFillLevel, this));
|
||||||
|
Loading…
Reference in New Issue
Block a user