diff --git a/src/td/display/state/DebugWorldState.cpp b/src/td/display/state/DebugWorldState.cpp index e21e467..303cb67 100644 --- a/src/td/display/state/DebugWorldState.cpp +++ b/src/td/display/state/DebugWorldState.cpp @@ -29,6 +29,7 @@ namespace td { +// TODO: get rid of this class class WorldApply : public protocol::PacketHandler { private: game::World& m_World; @@ -84,25 +85,26 @@ game::WorldPtr GetWorld() { } DebugWorldState::DebugWorldState(Display& a_Display) : DisplayState(a_Display) { - game::WorldPtr serverWorld = GetWorld(); - // server + game::WorldPtr serverWorld = GetWorld(); auto serverFakeSocket = std::make_shared(); m_Server = std::make_unique(serverFakeSocket); // client + game::WorldPtr clientWorld = GetWorld(); auto clientFakeSocket = client::FakeSocket::Connect(serverFakeSocket); m_Client = std::make_unique(clientFakeSocket); - game::WorldPtr clientWorld = GetWorld(); - + // render m_Renderer.AddRenderer(m_Camera, *clientWorld); m_Renderer.AddRenderer(m_Camera, *clientWorld); m_Renderer.AddRenderer(m_Camera, *clientWorld); + // camera m_Camera.SetCamPos({77, 7, 13}); m_Camera.UpdatePerspective(m_StateMachine.GetAspectRatio()); + // states m_ClientState = m_Client->ChangeState(clientWorld, STEP_TIME); m_Server->ChangeState(serverWorld); }