Paramat [Sun, 15 Apr 2018 20:56:05 +0000 (21:56 +0100)]
FOV: Raise lower limit to avoid zoom-loading of distant world (#7234)
In the client, raise lower limit from 30 to 45 degrees, to avoid server
seeing this as a zoom and loading world beyond the server-set limit.
Add minimum in settingtypes.txt and enforce lower limit when set using
minetest.conf.
In the server, distrust the client-sent FOV if below the heuristic zoom
threshold and use the player object property 'zoom_fov' to check it, to
protect against hacked clients.
Muhammad Rifqi Priyo Susanto [Tue, 10 Apr 2018 20:55:17 +0000 (03:55 +0700)]
Android: Replace movement buttons with joystick (#7126)
* Android: Replace movement buttons with joystick
Replace movement control buttons (arrows at bottom left screen) with virtual joystick.
Joystick has 8 directions (same as keyboard). Basically, just map it to keyboard input.
Joystick applies only on left 1/3 of screen.
Joystick's position can be fixed by enabling fixed_virtual_joystick setting.
Three new images:
(1) placeholder joystick,
(2) joystick container (background), and
(3) joystick cursor.
Remove unused images: movement control buttons (*_arrow.png).
New data type: touch_gui_joystick_move_id
Joystick's fixed position is spaced one button size from bottom and from left of screen.
Remove unused variable: m_joystick_downlocation
sfan5 [Mon, 9 Apr 2018 14:25:57 +0000 (16:25 +0200)]
Fix segfault caused by wrong wgettext()
minduser00 [Tue, 27 Mar 2018 11:49:47 +0000 (11:49 +0000)]
Fix for translating empty strings
Fix for incorrect translation of empty strings
In the key change menu, when a button key not have name an empty string is passed to gettext.
The empty string is reserved for gettext to return de header of the .po file an this is shoved in the button
SmallJoker [Mon, 9 Apr 2018 12:58:35 +0000 (14:58 +0200)]
upright_sprite: Fix texture position for players
Fixes #6471
Paramat [Mon, 9 Apr 2018 01:23:47 +0000 (02:23 +0100)]
Sun colour: Undo colour change. Remove double assignment (#7227)
Commit
5070ca2111dd5b3f333a942059ef2c592de8dc24 changed sun colour by
fixing what seemed to be a code mistake.
Return to the standard colour but comment-out the first assignment of the
double-assignment for performance.
Add a comment to explain.
Paramat [Sat, 7 Apr 2018 21:09:54 +0000 (22:09 +0100)]
Biome API / dungeons: Add biome-defined dungeon nodes
Add new biome fields 'node_dungeon', 'node_dungeon_alt', 'node_dungeon_stair'.
If 'node_dungeon' is not defined dungeons fall back to classic behaviour.
Remove messy and imprecise dungeon material code from 'generateBiomes()'.
Code deciding dungeon materials is now in 'generateDungeons()' and uses the
biome at mapchunk centre for more precision.
Remove hardcoded 'MG_STONE' types as long intended.
Vitaliy [Fri, 6 Apr 2018 14:33:43 +0000 (17:33 +0300)]
Fix SAOM (#7200)
* Bugfix
rubenwardy [Fri, 6 Apr 2018 08:52:29 +0000 (09:52 +0100)]
Add player:get_meta(), deprecate player attributes (#7202)
* Add player:get_meta(), deprecate player attributes
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