diff --git a/src/client/client.cpp b/src/client/client.cpp index 744c5eb9084b..839ed391b338 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -1317,9 +1317,7 @@ void Client::sendChatMessage(const std::wstring &message) m_chat_message_allowance -= 1.0f; NetworkPacket pkt(TOSERVER_CHAT_MESSAGE, 2 + message.size() * sizeof(u16)); - pkt << message; - Send(&pkt); } else if (m_out_chat_queue.size() < (u16) max_queue_size || max_queue_size < 0) { m_out_chat_queue.push(message); @@ -1701,8 +1699,11 @@ void Client::typeChatMessage(const std::wstring &message) if (message.empty()) return; + auto message_utf8 = wide_to_utf8(message); + infostream << "Typed chat message: \"" << message_utf8 << "\"" << std::endl; + // If message was consumed by script API, don't send it to server - if (m_mods_loaded && m_script->on_sending_message(wide_to_utf8(message))) + if (m_mods_loaded && m_script->on_sending_message(message_utf8)) return; // Send to others diff --git a/src/client/content_cao.cpp b/src/client/content_cao.cpp index a38445dc44ba..ad316209a3c4 100644 --- a/src/client/content_cao.cpp +++ b/src/client/content_cao.cpp @@ -357,7 +357,6 @@ bool GenericCAO::collideWithObjects() const void GenericCAO::initialize(const std::string &data) { - infostream<<"GenericCAO: Got init data"<getBool("enable_shaders"); @@ -393,8 +392,7 @@ void GenericCAO::processInitData(const std::string &data) } const u8 num_messages = readU8(is); - - for (int i = 0; i < num_messages; i++) { + for (u8 i = 0; i < num_messages; i++) { std::string message = deSerializeString32(is); processMessage(message); } @@ -1704,8 +1702,6 @@ void GenericCAO::processMessage(const std::string &data) if (expire_visuals) { expireVisuals(); } else { - infostream << "GenericCAO: properties updated but expiring visuals" - << " not necessary" << std::endl; if (textures_changed) { // don't update while punch texture modifier is active if (m_reset_textures_timer < 0) diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index cf7598a7e973..e94de87bbaa2 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -195,16 +195,7 @@ void RenderingEngine::cleanupMeshCache() bool RenderingEngine::setupTopLevelWindow() { - // FIXME: It would make more sense for there to be a switch of some - // sort here that would call the correct toplevel setup methods for - // the environment Minetest is running in. - - /* Setting general properties for the top level window */ - verbosestream << "Client: Configuring general top level window properties" - << std::endl; - bool result = setWindowIcon(); - - return result; + return setWindowIcon(); } bool RenderingEngine::setWindowIcon() diff --git a/src/client/shader.cpp b/src/client/shader.cpp index 7465692236e1..1f3dfe963afd 100644 --- a/src/client/shader.cpp +++ b/src/client/shader.cpp @@ -488,8 +488,6 @@ u32 ShaderSource::getShader(const std::string &name, u32 ShaderSource::getShaderIdDirect(const std::string &name, MaterialType material_type, NodeDrawType drawtype) { - //infostream<<"getShaderIdDirect(): name=\""< full_d_max) { new_nearest_unsent_d = 0; m_nothing_to_send_pause_timer = 2.0f; - infostream << "Server: Player " << m_name << ", RemoteClient " << peer_id << ": full map send completed after " << m_map_send_completion_timer << "s, restarting" << std::endl; + infostream << "Server: Player " << m_name << ", peer_id=" << peer_id + << ": full map send completed after " << m_map_send_completion_timer + << "s, restarting" << std::endl; m_map_send_completion_timer = 0.0f; } else { if (nearest_sent_d != -1) diff --git a/src/itemdef.cpp b/src/itemdef.cpp index daf2295a59e7..07f07a53e895 100644 --- a/src/itemdef.cpp +++ b/src/itemdef.cpp @@ -353,14 +353,14 @@ class CItemDefManager: public IWritableItemDefManager if (!inventory_overlay.empty()) cache_key += ":" + inventory_overlay; - infostream << "Lazily creating item texture and mesh for \"" - << cache_key << "\""<second.get(); + infostream << "Lazily creating item texture and mesh for \"" + << cache_key << "\"" << std::endl; + ITextureSource *tsrc = client->getTextureSource(); // Create new ClientCached diff --git a/src/main.cpp b/src/main.cpp index b5299030caaa..e3c72fdd03da 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -713,8 +713,8 @@ static void uninit_common() static void startup_message() { - infostream << PROJECT_NAME << " " << _("with") - << " SER_FMT_VER_HIGHEST_READ=" + infostream << PROJECT_NAME_C << " " << g_version_hash + << "\nwith SER_FMT_VER_HIGHEST_READ=" << (int)SER_FMT_VER_HIGHEST_READ << ", " << g_build_info << std::endl; } diff --git a/src/mapblock.cpp b/src/mapblock.cpp index e3c307563d96..3b902153e29c 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -91,14 +91,15 @@ bool MapBlock::onObjectsActivation() if (m_static_objects.getAllStored().empty()) return false; + const auto count = m_static_objects.getStoredSize(); verbosestream << "MapBlock::onObjectsActivation(): " - << "activating objects of block " << getPos() << " (" - << m_static_objects.getStoredSize() << " objects)" << std::endl; + << "activating " << count << "objects in block " << getPos() + << std::endl; - if (m_static_objects.getStoredSize() > g_settings->getU16("max_objects_per_block")) { + if (count > g_settings->getU16("max_objects_per_block")) { errorstream << "suspiciously large amount of objects detected: " - << m_static_objects.getStoredSize() << " in " - << getPos() << "; removing all of them." << std::endl; + << count << " in " << getPos() << "; removing all of them." + << std::endl; // Clear stored list m_static_objects.clearStored(); raiseModified(MOD_STATE_WRITE_NEEDED, MOD_REASON_TOO_MANY_OBJECTS); diff --git a/src/script/cpp_api/s_entity.cpp b/src/script/cpp_api/s_entity.cpp index 0684fb0ab447..7b96e65eda2d 100644 --- a/src/script/cpp_api/s_entity.cpp +++ b/src/script/cpp_api/s_entity.cpp @@ -29,9 +29,6 @@ bool ScriptApiEntity::luaentity_Add(u16 id, const char *name) { SCRIPTAPI_PRECHECKHEADER - verbosestream<<"scriptapi_luaentity_add: id="<removingFromEnvironment(); // Deregister in scripting api