Fixed cheat console and particles during loading
parent
86caf4f098
commit
95a438bcc6
|
@ -417,14 +417,15 @@ bool IsPhaseWithWorld(Phase phase)
|
|||
//! Changes phase
|
||||
void CRobotMain::ChangePhase(Phase phase)
|
||||
{
|
||||
if (!IsPhaseWithWorld(m_phase) || IsInSimulationConfigPhase(m_phase) || IsInSimulationConfigPhase(phase))
|
||||
bool resetWorld = false;
|
||||
if ((IsPhaseWithWorld(m_phase) || IsPhaseWithWorld(phase)) && !IsInSimulationConfigPhase(m_phase) && !IsInSimulationConfigPhase(phase))
|
||||
{
|
||||
m_phase = phase;
|
||||
m_dialog->ChangePhase(m_phase);
|
||||
return;
|
||||
}
|
||||
GetLogger()->Info("Reseting world on phase change...\n");
|
||||
resetWorld = true;
|
||||
}
|
||||
|
||||
if (resetWorld)
|
||||
{
|
||||
m_missionTimerEnabled = m_missionTimerStarted = false;
|
||||
m_missionTimer = 0.0f;
|
||||
|
||||
|
@ -449,8 +450,12 @@ void CRobotMain::ChangePhase(Phase phase)
|
|||
m_app->SetLowCPU(true); // doesn't use much CPU in interface phases
|
||||
|
||||
DeleteAllObjects(); // removes all the current 3D Scene
|
||||
}
|
||||
|
||||
m_phase = phase;
|
||||
|
||||
if (resetWorld)
|
||||
{
|
||||
m_winDelay = 0.0f;
|
||||
m_lostDelay = 0.0f;
|
||||
m_beginSatCom = false;
|
||||
|
@ -493,6 +498,7 @@ void CRobotMain::ChangePhase(Phase phase)
|
|||
m_cameraPan = 0.0f;
|
||||
m_cameraZoom = 0.0f;
|
||||
m_shortCut = true;
|
||||
}
|
||||
|
||||
Math::Point dim, pos;
|
||||
|
||||
|
@ -519,6 +525,7 @@ void CRobotMain::ChangePhase(Phase phase)
|
|||
pb->ClearState(Ui::STATE_VISIBLE);
|
||||
|
||||
m_dialog->ChangePhase(m_phase);
|
||||
if (!resetWorld) return;
|
||||
|
||||
dim.x = 32.0f/640.0f;
|
||||
dim.y = 32.0f/480.0f;
|
||||
|
|
|
@ -294,8 +294,6 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
|
||||
if ( m_bDialog ) // this dialogue?
|
||||
{
|
||||
m_interface->EventProcess(event);
|
||||
|
||||
if ( event.type == EVENT_DIALOG_OK ||
|
||||
(event.type == EVENT_KEY_DOWN && event.key.key == KEY(RETURN) ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue