fix(gameplay): correct unknown error log condition and missing chunk pos update

This commit is contained in:
2026-06-24 18:50:02 +08:00
parent 0223fefa6b
commit 4e6f29bedd
2 changed files with 4 additions and 1 deletions

View File

@@ -58,7 +58,9 @@ asio::awaitable<void> NetworkServer::listen() {
Logger::error("accept error {}", e.what());
}
} catch (...) {
Logger::error("Network Server: Unkown Error");
if (!m_stopped) {
Logger::error("Network Server: Unknown Error");
}
}
co_return;

View File

@@ -15,6 +15,7 @@ void ServerPlayer::update_pos(float x, float y, float z) {
float dist = distance2(chunk_pos, m_last_chunk_pos);
if (dist > 2) {
m_world.need_gen(m_uuid);
m_last_chunk_pos = chunk_pos;
}
}
} // namespace Cubed