[colobot] 58/145: This time really fixed compile errors
Didier Raboud
odyx at moszumanska.debian.org
Mon Jul 11 12:56:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 3e4fbe93a6c37ecfbe2a2c3b7202905a105c4191
Author: krzys-h <krzys_h at interia.pl>
Date: Fri Apr 8 21:18:45 2016 +0200
This time really fixed compile errors
---
src/level/robotmain.cpp | 11 +++++++++--
src/level/robotmain.h | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 848804f..07b64bb 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -5057,7 +5057,8 @@ Error CRobotMain::ProcessEndMissionTakeForGroup(std::vector<CSceneEndCondition*>
}
//! Process EndMissionTake commands, result is stored in m_missionResult
-void CRobotMain::ProcessEndMissionTake()
+//! If return value is different than ERR_MISSION_NOTERM, assume the mission is finished and pass on the result
+Error CRobotMain::ProcessEndMissionTake()
{
// Sort end conditions by teams
std::map<int, std::vector<CSceneEndCondition*>> teams;
@@ -5141,13 +5142,19 @@ void CRobotMain::ProcessEndMissionTake()
}
}
}
+
+ return ERR_MISSION_NOTERM;
}
//! Checks if the mission is over
Error CRobotMain::CheckEndMission(bool frame)
{
// Process EndMissionTake, unless we are using LevelController script for processing ending conditions
- if (!m_missionResultFromScript) ProcessEndMissionTake();
+ if (!m_missionResultFromScript)
+ {
+ Error result = ProcessEndMissionTake();
+ if (result != ERR_MISSION_NOTERM) return result;
+ }
// Take action depending on m_missionResult
diff --git a/src/level/robotmain.h b/src/level/robotmain.h
index d3294b3..4f78df3 100644
--- a/src/level/robotmain.h
+++ b/src/level/robotmain.h
@@ -197,7 +197,7 @@ public:
void UpdateAudio(bool frame);
void SetMissionResultFromScript(Error result, float delay);
Error CheckEndMission(bool frame);
- void ProcessEndMissionTake();
+ Error ProcessEndMissionTake();
Error ProcessEndMissionTakeForGroup(std::vector<CSceneEndCondition*>& endTakes);
int GetObligatoryToken();
char* GetObligatoryToken(int i);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git
More information about the Pkg-games-commits
mailing list