mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
fix(gameplay): correct unknown error log condition and missing chunk pos update
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user