aboutsummaryrefslogtreecommitdiff
path: root/src/util
AgeCommit message (Collapse)Author
2017-04-17Fix MSVC build broken by 34d32ceSmallJoker
`round` -> `myround` Remove superflous `floor` calls
2017-04-17Include container.h in util/thread.h. util/thread.h doesn't compile without itPerttu Ahola
2017-04-15Implement delayed server shutdown with cancelation (#4664)Loïc Blot
2017-04-12Fix fips_cipher_abort warning and other duplicate macrosLoic Blot
2017-04-07Pass clang-format on 14 trivial header files fixesLoic Blot
Also remove them from whitelist
2017-04-07Clang-format: fix some header files and remove them from whitelistLoic Blot
2017-04-02Update embedded jsoncpp from unk version to 0.10.6 + move libs to lib/ ↵Loïc Blot
instead of src/ (#5473) * Update embedded jsoncpp from unk version to 0.10.6 0.10.6 is last release without c++11 * Make jsoncpp more compliant with its amalgamate Jsoncpp cpp file should be upper, make the library like it does in amalgamate * Reorganization: move minetest embedded libs outside of source tree to /lib * Fix a dead grep in LINT
2017-03-29Add CPP11 header to define nullptr & constexpr (#5471)Loïc Blot
This header permit to use nullptr & constexpr keywords in portable code segments and benefit from nullptr & constexpr when using C++11 and greater
2017-03-20Content_mapblock.cpp: Refactornumber Zero
2017-03-11Minimap: Optimisenumber Zero
2017-02-04Add ItemStack key-value meta storagerubenwardy
2017-01-20Remove `mathconstants.h` and use the correct way to get `M_PI` in MSVC. (#5072)red-001
2017-01-15Add color names from web page referenced in luaapi docsapier
2017-01-07Revert "Extend minetest.is_yes()"sfan5
This reverts commit c435eabf3ffb77eab955d5faeb5450da1befc149.
2017-01-07Extend minetest.is_yes()red-001
2017-01-04Improve getPointedThing() (#4346)Dániel Juhász
* Improved getPointedThing() The new algorithm checks every node exactly once. Now the point and normal vector of the collision is also returned in the PointedThing (currently they are not used outside of the function). Now the CNodeDefManager keeps the union of all possible nodeboxes, so the raycast won't miss any nodes. Also if there are only small nodeboxes, getPointedThing() is exceptionally fast. Also adds unit test for VoxelLineIterator. * Cleanup, code move This commit moves getPointedThing() and Client::getSelectedActiveObject() to ClientEnvironment. The map nodes now can decide which neighbors they are connecting to (MapNode::getNeighbors()).
2016-12-24Move PP() and PP2() macros to basic_macros.hRogier
Instead of redefining them everywhere.
2016-11-11Fix incorrect distance computation for visible blocks (#4765)Rogier-5
The client would not compute the distance from the camera to to a mapblock correctly. The result was that blocks that were in view (i.e. not beyond the fog limit) would not be rendered. With the improved distance computation, a range adjustment that existed in clientiface.cpp is no longer required.
2016-10-09Ensure std::unordered_ be used on MSVC 2010 too (#4600)SmallJoker
2016-10-08Ensure std::unordered_ will be used on supported MSVC compilersgregorycu
2016-10-06use unordered containers where possible (patch 4 on X)Loic Blot
Also remove some unused parameters/functions
2016-10-06Use more unordered_maps to improve performance in c++11 buildsLoic Blot
2016-08-11Use the standard to_string() functions for C++11 (#4279)Rogier-5
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().
2016-08-10couple of memory leaks fixes.David Carlier
2016-08-10Permit usage of std::unordered_map & std::unorderered_set on c++11 compilers ↵Ner'zhul
(#4430) This fallback to std::map & std::set for older compilers Use UNORDERED_SET as an example in decoration and ore biome sets Use UNORDERED_MAP as an example in nameidmapping
2016-06-11Random misc. warning fixes and cleanupskwolekr
- Fix unused c_sand member warning in Valleys Mapgen - Fix some code style - Make some std::string params const ref
2016-05-31Add colored text (not only colored chat).Ekdohibs
Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
2016-05-31Colored chat working as expected for both freetype and non-freetype builds. ↵TriBlade9
@nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/
2016-05-30Add minetest.check_password_entry callbackest31
Gives a convenient way to check a player's password. This entirely bypasses the SRP protocol, so should be used with great care. This function is not intended to be used in-game, but solely by external protocols, where no authentication of the minetest engine is provided, and also only for protocols, in which the user already gives the server the plaintext password. Examples for good use are the classical http form, or irc, an example for a bad use is a password change dialog inside formspec. Users should be aware that they lose the advantages of the SRP protocol if they enter their passwords for servers outside the normal entry box, like in in-game formspec menus, or through irc /msg s, This patch also fixes an auth.h mistake which has mixed up the order of params inside the decode_srp_verifier_and_salt function. Zeno-: Added errorstream message for invalid format when I committed
2016-04-24Escape more strings: formspecs, item descriptions, infotexts...Ekdohibs
Also, change the escape character to the more standard \x1b Thus, it can be used in the future for translation or colored text, for example.
2016-04-10Update CSRP-GMP to commit deaa11a7c29a73008est31
Backports 10 commits, with 8 commits actually affecting source code: https://github.com/est31/csrp-gmp/compare/695822e45d9ca48b75b4ec1af1b4eea19139f8b1...deaa11a7c29a730087380da231e785909ad21630
2016-03-19Clean up StrfndShadowNinja
Changes: * Fix indentation. * Pass strings by const reference. * Merge Strfnd and WStrfnd into one class instead of copying them. * Remove trailing spaces. * Fix variable names. * Move to util. * Other miscellaneous style fixes.
2016-03-15Remove chat escape sequences from chat messages, for future colored chat.Ekdohibs
2016-03-15Much better API for auth.{cpp, h}est31
* 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
2016-03-07Add AreaStore custom ID APIShadowNinja
2016-03-07Implement AreaStore serializationShadowNinja
2016-03-07Fix SpatialAreaStore not freeing removed areasShadowNinja
2016-03-07Add basic AreaStore method documentationShadowNinja
2016-03-07Sort AreaStore headerShadowNinja
2016-03-07Clean up VectorAreaStoreShadowNinja
2016-03-07Move AreaStore container selection logic into getOptimalImplementationShadowNinja
2016-03-07Move AreaStore to utilShadowNinja
2016-03-07Add minetest.register_lbm() to run code on block load onlyest31
2016-02-18HOTFIX: fix too agressive block cullingRealBadAngel
2016-02-11v2d & aabbox3d<f32> & sky cleanupsnerzhul
* Sky: rename Box => m_box and inline getBoundingBox * Uniformize aabbox3d<f32> to aabb3f
2015-12-29Add macos/freebsd missing endian.h include and add win endianness infoqiukeren
2015-11-08Fix misc. MinGW and Valgrind warningskwolekr
2015-11-08Don't compile pcgrandom on Windowsest31
There it isn't needed.
2015-11-06Add server side ncurses terminalest31
This adds a chat console the server owner can use for administration or to talk with players. It runs in its own thread, which makes the user interface immune to the server's lag, behaving just like a client, except timeout. As it uses the same console code as the f10 console, things like nick completion or a scroll buffer basically come for free. The terminal itself is written in a general way so that adding a client version later on is just about implementing an interface. Fatal errors are printed after the console exists and the ncurses terminal buffer gets cleaned up with endwin(), so that the error still remains visible. The server owner can chose their username their entered text will have in chat and where players can send PMs to. Once the username is secured with a password to prevent anybody to take over the server, the owner can execute admin tasks over the console. This change includes a contribution by @kahrl who has improved ncurses library detection.
2015-11-03Silence 'unused typedef' warning for STATIC_ASSERT()kwolekr