[colobot] 91/100: Fix crash after exiting a code battle
Didier Raboud
odyx at moszumanska.debian.org
Thu Jun 1 18:10:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
odyx pushed a commit to branch debian/master
in repository colobot.
commit 7216d8d12efb70ab1885d0854fd46dcc84eece23
Author: krzys-h <krzys_h at interia.pl>
Date: Wed May 24 12:42:37 2017 +0200
Fix crash after exiting a code battle
---
src/level/robotmain.cpp | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 30f55e3..6159652 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -2548,30 +2548,30 @@ bool CRobotMain::EventFrame(const Event &event)
m_eventQueue->AddEvent(Event(EVENT_LOST));
}
}
- }
- if (GetMissionType() == MISSION_CODE_BATTLE)
- {
- if (!m_codeBattleInit)
+ if (GetMissionType() == MISSION_CODE_BATTLE)
{
- // NOTE: It's important to do this AFTER the first update event finished processing
- // because otherwise all robot parts are misplaced
- m_userPause = m_pause->ActivatePause(PAUSE_ENGINE);
- m_codeBattleInit = true; // Will start on resume
- }
+ if (!m_codeBattleInit)
+ {
+ // NOTE: It's important to do this AFTER the first update event finished processing
+ // because otherwise all robot parts are misplaced
+ m_userPause = m_pause->ActivatePause(PAUSE_ENGINE);
+ m_codeBattleInit = true; // Will start on resume
+ }
- if (!m_codeBattleStarted && m_userPause == nullptr)
- {
- m_codeBattleStarted = true;
- ApplyCodeBattleInterface();
- CreateCodeBattleInterface();
+ if (!m_codeBattleStarted && m_userPause == nullptr)
+ {
+ m_codeBattleStarted = true;
+ ApplyCodeBattleInterface();
+ CreateCodeBattleInterface();
- SetCodeBattleSpectatorMode(true);
+ SetCodeBattleSpectatorMode(true);
- m_eventQueue->AddEvent(Event(EVENT_UPDINTERFACE));
- }
+ m_eventQueue->AddEvent(Event(EVENT_UPDINTERFACE));
+ }
- UpdateCodeBattleInterface();
+ UpdateCodeBattleInterface();
+ }
}
return true;
--
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