diff options
Diffstat (limited to 'src/object')
-rw-r--r-- | src/object/robotmain.cpp | 8 | ||||
-rw-r--r-- | src/object/robotmain.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 6ba09a5..7be1177 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -3830,6 +3830,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) m_audioChangeTotal = 0; m_endTakeTotal = 0; m_endTakeResearch = 0; + m_endTakeNever = false; m_endTakeWinDelay = 2.0f; m_endTakeLostDelay = 2.0f; m_obligatoryTotal = 0; @@ -4703,6 +4704,10 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) { m_endTakeResearch |= OpResearch(line, "type"); } + if (Cmd(line, "EndMissionNever") && !resetObject && m_version >= 2) + { + m_endTakeNever = true; + } if (Cmd(line, "ObligatoryToken") && !resetObject) { @@ -6763,7 +6768,8 @@ Error CRobotMain::CheckEndMission(bool frame) } } if (nb < m_endTake[t].min || - nb > m_endTake[t].max) + nb > m_endTake[t].max || + m_endTakeNever) { m_displayText->SetEnable(true); return ERR_MISSION_NOTERM; diff --git a/src/object/robotmain.h b/src/object/robotmain.h index 7ed84c5..73315af 100644 --- a/src/object/robotmain.h +++ b/src/object/robotmain.h @@ -537,6 +537,7 @@ protected: int m_endTakeTotal; EndTake m_endTake[10]; long m_endTakeResearch; + bool m_endTakeNever; float m_endTakeWinDelay; float m_endTakeLostDelay; |