IDBENOGOOD

This commit is contained in:
MarcEricMartel 2023-11-27 13:29:59 -05:00
parent e6b3f2fb1c
commit 6e556b4f84
2 changed files with 3 additions and 2 deletions

View File

@ -201,7 +201,7 @@ void Server::Run() {
sync.ammo = 0;
sync.timestamp = 0;
sync.timer = m_game.countdown;
sendPack<Sync>(conn->getSock(), &sync, &m_buf);
sendPackTo<Sync>(m_sock_udp, &sync, &m_buf, conn->getAddr());
}
while (!endgame) {

View File

@ -1341,7 +1341,8 @@ void Engine::Render(float elapsedTime) {
case OUTPUT:
if (Deserialize(&out, pck, &bsize)) {
if (!m_players.contains(out.id)) {
std::cout << "id be no good. ";
std::cout << out.id << " is id no good." << std::endl;
break;
}
RemotePlayer* rt = static_cast<RemotePlayer*>(m_players[out.id]);