mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Improve readability and infos in verbose log (#13828)
This commit is contained in:
parent
5949172735
commit
c3114132d3
11 changed files with 26 additions and 51 deletions
|
@ -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
|
||||
|
|
|
@ -357,7 +357,6 @@ bool GenericCAO::collideWithObjects() const
|
|||
|
||||
void GenericCAO::initialize(const std::string &data)
|
||||
{
|
||||
infostream<<"GenericCAO: Got init data"<<std::endl;
|
||||
processInitData(data);
|
||||
|
||||
m_enable_shaders = g_settings->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)
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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=\""<<name<<"\""<<std::endl;
|
||||
|
||||
// Empty name means shader 0
|
||||
if (name.empty()) {
|
||||
infostream<<"getShaderIdDirect(): name is empty"<<std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue