diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-02-10 19:50:36 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-02-10 19:50:36 +0100 |
commit | 1fbbb768252f872dfa961d3a73460d996164d527 (patch) | |
tree | e9faf93dbd894b253ac3d1f0895b7468e8fee50d /src/client/client.cpp | |
parent | 74f5f033e04c0d8694815fedb795838d4926cbc9 (diff) | |
parent | 9736b9cea5f841bb0e9bb2c9c05c3b2560327064 (diff) | |
download | dragonfireclient-1fbbb768252f872dfa961d3a73460d996164d527.tar.xz |
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index 9bbb57668..f9ecb20c6 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -160,20 +160,6 @@ void Client::loadMods() scanModIntoMemory(BUILTIN_MOD_NAME, getBuiltinLuaPath()); m_script->loadModFromMemory(BUILTIN_MOD_NAME); - // TODO Uncomment when server-sent CSM and verifying of builtin are complete - /* - // Don't load client-provided mods if disabled by server - if (checkCSMRestrictionFlag(CSMRestrictionFlags::CSM_RF_LOAD_CLIENT_MODS)) { - warningstream << "Client-provided mod loading is disabled by server." << - std::endl; - // If builtin integrity is wrong, disconnect user - if (!checkBuiltinIntegrity()) { - // TODO disconnect user - } - return; - } - */ - ClientModConfiguration modconf(getClientModsLuaPath()); m_mods = modconf.getMods(); // complain about mods with unsatisfied dependencies @@ -219,12 +205,6 @@ void Client::loadMods() m_script->on_minimap_ready(m_minimap); } -bool Client::checkBuiltinIntegrity() -{ - // TODO - return true; -} - void Client::scanModSubfolder(const std::string &mod_name, const std::string &mod_path, std::string mod_subpath) { @@ -1219,7 +1199,7 @@ void Client::sendChatMessage(const std::wstring &message) if (canSendChatMessage()) { u32 now = time(NULL); float time_passed = now - m_last_chat_message_sent; - m_last_chat_message_sent = time(NULL); + m_last_chat_message_sent = now; m_chat_message_allowance += time_passed * (CLIENT_CHAT_MESSAGE_LIMIT_PER_10S / 8.0f); if (m_chat_message_allowance > CLIENT_CHAT_MESSAGE_LIMIT_PER_10S) @@ -1298,9 +1278,8 @@ void Client::sendPlayerPos(v3f pos) // Save bandwidth by only updating position when // player is not dead and something changed - // FIXME: This part causes breakages in mods like 3d_armor, and has been commented for now - // if (m_activeobjects_received && player->isDead()) - // return; + if (m_activeobjects_received && player->isDead()) + return; if ( player->last_position == pos && @@ -1875,7 +1854,7 @@ void Client::makeScreenshot() sstr << "Failed to save screenshot '" << filename << "'"; } pushToChatQueue(new ChatMessage(CHATMESSAGE_TYPE_SYSTEM, - narrow_to_wide(sstr.str()))); + utf8_to_wide(sstr.str()))); infostream << sstr.str() << std::endl; image->drop(); } |