diff options
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index 37d4bd816..0f8297080 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -118,6 +118,7 @@ Client::Client( m_particle_manager(&m_env), m_con(new con::Connection(PROTOCOL_ID, 512, CONNECTION_TIMEOUT, ipv6, this)), m_address_name(address_name), + m_allow_login_or_register(allow_login_or_register), m_server_ser_ver(SER_FMT_VER_INVALID), m_last_chat_message_sent(time(NULL)), m_password(password), @@ -125,8 +126,7 @@ Client::Client( m_media_downloader(new ClientMediaDownloader()), m_state(LC_Created), m_game_ui(game_ui), - m_modchannel_mgr(new ModChannelMgr()), - m_allow_login_or_register(allow_login_or_register) + m_modchannel_mgr(new ModChannelMgr()) { // Add local player m_env.setLocalPlayer(new LocalPlayer(this, playername)); @@ -424,7 +424,7 @@ void Client::step(float dtime) if(m_map_timer_and_unload_interval.step(dtime, map_timer_and_unload_dtime)) { std::vector<v3s16> deleted_blocks; m_env.getMap().timerUpdate(map_timer_and_unload_dtime, - g_settings->getFloat("client_unload_unused_data_timeout"), + std::max(g_settings->getFloat("client_unload_unused_data_timeout"), 0.0f), g_settings->getS32("client_mapblock_limit"), &deleted_blocks); @@ -1254,7 +1254,7 @@ void Client::sendChatMessage(const std::wstring &message) pkt << message; Send(&pkt); - } else if (m_out_chat_queue.size() < (u16) max_queue_size || max_queue_size == -1) { + } else if (m_out_chat_queue.size() < (u16) max_queue_size || max_queue_size < 0) { m_out_chat_queue.push(message); } else { infostream << "Could not queue chat message because maximum out chat queue size (" |