summaryrefslogtreecommitdiff
path: root/src/client.cpp
Commit message (Collapse)AuthorAge
* Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot2016-10-05
| | | | | | | | | | | | This is part 2 for 5f084cd98d7b3326b51320455364337539710efd Other improvements: * Use the defined ItemGroupList when used * make Client::checkPrivilege const * inline some trivial functions * Add ActiveObjectMap typedef * Add SettingsEntries typedef
* Use the standard to_string() functions for C++11 (#4279)Rogier-52016-08-11
| | | | | | | | | | | | If compiling according to a C++ version before C++11, then define std::to_string ourselves. Add a to_wstring version as well As std::to_string() for floating point types uses %.6f as floating point format converter, instead of %G, it needs special care. To preserve ftos() behavior (which is expected to use the %G format converter), it no longer uses to_string().
* Hud: Cache hud_scaling, fix minor style issueskwolekr2016-04-10
|
* Add option to not send pre v25 init packetest312016-03-15
| | | | | | | | | | | | | | | | | The legacy init packet (pre v25) sends information about the client's password that a server could use to log in to other servers if the username and password are the same. All the other benefits of SRP of protocol v25 are missed if the legacy init packet is still sent during connection creation. This patch adds an option to not send the v25 init packet. Not sending the v25 packet means breaking compat with pre v25 servers, but as the option is not enabled by default, no servers are affected unless the user explicitly flips the switch. More than 90% of the servers on the serverlist support post v25 protocols. The patch also fixes a bug with greying out of non compliant servers being done wrongly, the min and max params were mixed.
* Much better API for auth.{cpp, h}est312016-03-15
| | | | | | | | * No function overloading * Adhere coding style and with method names following lowercase_underscore_style * Use std::string in external API, handling these is much more fun
* Add options for screenshot format and qualityDiego Martinez2016-03-12
|
* Remove preload_item_visuals codeRealBadAngel2016-02-21
| | | | Closes #3748
* Move object nametags to cameraRealBadAngel2016-02-18
|
* Use vertices with tangents only when its needed.RealBadAngel2016-02-15
|
* v2d & aabbox3d<f32> & sky cleanupsnerzhul2016-02-11
| | | | | * Sky: rename Box => m_box and inline getBoundingBox * Uniformize aabbox3d<f32> to aabb3f
* Cleanup selection mesh code, add shaders for halo and selection boxesRealBadAngel2016-02-08
|
* Add on_secondary_use when right clicking an item in the airAlex Ford2015-12-02
|
* Rename macros with two leading underscoresShadowNinja2015-10-14
| | | | These names are reserved for the compiler/library implementations.
* Fix some SRP issuesest312015-09-30
| | | | | -> Remove memory allocation bugs -> Merge changes from upstream, enabling customizeable memory allocation
* Hide minimap if it has been disabled by serverest312015-09-01
|
* Change i++ to ++iDavid Jones2015-08-25
|
* Clean up threadingShadowNinja2015-08-23
| | | | | | | | | | | | | | | | | | | | * Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
* Add count based unload limit for mapblocksest312015-08-13
|
* src/client.cpp: Fix mapper memory leakBřetislav Štec2015-08-02
|
* Fixed minimap memory leakBřetislav Štec2015-07-27
|
* Fix srp.cpp:815 leakest312015-07-27
| | | | Thanks @Zeno-
* Optional reconnect functionalityest312015-07-23
| | | | | | Enable the server to request the client to reconnect. This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
* Display an access denied message when client detects a server timeoutKahrl2015-07-17
|
* Clean-up Minimap codekwolekr2015-07-08
| | | | | | | | | | | - Fixed race conditions - Fixed null dereference - Fixed out-of-bounds array access - MinimapMapblock is now allocated and added to update queue only when enabled - Removed dependency on LocalPlayer - Fixed code style - Simplified expressions and program logic - Cleaned minimap object interfaces
* Client: better m_proto_ver initialisationest312015-07-07
| | | | | | | | Previously, m_proto_ver was set to the serialisation version inside the legacy init packet. Now, if the server doesn't send a protocol version (protocols < 25), we set m_proto_ver to some value < 25 and > 0.
* Add UpdateThread and use it for minimap and mesh threadsest312015-06-29
|
* Add minimap featureRealBadAngel2015-06-27
|
* Return to ignoreest312015-06-24
|
* Replace instances of std::map<std::string, std::string> with StringMapkwolekr2015-05-19
| | | | | | Also, clean up surrounding code style Replace by-value parameter passing with const refs when possible Fix post-increment of iterators
* Add texture overridingrubenwardy2015-05-19
|
* Finalize init packets and enable protocol v25est312015-05-16
| | | | This enables srp.
* Make early protocol auth mechanism generic, and add SRPest312015-05-11
| | | | | | | Adds everything needed for SRP (and everything works too), but still deactivated, as protocol v25 init packets aren't final yet. Can be activated by changing the LATEST_PROTOCOL_VERSION header to 25 inside networkprotocol.h.
* Refactor around translatePasswordest312015-04-17
| | | | | | | 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.
* Schematics: Refactor NodeResolver and add NodeResolveMethodkwolekr2015-04-16
| | | | | | | | | 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.
* Make comments consistent with TOSERVER_INIT -> TOSERVER_INIT_LEGACY renameest312015-04-07
|
* Change screenshot filename to one likely to work on all modern filesystemsCraig Robbins2015-04-06
| | | | Fixes #2603
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
| | | | | | | | | | | | 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
* Clean scaling pre-filter for formspec/HUD.Aaron Suen2015-04-01
|
* Connection::Receive(): receive Network Packet instead of SharedBuffer<u8>.Loic Blot2015-03-31
| | | | | | | 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
* Change format of screenshot namesCraig Robbins2015-03-31
| | | | | | | | 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
* Clean up and tweak build systemShadowNinja2015-03-27
| | | | | | | | | | | | | | | | * 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.
* Change filename of screenshots to something more human readableCraig Robbins2015-03-25
|
* Move client packet generators to dedicated functions for:Loic Blot2015-03-16
| | | | | | | | * TOSERVER_INIT_LEGACY * TOSERVER_DELETEDBLOCKS * TOSERVER_GOTBLOCKS * TOSERVER_REMOVED_SOUNDS Also use a std::vector instead of std::set for TOSERVER_REMOVED_SOUNDS
* Finer progress bar updates when initializing nodesest312015-03-15
| | | | 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.
* client.cpp: typo fix and break; fix to make some compilers happyLoic Blot2015-03-13
|
* Replace NetworkPacket pointers to referencesLoic Blot2015-03-13
|
* Rename some packet and handlers to <packet>_Legacy name for compat layer ↵Loic Blot2015-03-13
| | | | between new network changes and old network clients
* Fix memleak pointed by issue #2439.Loic Blot2015-03-08
| | | | Also change bzero to memset. bzero doesn't work on windows
* Fix unitialized data when creating TOSERVER_INIT packetLoic Blot2015-03-08
|
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-07
| | | | NDEBUG is defined), replace those usages with persistent alternatives