Fixed scenetest mode

dev-mp
krzys-h 2014-11-10 20:23:18 +01:00
parent fca746fdb4
commit 643d1ec46a
3 changed files with 11 additions and 5 deletions

2
data

@ -1 +1 @@
Subproject commit aadeb651f923e149377fc99cd084cb0e47335cdb Subproject commit a801c729b372628b50a1c48c7612e0a2bd757ab5

View File

@ -4774,7 +4774,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
m_dialog->SetStackRead(""); m_dialog->SetStackRead("");
if(m_app->GetSceneTestMode()) if(m_app->GetSceneTestMode())
m_eventQueue->AddEvent(Event(EVENT_WIN)); m_eventQueue->AddEvent(Event(EVENT_QUIT));
} }
//! Creates a directional light //! Creates a directional light
@ -6392,6 +6392,8 @@ Error CRobotMain::CheckEndMission(bool frame)
} }
m_missionTimerEnabled = m_missionTimerStarted = false; m_missionTimerEnabled = m_missionTimerStarted = false;
m_displayText->SetEnable(false); m_displayText->SetEnable(false);
if(m_exitAfterMission)
m_eventQueue->AddEvent(Event(EVENT_QUIT));
return INFO_LOSTq; return INFO_LOSTq;
} }
else else
@ -6404,6 +6406,8 @@ Error CRobotMain::CheckEndMission(bool frame)
} }
m_missionTimerEnabled = m_missionTimerStarted = false; m_missionTimerEnabled = m_missionTimerStarted = false;
m_displayText->SetEnable(false); m_displayText->SetEnable(false);
if(m_exitAfterMission)
m_eventQueue->AddEvent(Event(EVENT_QUIT));
return INFO_LOST; return INFO_LOST;
} }
} }
@ -6423,6 +6427,8 @@ Error CRobotMain::CheckEndMission(bool frame)
} }
m_missionTimerEnabled = m_missionTimerStarted = false; m_missionTimerEnabled = m_missionTimerStarted = false;
m_displayText->SetEnable(false); m_displayText->SetEnable(false);
if(m_exitAfterMission)
m_eventQueue->AddEvent(Event(EVENT_QUIT));
return ERR_OK; // mission ended return ERR_OK; // mission ended
} }
} }
@ -6459,9 +6465,9 @@ Error CRobotMain::CheckEndMission(bool frame)
m_missionTimerEnabled = m_missionTimerStarted = false; m_missionTimerEnabled = m_missionTimerStarted = false;
m_winDelay = m_endTakeWinDelay; // wins in two seconds m_winDelay = m_endTakeWinDelay; // wins in two seconds
m_lostDelay = 0.0f; m_lostDelay = 0.0f;
if(m_exitAfterMission)
m_eventQueue->AddEvent(Event(EVENT_QUIT));
} }
if(m_exitAfterMission)
m_eventQueue->AddEvent(Event(EVENT_QUIT));
m_displayText->SetEnable(false); m_displayText->SetEnable(false);
return ERR_OK; // mission ended return ERR_OK; // mission ended
} }

View File

@ -13,7 +13,7 @@ for category in $categories; do
if [ ! -d /usr/local/share/games/colobot/levels/$category/chapter00$chapter/$level ]; then continue; fi if [ ! -d /usr/local/share/games/colobot/levels/$category/chapter00$chapter/$level ]; then continue; fi
level=`echo -n $level | cut -d . -f 1 | tail -c 3` level=`echo -n $level | cut -d . -f 1 | tail -c 3`
echo $category$chapter$level echo $category$chapter$level
colobot -runscene $category$chapter$level -scenetest -loglevel warn colobot -runscene $category$chapter$level -scenetest -loglevel warn -headless
done done
done done
done done