Eh?
This commit is contained in:
@@ -374,15 +374,13 @@ void Server::Run() {
|
||||
sendPackTo<BulletAdd>(m_sock_udp, bull, &m_buf, conn->getAddr());
|
||||
delete bull;
|
||||
}
|
||||
netbull.clear();
|
||||
if (!netbull.empty())
|
||||
netbull.clear();
|
||||
|
||||
if (!bullets.empty())
|
||||
std::cout << "Bullets: " << bullets.size() << std::endl;
|
||||
|
||||
for (auto bull = bullets.begin(); bull != bullets.end(); ++bull) {
|
||||
ChunkMod* cmod = nullptr;
|
||||
Bullet* bullet = *bull;
|
||||
if (bullet->Update(m_world, (1. / 60.), 20, m_players, &cmod)) {
|
||||
if (bullet->Update(m_world, (1. / 60.), 1, m_players, &cmod)) {
|
||||
if (cmod)
|
||||
chunkdiffs.emplace_back(cmod);
|
||||
bullit.push_back(bull);
|
||||
@@ -392,7 +390,12 @@ void Server::Run() {
|
||||
|
||||
for (auto& bull: bullit)
|
||||
bullets.erase(bull);
|
||||
bullit.clear();
|
||||
|
||||
if (!bullets.empty())
|
||||
bullets.clear();
|
||||
|
||||
if (!bullit.empty())
|
||||
bullit.clear();
|
||||
|
||||
for (auto& chat : chatlog) {
|
||||
Log(chat->mess, false, false);
|
||||
@@ -400,14 +403,16 @@ void Server::Run() {
|
||||
sendPackTo<Chat>(m_sock_udp, chat, &m_buf, conn->getAddr());
|
||||
delete chat;
|
||||
}
|
||||
chatlog.clear();
|
||||
if (!chatlog.empty())
|
||||
chatlog.clear();
|
||||
|
||||
for (auto& chmo : chunkdiffs) {
|
||||
for (auto& [key, conn] : m_conns)
|
||||
sendPackTo<ChunkMod>(m_sock_udp, chmo, &m_buf, conn->getAddr());
|
||||
delete chmo;
|
||||
}
|
||||
chunkdiffs.clear();
|
||||
if (!chunkdiffs.empty())
|
||||
chunkdiffs.clear();
|
||||
}
|
||||
|
||||
Chat end;
|
||||
|
Reference in New Issue
Block a user