]> git.lizzy.rs Git - minetest.git/log
minetest.git
6 years agoZoom adjustDist(): Improve variable name (#7208)
Paramat [Thu, 5 Apr 2018 19:15:38 +0000 (20:15 +0100)]
Zoom adjustDist(): Improve variable name (#7208)

6 years agoBiome API / cavegen: Add definable cave liquid for a biome (#7192)
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.

6 years ago[clang-tidy] Promote some performance-* as a coding error (#7194)
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

6 years agoHuge LBM lookup performance improvement on mapblock loading (#7195)
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

6 years agoFix 5 issues reported by PVS studio
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.

6 years agoFix last performance-type-promotion-in-math-fn problems
Loic Blot [Wed, 4 Apr 2018 05:42:40 +0000 (07:42 +0200)]
Fix last performance-type-promotion-in-math-fn problems

6 years agoOptimize a little bit isBlockInSight, adjustDist & collisions (#7193)
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

6 years agoFix last clang-tidy reported problems for performance-type-promotion-in-math-fn
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

6 years agoFix more clang-tidy reported problems for performance-type-promotion-in-math-fn
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

6 years agoFix various clang-tidy reported performance-type-promotion-in-math-fn
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

6 years agoSelected ItemStack: Reduce black magic (#6520)
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

6 years agoOptimize entity-entity collision (#6587)
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

6 years agoFix many issues reported by clang-tidy (#7189)
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

6 years ago'fix' LINT, use InventoryLocation==
SmallJoker [Sun, 1 Apr 2018 20:50:26 +0000 (22:50 +0200)]
'fix' LINT, use InventoryLocation==

6 years agoRun callback in IDropAction, refactor function arguments
SmallJoker [Sat, 31 Mar 2018 11:47:19 +0000 (13:47 +0200)]
Run callback in IDropAction, refactor function arguments

6 years agoAdd player inventory callbacks
SmallJoker [Sat, 31 Mar 2018 10:30:43 +0000 (12:30 +0200)]
Add player inventory callbacks

6 years agoFormspecs: Use mouse wheel to pick up and deposit single items
you [Mon, 2 Apr 2018 14:52:07 +0000 (16:52 +0200)]
Formspecs: Use mouse wheel to pick up and deposit single items

6 years agoLINT: add clang-tidy step (#6295)
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

6 years agoObjectRef: Add add_velocity() (#3208)
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

6 years agoevent.h: Fix import GCC warning caused by ce87310
SmallJoker [Sat, 31 Mar 2018 12:33:54 +0000 (14:33 +0200)]
event.h: Fix import GCC warning caused by ce87310

6 years agoClient eventmanager refactor (#7179)
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

6 years agoMgcarpathian: Mapgen loop optimisations. fabs() -> std::fabs()
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().

6 years agocore.rotate_node: Do not trigger after_place_node (#6900)
SmallJoker [Thu, 29 Mar 2018 19:44:13 +0000 (21:44 +0200)]
core.rotate_node: Do not trigger after_place_node (#6900)

6 years agoSound: fix static initialization order dependency by not having one (#7168)
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

6 years agoOptional alpha channel support for entities
stujones11 [Sun, 18 Mar 2018 17:25:05 +0000 (17:25 +0000)]
Optional alpha channel support for entities

6 years agoFix a warning introduced by c5b4e541749c50805519ce040d98a0a8e5e0ec03
Loic Blot [Thu, 29 Mar 2018 11:41:48 +0000 (13:41 +0200)]
Fix a warning introduced by c5b4e541749c50805519ce040d98a0a8e5e0ec03

6 years agoFix a warning reported by clang
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;

6 years agoFix various Client class functions not marked as override (virtual)
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

6 years agoLoad dependencies and description from mod.conf
Andrew Ward [Wed, 28 Mar 2018 21:14:16 +0000 (22:14 +0100)]
Load dependencies and description from mod.conf

6 years agoAdd reasons to on_dieplayer and on_hpchange
Andrew Ward [Wed, 28 Mar 2018 15:05:18 +0000 (16:05 +0100)]
Add reasons to on_dieplayer and on_hpchange

6 years agoAdd formspec theming using prepended strings
Andrew Ward [Wed, 28 Mar 2018 15:04:41 +0000 (16:04 +0100)]
Add formspec theming using prepended strings

6 years agoUpdate jsoncpp to 1.8.4 (#7172)
Loïc Blot [Mon, 26 Mar 2018 15:44:54 +0000 (17:44 +0200)]
Update jsoncpp to 1.8.4 (#7172)

6 years agoGuard sound manager initialization with "enable_sound" (#7167)
nOOb3167 [Mon, 26 Mar 2018 15:44:40 +0000 (17:44 +0200)]
Guard sound manager initialization with "enable_sound" (#7167)

6 years agomacOS: don't require X11 libraries during compilation (#7149)
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

6 years agoMapgen: Remove unused mgv7 code and some unused biometypes
Paramat [Mon, 26 Mar 2018 03:59:49 +0000 (04:59 +0100)]
Mapgen: Remove unused mgv7 code and some unused biometypes

6 years agoMake sounds stop playing when entering game or mainmenu
nOOb3167 [Sat, 24 Mar 2018 15:05:26 +0000 (16:05 +0100)]
Make sounds stop playing when entering game or mainmenu

6 years agoCleanup sound manager class (#7158)
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

6 years agoPrint the mod loading time (#7137)
you [Fri, 23 Mar 2018 23:31:33 +0000 (00:31 +0100)]
Print the mod loading time (#7137)

* Print the mod loading time

6 years agoFix some gcc 7.3 reported warnings
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(); }
```

6 years agoGlobal initialization of sound using SoundManagerGlobal (#7063)
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

6 years agoUpdate mesh collector and move it to a separate file (#6904)
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

6 years agoGitlab CI: Disable currently broken ubuntu 16.10 & 17.04 builds
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

6 years agoLua_api.txt: Improve noise documentation
Paramat [Thu, 22 Mar 2018 02:36:52 +0000 (02:36 +0000)]
Lua_api.txt: Improve noise documentation

6 years agoMinetest ASCII art: Move from actionstream to rawstream
paramat [Sat, 17 Mar 2018 22:05:21 +0000 (22:05 +0000)]
Minetest ASCII art: Move from actionstream to rawstream

6 years agoMgfractal / chunksize: Improve documentation
paramat [Tue, 20 Mar 2018 02:30:25 +0000 (02:30 +0000)]
Mgfractal / chunksize: Improve documentation

6 years agoLua_api.txt: Fix hardware colouring 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.

6 years agoAdd src/unittest/test_world/world.mt to gitignore
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

6 years agoAdd missing file to android build
Loic Blot [Sat, 17 Mar 2018 11:13:37 +0000 (12:13 +0100)]
Add missing file to android build

6 years agoFix node-nodebox lighting difference in direct sunlight (#7061)
Vitaliy [Sat, 17 Mar 2018 09:10:16 +0000 (12:10 +0300)]
Fix node-nodebox lighting difference in direct sunlight (#7061)

6 years ago.gitignore: ignore more files (android, unittests)
Loic Blot [Sat, 17 Mar 2018 08:21:49 +0000 (09:21 +0100)]
.gitignore: ignore more files (android, unittests)

6 years agoLua_api.txt: Split long lines part 6
paramat [Sat, 17 Mar 2018 05:00:37 +0000 (05:00 +0000)]
Lua_api.txt: Split long lines part 6

6 years agoFix a crash or random memory leak when reseting saved environment variable in test_se...
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

6 years agoDrop Server::m_enable_rollback_recording it's only used in server constructor
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

6 years agoServerEnvironment::loadDefaultMeta: Loading default meta is only possible for ServerE...
Loic Blot [Fri, 16 Mar 2018 07:52:42 +0000 (08:52 +0100)]
ServerEnvironment::loadDefaultMeta: Loading default meta is only possible for ServerEnv itself

6 years agoForgot to remove obsolete Server::m_mods
Loic Blot [Fri, 16 Mar 2018 07:44:57 +0000 (08:44 +0100)]
Forgot to remove obsolete Server::m_mods

6 years agoServer: delegate mod management & config to ServerModConfiguration (#7131)
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

6 years agoFix an alone if to be with a missing else
Loic Blot [Fri, 16 Mar 2018 07:40:09 +0000 (08:40 +0100)]
Fix an alone if to be with a missing else

6 years agoLua_api.txt: Split long lines part 5, fix hardware colouring docs
paramat [Fri, 16 Mar 2018 02:47:35 +0000 (02:47 +0000)]
Lua_api.txt: Split long lines part 5, fix hardware colouring docs

6 years agoBiomes: Fix vertical biome blend
paramat [Thu, 15 Mar 2018 04:29:09 +0000 (04:29 +0000)]
Biomes: Fix vertical biome blend

6 years agoREADME: Fix Fedora dependencies (#7133)
pauloue [Thu, 15 Mar 2018 16:49:16 +0000 (12:49 -0400)]
README: Fix Fedora dependencies (#7133)

6 years agoLua_api.txt: Split long lines part 4
paramat [Wed, 14 Mar 2018 04:12:18 +0000 (04:12 +0000)]
Lua_api.txt: Split long lines part 4

6 years agoRename 'subgame' to 'game'
paramat [Tue, 13 Mar 2018 01:59:01 +0000 (01:59 +0000)]
Rename 'subgame' to 'game'

6 years agoLua_api.txt: Improve and complete drawtype documentation
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.

6 years agoLua_api.txt: Split long lines part 3
paramat [Sun, 11 Mar 2018 23:41:22 +0000 (23:41 +0000)]
Lua_api.txt: Split long lines part 3

6 years agoBiome API: Add 'get_biome_name(biome_id)' API
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'.

6 years agoAdd Voxelarea unittests (#7121)
Loïc Blot [Sun, 11 Mar 2018 20:16:19 +0000 (21:16 +0100)]
Add Voxelarea unittests (#7121)

* Add voxelarea unittests

6 years agoAndroid: typo fix since recent gradle update, as output path changed
Loic Blot [Sun, 11 Mar 2018 17:22:11 +0000 (18:22 +0100)]
Android: typo fix since recent gradle update, as output path changed

6 years agoFinally fix android build
Loic Blot [Sun, 11 Mar 2018 16:52:46 +0000 (17:52 +0100)]
Finally fix android build

6 years agoFix Android build, but there is a remaining linking issue in guiConfirmRegistration
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

6 years agoAndroid build fixes for c++11
stujones11 [Wed, 6 Dec 2017 20:36:29 +0000 (20:36 +0000)]
Android build fixes for c++11

6 years agoAndroid: update tools (gradle, NDK) & prepare to switch to clang
Loic Blot [Sun, 11 Mar 2018 15:52:53 +0000 (16:52 +0100)]
Android: update tools (gradle, NDK) & prepare to switch to clang

6 years agoDrop texture file list cache (#6660)
Vitaliy [Sat, 10 Mar 2018 18:33:37 +0000 (21:33 +0300)]
Drop texture file list cache (#6660)

6 years agoFix typo in lighting code since bcdb3d5
SmallJoker [Sat, 10 Mar 2018 08:37:43 +0000 (09:37 +0100)]
Fix typo in lighting code since bcdb3d5

6 years agoLua_api.txt: Split long lines part 2
paramat [Sat, 10 Mar 2018 04:26:38 +0000 (04:26 +0000)]
Lua_api.txt: Split long lines part 2

6 years agoSpawn level: Add 'get_spawn_level(x, z)' API
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.

6 years agoFormspecs: Unify textarea and field parsing functions, fix wrong fallback text
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)

6 years agoVoxelArea: add_{x,y,z,p} must be static
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, ...)

6 years agoDrop unused struct ModLicenseInfo & ModAuthorInfo + default constructor in ModMetadata
Loic Blot [Fri, 9 Mar 2018 07:36:42 +0000 (08:36 +0100)]
Drop unused struct ModLicenseInfo & ModAuthorInfo + default constructor in ModMetadata

6 years agoServerEnvironment & StaticObject cleanups
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

6 years agoDrop unused Server::m_ignore_map_edit_events_peer_id
Loic Blot [Thu, 8 Mar 2018 22:47:46 +0000 (23:47 +0100)]
Drop unused Server::m_ignore_map_edit_events_peer_id

6 years agoVariable name fix + structure creation unrolling in lighting code
Loic Blot [Thu, 8 Mar 2018 22:42:49 +0000 (23:42 +0100)]
Variable name fix + structure creation unrolling in lighting code

6 years agoDrop less performant Server::setBlockNotSent for ClientInterface::markBlockposAsNotSent
Loic Blot [Thu, 8 Mar 2018 21:58:43 +0000 (22:58 +0100)]
Drop less performant Server::setBlockNotSent for ClientInterface::markBlockposAsNotSent

6 years agoLua_api.txt: Split long lines part 1
paramat [Fri, 9 Mar 2018 04:18:53 +0000 (04:18 +0000)]
Lua_api.txt: Split long lines part 1

6 years agoGennotify docs: Clarify returned positions for decorations
paramat [Sun, 4 Mar 2018 18:47:39 +0000 (18:47 +0000)]
Gennotify docs: Clarify returned positions for decorations

6 years agoBiomes: Document xyz biome limits
paramat [Wed, 7 Mar 2018 23:55:17 +0000 (23:55 +0000)]
Biomes: Document xyz biome limits

6 years agoGetv3intfield: Fix logic of return bool
paramat [Sun, 4 Mar 2018 18:19:37 +0000 (18:19 +0000)]
Getv3intfield: Fix logic of return bool

6 years agoBiomes: Add 'min_pos'/'max_pos' xyz biome limits
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.

6 years agoCleanup & bugfix
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

6 years agoCleanup: drop Server::hudGetHotbarSelectedImage()
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

6 years agoCleanup: drop Server::hudGetHotbarImage()
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

6 years agoCleanup: drop Server::hudGetHotbarItemcount()
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

6 years agomods.cpp/h: little performance improvement in getModsInPath (+ codestyle) (#7108)
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

6 years agoFix bad markdown in lua_api.txt
pauloue [Mon, 5 Mar 2018 15:14:19 +0000 (10:14 -0500)]
Fix bad markdown in lua_api.txt

6 years agoFix missing warningstream (or similar problem) (#7034)
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.

6 years agoAllow for getting world name and path separately on the command line (#6555)
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.

6 years agoGennotify: Add 'minetest.get_decoration_id' API
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'.

6 years agoGenerate Notifier: Clear events once after all 'on generated' functions
paramat [Fri, 2 Mar 2018 13:39:39 +0000 (13:39 +0000)]
Generate Notifier: Clear events once after all 'on generated' functions

6 years agoMapgenValleys: Fixed submarine valleys shape
Gael-de-Sailly [Wed, 28 Feb 2018 17:51:53 +0000 (18:51 +0100)]
MapgenValleys: Fixed submarine valleys shape

6 years agoc_converter: Function template for numeric fields, add v3s16 default (#7090)
SmallJoker [Sat, 3 Mar 2018 09:59:43 +0000 (10:59 +0100)]
c_converter: Function template for numeric fields, add v3s16 default (#7090)

6 years agoSlippery: Simplify, make more efficient (#7086)
SmallJoker [Sat, 3 Mar 2018 09:59:14 +0000 (10:59 +0100)]
Slippery: Simplify, make more efficient (#7086)

Use already existing collision results for the nearest colliding node
Fix slippery effect in free_move mode