diff --git a/SQCSim-srv/server.cpp b/SQCSim-srv/server.cpp index 0f485c1..7fc3df6 100644 --- a/SQCSim-srv/server.cpp +++ b/SQCSim-srv/server.cpp @@ -158,10 +158,9 @@ int Server::Ready() { play.tid = log->tid; sendPackTo(m_sock_udp, &m_game, &m_buf, &sockad); + std::cout << m_game.seed << std::endl; Connection* conn = new Connection(sock, sockad, *log, play); - - m_players[log->sid] = conn; delete log; @@ -222,8 +221,6 @@ void Server::Run() { case INPUT: if (Deserialize(&in, pck, &bsize)) { m_players[in.sid]->AddInput(in); - //m_input_manifest[in.timestamp] = in; - //m_input_vector.push_back(in); } break; case SYNC: @@ -234,7 +231,7 @@ void Server::Run() { } } lsPck.clear(); - //conn->getPacks(conn->getSock()); + if (conn->m_nsync) { conn->Run(m_world); conn->sendPacks(m_sock_udp, m_players); diff --git a/SQCSim2021/remoteplayer.cpp b/SQCSim2021/remoteplayer.cpp index 81de3ea..d918ed9 100644 --- a/SQCSim2021/remoteplayer.cpp +++ b/SQCSim2021/remoteplayer.cpp @@ -83,13 +83,13 @@ void RemotePlayer::Feed(const netprot::Output out) { void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tran, float elapsedTime) { - float x = GetPosition().x; float y = GetPosition().y; float z = GetPosition().z; float width = 1.f; float height = 1.7f; + std::cout << "hahahaha"; //Matrix4 mat4 = tran.GetMatrix(); //mat4 VP = pMatrix * vMatrix;