From 4a237f5925eb0d371e097416b17dd5e919cd2258 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 31 Dec 2013 12:58:45 +0100 Subject: CPauseManager --- src/script/script.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/script/script.cpp') diff --git a/src/script/script.cpp b/src/script/script.cpp index 0518479..0b3eec4 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -3423,6 +3423,7 @@ CScript::CScript(CObject* object, CTaskManager** secondaryTask) m_secondaryTask = secondaryTask; m_interface = m_main->GetInterface(); + m_pause = CPauseManager::GetInstancePointer(); m_ipf = CBOT_IPF; m_errMode = ERM_STOP; @@ -3821,12 +3822,12 @@ bool CScript::Continue(const Event &event) GetError(s); m_main->GetDisplayText()->DisplayText(s.c_str(), m_object, 10.0f, Ui::TT_ERROR); } - m_engine->SetPause(true); // gives pause + m_pause->SetPause(PAUSE_EDITOR); // gives pause return true; } if ( !m_bContinue ) { - m_engine->SetPause(true); // gives pause + m_pause->SetPause(PAUSE_EDITOR); // gives pause } } @@ -3869,9 +3870,9 @@ bool CScript::Step(const Event &event) if ( !m_bRun ) return true; if ( !m_bStepMode ) return false; - m_engine->SetPause(false); + // ??? m_engine->SetPause(false); // TODO: m_app StepSimulation??? m_engine->StepSimulation(0.01f); // advance of 10ms - m_engine->SetPause(true); + // ??? m_engine->SetPause(true); m_event = event; @@ -3901,7 +3902,7 @@ bool CScript::Step(const Event &event) if ( m_bContinue ) // instuction "move", "goto", etc. ? { - m_engine->SetPause(false); // removes the pause + m_pause->ClearPause(); // removes the pause } return false; } -- cgit v1.2.3-1-g7c22