diff --git a/test/btphystest.cpp b/test/btphystest.cpp index 2a881ff6..03273913 100644 --- a/test/btphystest.cpp +++ b/test/btphystest.cpp @@ -59,12 +59,12 @@ LOLFX_RESOURCE_DECLARE(front_camera_sprite); BtPhysTest::BtPhysTest(bool editor) { - m_init_done = false; + m_init_status = 0; } void BtPhysTest::InitApp() { - m_init_done = true; + m_init_status = 1; m_loop_value = .0f; @@ -305,14 +305,19 @@ void BtPhysTest::TickGame(float seconds) { WorldEntity::TickGame(seconds); - if (!m_init_done) + if (!m_init_status) { if (g_renderer) InitApp(); - else - return; + return; + } + else if (m_init_status == 1) + { + m_init_status++; + return; } + if (m_controller->GetKey(KEY_QUIT).IsReleased()) Ticker::Shutdown(); @@ -565,7 +570,7 @@ void BtPhysTest::TickDraw(float seconds) { WorldEntity::TickDraw(seconds); - if (!m_init_done) + if (m_init_status != 2) return; if (!m_ready) diff --git a/test/btphystest.h b/test/btphystest.h index 773bf6f9..c63cbb53 100644 --- a/test/btphystest.h +++ b/test/btphystest.h @@ -64,7 +64,7 @@ private: Controller * m_controller; Light * m_light1; Light * m_light2; - bool m_init_done; + int m_init_status; bool m_ready; lol::phys::Simulation* m_simulation;