aboutsummaryrefslogtreecommitdiff
path: root/src/client.cpp
AgeCommit message (Collapse)Author
2015-04-17Refactor around translatePasswordest31
Change types for passed password from wstring to string, which removes converting back and forth in most cases. Move the narrow_to_wide conversion, where its neccessary, closer to irrlicht. Remove trailing spaces in guiPasswordChange.cpp. Make parameters for translatePassword passed as const reference.
2015-04-16Schematics: Refactor NodeResolver and add NodeResolveMethodkwolekr
NodeResolver name lists now belong to the NodeResolver object instead of the associated NodeDefManager. In addition to minimizing unnecessary abstraction and overhead, this move permits NodeResolvers to look up nodes that they had previously set pending for resolution. So far, this functionality has been used in the case of schematics for serialization/deserialization.
2015-04-07Make comments consistent with TOSERVER_INIT -> TOSERVER_INIT_LEGACY renameest31
2015-04-06Change screenshot filename to one likely to work on all modern filesystemsCraig Robbins
Fixes #2603
2015-04-01Move globals from main.cpp to more sane locationsCraig Robbins
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
2015-04-01Clean scaling pre-filter for formspec/HUD.Aaron Suen
2015-03-31Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.Loic Blot
Because we get a Buffer<u8> from ConnectionEvent, don't convert it to SharedBuffer<u8> and return it to Server/Client::Receive which will convert it to NetworkPacket Instead, put the Buffer<u8> directly to NetworkPacket and return it to packet processing This remove a long existing memory copy Also check the packet size directly into Connection::Receive instead of packet processing
2015-03-31Change format of screenshot namesCraig Robbins
Filename screenshot_ + ISO 8601 format + [-serial] i.e. screenshot_YYYY-MM-DDTHH::MM::SS[-serial].png Serial is added if the filename + timestamp already exists and is in the range 1 to 999
2015-03-27Clean up and tweak build systemShadowNinja
* Combine client and server man pages. * Update unit test options and available databases in man page. * Add `--worldname` to man page. * Fix a bunch of places where `"Minetest"` was used directly instead of `PROJECT_NAME`. * Disable server build by default on all operating systems. * Make `ENABLE_FREETYPE` not fail if FreeType isn't found. * Enable LevelDB, Redis, and FreeType detection by default. * Remove the `VERSION_PATCH_ORIG` hack. * Add option to search for and use system JSONCPP. * Remove broken LuaJIT version detection. * Rename `DISABLE_LUAJIT` to `ENABLE_LUAJIT`. * Rename `minetest_*` variables in `version.{h,cpp}` to `g_*`. * Clean up style of CMake files.
2015-03-25Change filename of screenshots to something more human readableCraig Robbins
2015-03-16Move client packet generators to dedicated functions for:Loic Blot
* TOSERVER_INIT_LEGACY * TOSERVER_DELETEDBLOCKS * TOSERVER_GOTBLOCKS * TOSERVER_REMOVED_SOUNDS Also use a std::vector instead of std::set for TOSERVER_REMOVED_SOUNDS
2015-03-15Finer progress bar updates when initializing nodesest31
The bar is only drawn when the user will notice a change, which prevents time overheads that this commit would cause, resulting from useless draws.
2015-03-13client.cpp: typo fix and break; fix to make some compilers happyLoic Blot
2015-03-13Replace NetworkPacket pointers to referencesLoic Blot
2015-03-13Rename some packet and handlers to <packet>_Legacy name for compat layer ↵Loic Blot
between new network changes and old network clients
2015-03-08Fix memleak pointed by issue #2439.Loic Blot
Also change bzero to memset. bzero doesn't work on windows
2015-03-08Fix unitialized data when creating TOSERVER_INIT packetLoic Blot
2015-03-07For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins
NDEBUG is defined), replace those usages with persistent alternatives
2015-03-06Clean up database API and save the local map on an intervalShadowNinja
2015-03-05Performance improvement: Use std::list instead of std::vector for ↵Loic Blot
request_media, Server::getModNames, Environment::m_simple_objects. * Also remove unused Server::m_modspaths
2015-03-05Remove Queue class which uses std::list and use native std::queueLoic Blot
2015-02-21Fix some memory leaks on packet sending.Loic Blot
2015-02-17Replace std::list by std::vector into timerUpdate callsLoic Blot
2015-02-17Remove old comment from Network Rework Patch 2/4Loic Blot
2015-02-16[Patch 2/4] Network rework: packet writing, sending and cleanupsLoic Blot
NetworkPacket.cpp: * Remove some deprecated functions, we must use streaming interface * m_data converted from u8* to std::vector<u8> * Add an exporter to forge packet to Connection object * implement operator << std::wstring. n * implement operator << std::string * dynamic resize when write packet content. * fix string writing and performances. * create ServerCommandFactory, used by client to get useful informations about packet processing (sending). * Reliability * Transmit channel * Implement putRawString for some ugly char (_INIT packet), and use it. * Many packet read and write migrated * Implement oldForgePacket to interface writing with current connection * fix U8/char/bool writing * fix string writing and performances. * add some missing functions * Use v3s16 read instead of reading x,y,z separately * Add irr::video::SColor support into packets * Add some missing handlers * Add a template function to increase offset * Throw a serialization error on packet reading (must be improved) PacketFactories: * Create ServerCommandFactory, used by client to get useful informations about packet processing (sending). * Create ClientCommandFactory, used by server to get useful informations about packet processing (sending). Client.cpp: * implement NetworkPacket ::Send interface. * Move packet handlers to a dedicated file * Remove Client::Send(SharedBuffer) Server.cpp: * implement NetworkPacket ::Send interface. * Rewrite all packets using NetworkPacket * Move packet handlers to a dedicated file * Remove Server::Send(SharedBuffer) ClientIface.cpp: * Remove sendToAll(SharedBuffer<u8>) Connection.hpp rework: * Remove duplicate include * Remove duplicate negation * Remove a useless variable * Improve code performance by using a m_peers_list instead of scanning m_peers map * Remove Connection::Send(SharedBuffer) * Fix useafterfree into NetworkPacket Sending * Remove unused Connection::sendToAll Test.cpp: * Remove dead code * Update tests to use NetworkPackets Misc: * add new wrappers to Send packets in client, using NetworkPacket * Add NetworkPacket methods for Connection * coding style fix * dead code since changes cleanup * Use v3s16 read instead of reading x,y,z separately in some packets * Use different files to handle packets received by client and server * Cleanup: Remove useless includes ok @Zeno- Tested by @Zeno- @VanessaE and @nerzhul on running servers
2015-02-11Remove workaround in itemdef.cpp to enable/disable/enable "enable_shaders" ↵Craig Robbins
setting * Increase performance (client) * Avoid changing a global value to solve a local problem
2015-02-11Revert "Remove workaround in itemdef.cpp to enable/disable/enable ↵Craig Robbins
"enable_shaders" setting" This reverts commit d25ff8fd2592f457b91e8a61240694af3902d23f.
2015-02-11Remove workaround in itemdef.cpp to enable/disable/enable "enable_shaders" ↵Craig Robbins
setting * Increase performance (client) * Avoid changing a global value to solve a local problem
2015-02-10Network Layer 7 rework (Packet handling)Loic Blot
* Move networkcode to a dedicated directory * Rename clientserver.h to network/networkprotocol.h (Better name) and sanitize some includes * Create object NetworkPacket * It stores command (opcode) and data separated * It also stores peer_id * Data reading can be done by using a streaming interface * Change packet routing analysis * Remove old conditional analysis * Now uses function pointed analysis and add connection state ({Client,Server}::handlers) * Connection state permit to categorize condition to handle before analyze packets * Create a handler for depreciated messages, instead of duplicating code
2015-02-05Reduce gettext wide/narrow and string/char* conversionsShadowNinja
2015-01-31Fix local map saving when joining a local server from the server tabCraig Robbins
Disables local map saving for all local server types See: https://github.com/minetest/minetest/issues/2024
2015-01-09Fix memory leaks due to messed up memory handling for particles as well as ↵sapier
their spawners
2015-01-04NodeResolver: Perform callback immediately if node registration phase finishedkwolekr
Also add NodeResolver callbacks on the client
2015-01-02More consistent progress bar from 0-100 on startupsapier
2014-12-12Fix missing call to std::ostringstream::strShadowNinja
2014-12-12Use std::string::empty() instead of size() where applicableAnton
2014-12-08Fix lighting artifacts (Issue #1887).RealBadAngel
2014-12-07Performance of main client loop up to 2x faster In places, up to 3 times fasterCraig Robbins
NOTE 1: This does not mean a 2x increase in framerate. Increase in fps may be up to 1-2fps NOTE 2: This local 'caching' of settings is not optimal and an alternative solution will be worked on after 0.4.11 is released
2014-12-01Fix node 0,0,0 being highlighted when enable_node_highlighting == falseCraig Robbins
Without this patch node 0,0,0 is highlighted when enable_node_highligting is false There is a minor lighting issue remaining, however it seems to be related to a different bug (https://github.com/minetest/minetest/issues/1887)
2014-11-30Implement proper font handlingsapier
2014-11-26Fix client "double saving" simple singleplayer local mapsCraig Robbins
2014-11-19Add (optional) client-side saving of server map to disksfan5
2014-11-08Speed up removing a node (less block mesh updates).RealBadAngel
2014-10-21Recalculate normals for cached meshes.RealBadAngel
Check if mesh is here before adding to meshcollector. Fix deleting the meshes.
2014-10-19Various uninitialised variable fixesCraig Robbins
sky.cpp: m_bgcolor.getAlpha() was being used before initialised mesh related: m_highlight_mesh_color was being used uninitialised
2014-10-18Add meshnode drawtype.RealBadAngel
2014-10-01Simplify player modification checksShadowNinja
2014-09-21Split settings into seperate source and header filesShadowNinja
This also cleans up settings a bit
2014-09-21Allow taking screenshots of formspecs and move message to chatBlockMen
2014-09-17Node highlighting.RealBadAngel