Paramat [Thu, 5 Apr 2018 23:10:16 +0000 (00:10 +0100)]
Mgcarpathian: Fix spawn level calculation (#7212)
Paramat [Thu, 5 Apr 2018 20:52:10 +0000 (21:52 +0100)]
Mgcarpathian: Remove insignificant 'base' noise variation (#7209)
Was only +-1 node over a scale of thousands of nodes.
Replace with 'base_level' parameter value.
Paramat [Thu, 5 Apr 2018 19:15:38 +0000 (20:15 +0100)]
Zoom adjustDist(): Improve variable name (#7208)
Paramat [Thu, 5 Apr 2018 16:21:41 +0000 (17:21 +0100)]
Biome API / cavegen: Add definable cave liquid for a biome (#7192)
Add 'node_cave_liquid' as a new field in biome registration.
If field is absent cave liquids fall back to classic behaviour.
Loïc Blot [Wed, 4 Apr 2018 18:49:42 +0000 (20:49 +0200)]
[clang-tidy] Promote some performance-* as a coding error (#7194)
* Promote performance-type-promotion-in-math-fn as a coding error
* Promote performance-faster-string-find too (which is not problematic currently)
* Same for performance-implicit-cast-in-loop
* Fix remaining tidy points
Loïc Blot [Wed, 4 Apr 2018 08:56:46 +0000 (10:56 +0200)]
Huge LBM lookup performance improvement on mapblock loading (#7195)
* Huge LBM lookup performance improvement on mapblock loading
Loic Blot [Wed, 4 Apr 2018 06:40:21 +0000 (08:40 +0200)]
Fix 5 issues reported by PVS studio
* src/sky.cpp 146 warn V519 The 'suncolor_f.r' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 142, 146.
* src/sky.cpp 147 warn V519 The 'suncolor_f.g' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 143, 147.
* src/sky.cpp 148 warn V519 The 'suncolor_f.b' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 144, 148.
* src/threading/thread.cpp 63 err V730 Not all members of a class are initialized inside the constructor. Consider inspecting: m_thread_obj.
* src/server.cpp 3243 err V595 The 'log' pointer was utilized before it was verified against nullptr. Check lines: 3243, 3258.
Loic Blot [Wed, 4 Apr 2018 05:42:40 +0000 (07:42 +0200)]
Fix last performance-type-promotion-in-math-fn problems
Loïc Blot [Tue, 3 Apr 2018 22:43:08 +0000 (00:43 +0200)]
Optimize a little bit isBlockInSight, adjustDist & collisions (#7193)
* Use constexpr + unroll some calculations to cache definitively some calculations
* Unroll some calls in collision code & use a constref instead of a copy in one occurence
Loic Blot [Tue, 3 Apr 2018 21:05:22 +0000 (23:05 +0200)]
Fix last clang-tidy reported problems for performance-type-promotion-in-math-fn
Based on https://travis-ci.org/minetest/minetest/jobs/
361810382 output
Also fix 2 missing copyright notices
Loic Blot [Tue, 3 Apr 2018 19:58:29 +0000 (21:58 +0200)]
Fix more clang-tidy reported problems for performance-type-promotion-in-math-fn
Based on https://travis-ci.org/minetest/minetest/jobs/
361714253 output
Loïc Blot [Tue, 3 Apr 2018 16:16:17 +0000 (18:16 +0200)]
Fix various clang-tidy reported performance-type-promotion-in-math-fn
SmallJoker [Tue, 3 Apr 2018 09:15:58 +0000 (11:15 +0200)]
Selected ItemStack: Reduce black magic (#6520)
* Selected ItemStack: Reduce black magic
Better button variable value naming
Vitaliy [Tue, 3 Apr 2018 06:23:46 +0000 (09:23 +0300)]
Optimize entity-entity collision (#6587)
* Add IrrLicht type aliases
* Add hash for IrrLicht vector
* Add object map
Loïc Blot [Mon, 2 Apr 2018 21:51:08 +0000 (23:51 +0200)]
Fix many issues reported by clang-tidy (#7189)
* Fix many issues reported by clang-tidy
We have many issues in code related to some performance to float <-> double.
Clang-tidy reported it in performance-type-promotion-in-math-fn
I fixed many of them. It's not ready for a promote to blocking
Also fix some value which should be const-ref
SmallJoker [Sun, 1 Apr 2018 20:50:26 +0000 (22:50 +0200)]
'fix' LINT, use InventoryLocation==
SmallJoker [Sat, 31 Mar 2018 11:47:19 +0000 (13:47 +0200)]
Run callback in IDropAction, refactor function arguments
SmallJoker [Sat, 31 Mar 2018 10:30:43 +0000 (12:30 +0200)]
Add player inventory callbacks
you [Mon, 2 Apr 2018 14:52:07 +0000 (16:52 +0200)]
Formspecs: Use mouse wheel to pick up and deposit single items
Loïc Blot [Sun, 1 Apr 2018 21:57:55 +0000 (23:57 +0200)]
LINT: add clang-tidy step (#6295)
* Implement new travis clang-tidy build step
* This step enable some rules and enforce one rule as error
* This permits to have some C++ quality rules based on clang & clang contributor guidelines
* Fix clang-tidy reported problems on push_back -> emplace_back
you [Sat, 31 Mar 2018 12:48:38 +0000 (14:48 +0200)]
ObjectRef: Add add_velocity() (#3208)
Allow changing the velocity of objects relatively to their current velocity
SmallJoker [Sat, 31 Mar 2018 12:33:54 +0000 (14:33 +0200)]
event.h: Fix import GCC warning caused by
ce87310
Loïc Blot [Fri, 30 Mar 2018 16:32:52 +0000 (18:32 +0200)]
Client eventmanager refactor (#7179)
* Drop EventManager from GameDef & do some client cleanups
* EventManager is only used by Client. Don't expose it on Server & GameDef for nothing
* Drop Client::event() in favor of direct calls to getEventManager
* Cleanup some event put from new + put to put(new)
* MtEvent: add Type(u8) enum
* This will enhance event performance & ensure stricter type
* Drop MtEvent::checkIs (unused)
* clang-tidy reported fixes
* Code style
* Move event_manager.h to the client directory as it's only used by client
Add EventManager unittests + switch to unordered_map as order is not important here
Drop a unused function
Paramat [Thu, 29 Mar 2018 20:08:42 +0000 (21:08 +0100)]
Mgcarpathian: Mapgen loop optimisations. fabs() -> std::fabs()
* Mgcarpathian: ZYX -> ZXY mapgen loop optimisation.
* 'pow(n, 3)' to 'n * n * n' type optimisations.
* fabs() -> std::fabs().
SmallJoker [Thu, 29 Mar 2018 19:44:13 +0000 (21:44 +0200)]
core.rotate_node: Do not trigger after_place_node (#6900)
nOOb3167 [Thu, 29 Mar 2018 19:43:57 +0000 (21:43 +0200)]
Sound: fix static initialization order dependency by not having one (#7168)
Ensure singleton is reset
stujones11 [Sun, 18 Mar 2018 17:25:05 +0000 (17:25 +0000)]
Optional alpha channel support for entities
Loic Blot [Thu, 29 Mar 2018 11:41:48 +0000 (13:41 +0200)]
Loic Blot [Thu, 29 Mar 2018 11:36:01 +0000 (13:36 +0200)]
Fix a warning reported by clang
minetest/src/script/cpp_api/s_player.h:27:1: warning: struct 'PlayerHPChangeReason' was previously declared as a class [-Wmismatched-tags]
struct PlayerHPChangeReason;
Loic Blot [Thu, 29 Mar 2018 11:30:18 +0000 (13:30 +0200)]
Fix various Client class functions not marked as override (virtual)
Also switch some of them which are reported by clang-tidy
Andrew Ward [Wed, 28 Mar 2018 21:14:16 +0000 (22:14 +0100)]
Load dependencies and description from mod.conf
Andrew Ward [Wed, 28 Mar 2018 15:05:18 +0000 (16:05 +0100)]
Add reasons to on_dieplayer and on_hpchange
Andrew Ward [Wed, 28 Mar 2018 15:04:41 +0000 (16:04 +0100)]
Add formspec theming using prepended strings
Loïc Blot [Mon, 26 Mar 2018 15:44:54 +0000 (17:44 +0200)]
Update jsoncpp to 1.8.4 (#7172)
nOOb3167 [Mon, 26 Mar 2018 15:44:40 +0000 (17:44 +0200)]
Guard sound manager initialization with "enable_sound" (#7167)
D Tim Cummings [Mon, 26 Mar 2018 15:43:59 +0000 (01:43 +1000)]
macOS: don't require X11 libraries during compilation (#7149)
The xxf86vm needs to be removed from Apple builds to avoid CMake Error XXF86VM_LIBRARY is NOTFOUND
Paramat [Mon, 26 Mar 2018 03:59:49 +0000 (04:59 +0100)]
Mapgen: Remove unused mgv7 code and some unused biometypes
nOOb3167 [Sat, 24 Mar 2018 15:05:26 +0000 (16:05 +0100)]
Make sounds stop playing when entering game or mainmenu
Loïc Blot [Sat, 24 Mar 2018 14:45:25 +0000 (15:45 +0100)]
Cleanup sound manager class (#7158)
* Cleanup sound manager client
* Use some const refs
* Use auto on iterators
* Drop unused parameters
* Move sound_openal.* to client folder
* Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
you [Fri, 23 Mar 2018 23:31:33 +0000 (00:31 +0100)]
Print the mod loading time (#7137)
* Print the mod loading time
Loic Blot [Fri, 23 Mar 2018 21:12:42 +0000 (22:12 +0100)]
Fix some gcc 7.3 reported warnings
```
src/client/joystick_controller.h:85:2: warning: duplicate 'virtual' declaration specifier [-Wduplicate-decl-specifier]
virtual bool isTriggered(const irr::SEvent::SJoystickEvent &ev) const;
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: warning: destructor called on non-final 'JoystickAxisCmb' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
destroy(_Up* __p) { __p->~_Up(); }
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../include/c++/7.3.1/ext/new_allocator.h:140:22: warning: destructor called on non-final 'JoystickButtonCmb' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
destroy(_Up* __p) { __p->~_Up(); }
```
nOOb3167 [Fri, 23 Mar 2018 14:31:43 +0000 (15:31 +0100)]
Global initialization of sound using SoundManagerGlobal (#7063)
* Global initialization of sound using SoundManagerGlobal
Vitaliy [Thu, 22 Mar 2018 19:59:49 +0000 (22:59 +0300)]
Update mesh collector and move it to a separate file (#6904)
* Update MeshCollector
* Simplify MeshCollector
Loïc Blot [Thu, 22 Mar 2018 18:44:41 +0000 (19:44 +0100)]
Gitlab CI: Disable currently broken ubuntu 16.10 & 17.04 builds
I will try to repair them later
Paramat [Thu, 22 Mar 2018 02:36:52 +0000 (02:36 +0000)]
Lua_api.txt: Improve noise documentation
paramat [Sat, 17 Mar 2018 22:05:21 +0000 (22:05 +0000)]
Minetest ASCII art: Move from actionstream to rawstream
paramat [Tue, 20 Mar 2018 02:30:25 +0000 (02:30 +0000)]
Mgfractal / chunksize: Improve documentation
paramat [Sun, 18 Mar 2018 05:34:02 +0000 (05:34 +0000)]
Lua_api.txt: Fix hardware colouring documentation
More 'draw type' -> 'paramtype2' changes, missing from a previous commit.
Loïc Blot [Sun, 18 Mar 2018 15:20:08 +0000 (16:20 +0100)]
Add src/unittest/test_world/world.mt to gitignore
Fixes #7146
Loic Blot [Sat, 17 Mar 2018 11:13:37 +0000 (12:13 +0100)]
Add missing file to android build
Vitaliy [Sat, 17 Mar 2018 09:10:16 +0000 (12:10 +0300)]
Fix node-nodebox lighting difference in direct sunlight (#7061)
Loic Blot [Sat, 17 Mar 2018 08:21:49 +0000 (09:21 +0100)]
.gitignore: ignore more files (android, unittests)
paramat [Sat, 17 Mar 2018 05:00:37 +0000 (05:00 +0000)]
Lua_api.txt: Split long lines part 6
Loic Blot [Fri, 16 Mar 2018 18:34:41 +0000 (19:34 +0100)]
Fix a crash or random memory leak when reseting saved environment variable in test_servermodmanager.cpp
Loic Blot [Fri, 16 Mar 2018 08:12:39 +0000 (09:12 +0100)]
Drop Server::m_enable_rollback_recording it's only used in server constructor
Loic Blot [Fri, 16 Mar 2018 07:52:42 +0000 (08:52 +0100)]
ServerEnvironment::loadDefaultMeta: Loading default meta is only possible for ServerEnv itself
Loic Blot [Fri, 16 Mar 2018 07:44:57 +0000 (08:44 +0100)]
Forgot to remove obsolete Server::m_mods
Loïc Blot [Fri, 16 Mar 2018 07:41:33 +0000 (08:41 +0100)]
Server: delegate mod management & config to ServerModConfiguration (#7131)
* Server: delegate mod management & config to ServerModConfiguration (rename it to ServerModManager)
* Use c++11 range based loops
* Add unittests + experimental/default mod as a test case to permit testing mod loading in future tests
Loic Blot [Fri, 16 Mar 2018 07:40:09 +0000 (08:40 +0100)]
Fix an alone if to be with a missing else
paramat [Fri, 16 Mar 2018 02:47:35 +0000 (02:47 +0000)]
Lua_api.txt: Split long lines part 5, fix hardware colouring docs
paramat [Thu, 15 Mar 2018 04:29:09 +0000 (04:29 +0000)]
Biomes: Fix vertical biome blend
pauloue [Thu, 15 Mar 2018 16:49:16 +0000 (12:49 -0400)]
README: Fix Fedora dependencies (#7133)
paramat [Wed, 14 Mar 2018 04:12:18 +0000 (04:12 +0000)]
Lua_api.txt: Split long lines part 4
paramat [Tue, 13 Mar 2018 01:59:01 +0000 (01:59 +0000)]
Rename 'subgame' to 'game'
paramat [Mon, 12 Mar 2018 02:49:16 +0000 (02:49 +0000)]
Lua_api.txt: Improve and complete drawtype documentation
Move documentation of mesh and plantlike_rooted drawtypes into main section.
paramat [Sun, 11 Mar 2018 23:41:22 +0000 (23:41 +0000)]
Lua_api.txt: Split long lines part 3
paramat [Fri, 9 Mar 2018 23:16:23 +0000 (23:16 +0000)]
Biome API: Add 'get_biome_name(biome_id)' API
Change name of default biome to a more suitable lowercase 'default'.
Loïc Blot [Sun, 11 Mar 2018 20:16:19 +0000 (21:16 +0100)]
Add Voxelarea unittests (#7121)
* Add voxelarea unittests
Loic Blot [Sun, 11 Mar 2018 17:22:11 +0000 (18:22 +0100)]
Android: typo fix since recent gradle update, as output path changed
Loic Blot [Sun, 11 Mar 2018 16:52:46 +0000 (17:52 +0100)]
Finally fix android build
Loic Blot [Sun, 11 Mar 2018 16:45:58 +0000 (17:45 +0100)]
Fix Android build, but there is a remaining linking issue in guiConfirmRegistration
* Also fix variable name overloading in guiConfirmRegistration
stujones11 [Wed, 6 Dec 2017 20:36:29 +0000 (20:36 +0000)]
Android build fixes for c++11
Loic Blot [Sun, 11 Mar 2018 15:52:53 +0000 (16:52 +0100)]
Android: update tools (gradle, NDK) & prepare to switch to clang
Vitaliy [Sat, 10 Mar 2018 18:33:37 +0000 (21:33 +0300)]
Drop texture file list cache (#6660)
SmallJoker [Sat, 10 Mar 2018 08:37:43 +0000 (09:37 +0100)]
Fix typo in lighting code since
bcdb3d5
paramat [Sat, 10 Mar 2018 04:26:38 +0000 (04:26 +0000)]
Lua_api.txt: Split long lines part 2
paramat [Wed, 7 Mar 2018 03:40:35 +0000 (03:40 +0000)]
Spawn level: Add 'get_spawn_level(x, z)' API
Returns a suitable player spawn y co-ordinate for unmodified terrain.
SmallJoker [Fri, 9 Mar 2018 23:24:57 +0000 (00:24 +0100)]
Formspecs: Unify textarea and field parsing functions, fix wrong fallback text
* textarea[], field[]: Unify function, fix wrong fallback text
* Remove apparently superflous mainmenumanager.h incldue
* intlGUIEditBox.cpp: make read-only boxes really read-only
* Use elseif (trivial)
Loic Blot [Fri, 9 Mar 2018 07:49:00 +0000 (08:49 +0100)]
VoxelArea: add_{x,y,z,p} must be static
Fix some documentations issues
Use getNodeNoCheck(v3s16, ...) in some cases instead of getNodeNoCheck(x, y, z, ...)
Loic Blot [Fri, 9 Mar 2018 07:36:42 +0000 (08:36 +0100)]
Drop unused struct ModLicenseInfo & ModAuthorInfo + default constructor in ModMetadata
Loic Blot [Fri, 9 Mar 2018 07:25:48 +0000 (08:25 +0100)]
ServerEnvironment & StaticObject cleanups
* isFreeServerActiveObjectId is now part of ServerEnvironment
* getFreeServerActiveObjectId is now part of ServerEnvironment
* StaticObject constructor now take ServerActiveObject instead of type + string. This permits to remove a big string copy in some code parts
Loic Blot [Thu, 8 Mar 2018 22:47:46 +0000 (23:47 +0100)]
Drop unused Server::m_ignore_map_edit_events_peer_id
Loic Blot [Thu, 8 Mar 2018 22:42:49 +0000 (23:42 +0100)]
Variable name fix + structure creation unrolling in lighting code
Loic Blot [Thu, 8 Mar 2018 21:58:43 +0000 (22:58 +0100)]
Drop less performant Server::setBlockNotSent for ClientInterface::markBlockposAsNotSent
paramat [Fri, 9 Mar 2018 04:18:53 +0000 (04:18 +0000)]
Lua_api.txt: Split long lines part 1
paramat [Sun, 4 Mar 2018 18:47:39 +0000 (18:47 +0000)]
Gennotify docs: Clarify returned positions for decorations
paramat [Wed, 7 Mar 2018 23:55:17 +0000 (23:55 +0000)]
Biomes: Document xyz biome limits
paramat [Sun, 4 Mar 2018 18:19:37 +0000 (18:19 +0000)]
Getv3intfield: Fix logic of return bool
paramat [Fri, 23 Feb 2018 08:54:03 +0000 (08:54 +0000)]
Biomes: Add 'min_pos'/'max_pos' xyz biome limits
'y_min' and 'y_max' are still accepted for compatibility.
Loic Blot [Thu, 8 Mar 2018 21:19:25 +0000 (22:19 +0100)]
Cleanup & bugfix
* ObjectRef::set_local_animation: fix wrong lua return (should push a boolean, currently returns nil)
* ObjectRef::set_eye_offset: fix wrong lua return (should push a boolean, currently returns nil)
* Fix various Server functions which depends on RemotePlayer objet and return true/false when player object is nil whereas it's a caller implementation error. Change those bool functions to void and add sanitize_check call instead. Current callers are always checking player object validity
* Optimize Server::setClouds : use CloudParams object ref instead of attribute deserialization from structure & perform RemotePlayer::setCloudParams directly in server class like many other calls
* Optimize Server::SendCloudParams: use CloudParams object ref instead of deserialized attributes
Loic Blot [Thu, 8 Mar 2018 21:06:48 +0000 (22:06 +0100)]
Cleanup: drop Server::hudGetHotbarSelectedImage()
Call directly accessible RemotePlayer::getHotbarSelectedImage() from server api
Loic Blot [Thu, 8 Mar 2018 21:05:47 +0000 (22:05 +0100)]
Cleanup: drop Server::hudGetHotbarImage()
Call directly accessible RemotePlayer::getHotbarImage() from server api & make it const ref
Loic Blot [Thu, 8 Mar 2018 21:03:45 +0000 (22:03 +0100)]
Cleanup: drop Server::hudGetHotbarItemcount()
Call directly accessible RemotePlayer::getHotbarItemcount() from server api
Loïc Blot [Thu, 8 Mar 2018 19:03:43 +0000 (20:03 +0100)]
mods.cpp/h: little performance improvement in getModsInPath (+ codestyle) (#7108)
* mods.cpp/h: little performance improvement in getModsInPath
pauloue [Mon, 5 Mar 2018 15:14:19 +0000 (10:14 -0500)]
Fix bad markdown in lua_api.txt
you [Sun, 4 Mar 2018 16:34:36 +0000 (17:34 +0100)]
Fix missing warningstream (or similar problem) (#7034)
Use the --color command line parameter instead of a setting for coloured logs
This fixes the missing warningstream bug, g_settings->get mustn't be used there.
Also, the decision about en- or disabling log colours fits better to the command line parameters than minetest settings.
Brian [Sun, 4 Mar 2018 16:34:09 +0000 (11:34 -0500)]
Allow for getting world name and path separately on the command line (#6555)
Change to --worldlist instead of --world list.
Gets rid of --worldpath parameter added as part of this pull request,
instead moving the listing function to a command --worldlist that
accepts either name, path, or both and prints out the corresponding
information.
paramat [Fri, 2 Mar 2018 21:27:59 +0000 (21:27 +0000)]
Gennotify: Add 'minetest.get_decoration_id' API
Returns the decoration ID for the provided decoration name string.
For use with gennotify, to know the decoration IDs for use in
'minetest.set_gen_notify'.
paramat [Fri, 2 Mar 2018 13:39:39 +0000 (13:39 +0000)]
Generate Notifier: Clear events once after all 'on generated' functions
Gael-de-Sailly [Wed, 28 Feb 2018 17:51:53 +0000 (18:51 +0100)]
MapgenValleys: Fixed submarine valleys shape