oweals/minetest.git
7 years agoServer list cleanup
ShadowNinja [Thu, 15 Oct 2015 17:04:15 +0000 (13:04 -0400)]
Server list cleanup

This removes the hacky server_dedicated pseudo-setting.

7 years agoShow itemstring as tooltip if no item description
Wuzzy [Fri, 24 Feb 2017 03:17:14 +0000 (04:17 +0100)]
Show itemstring as tooltip if no item description

7 years agoTOGGLE_CHAT keymap should togglechat not HUD
Loic Blot [Sat, 18 Mar 2017 09:00:04 +0000 (10:00 +0100)]
TOGGLE_CHAT keymap should togglechat not HUD

Fixes #5413

7 years agoReduce memory & function cost of Game class functions (#5406)
Loïc Blot [Fri, 17 Mar 2017 21:15:25 +0000 (22:15 +0100)]
Reduce memory & function cost of Game class functions (#5406)

GameRunData is passed on many game functions, or one of its attributes whereas it's a member of the class. Remove it from functions arguments and call object directly from concerned functions.
This will reduce a little bit the Game class loop usage & very little bit the memory usage (due to non creation of pointer/references)

7 years agoavoid crashing when accessing mapgen early (#5384)
zeuner [Fri, 17 Mar 2017 20:28:43 +0000 (21:28 +0100)]
avoid crashing when accessing mapgen early (#5384)

7 years agoGive CSM access to use `core.colorize()` (#5113)
red-001 [Fri, 17 Mar 2017 18:20:13 +0000 (18:20 +0000)]
Give CSM access to use `core.colorize()` (#5113)

7 years ago[CSM] Fix minimap problems (#5405)
Loïc Blot [Fri, 17 Mar 2017 06:54:49 +0000 (07:54 +0100)]
[CSM] Fix minimap problems (#5405)

This fixes issue #5404

7 years ago[CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)
Loïc Blot [Fri, 17 Mar 2017 06:48:29 +0000 (07:48 +0100)]
[CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)

* [CSM] Add core.get_timeofday & core.get_day_count env calls

* [CSM] Add core.get_node_level, core.get_node_max_level, core.find_node_near

7 years agoFix indentation problem since merge resolution
Loïc Blot [Thu, 16 Mar 2017 10:09:06 +0000 (11:09 +0100)]
Fix indentation problem since merge resolution

Github merge conflict resolution is not the best with indent

7 years ago[CSM] Add minimap API modifiers (#5399)
Loïc Blot [Thu, 16 Mar 2017 09:34:54 +0000 (10:34 +0100)]
[CSM] Add minimap API modifiers (#5399)

* Rename Mapper (too generic) to Minimap
* Add lua functions to get/set position, angle, mode for minimap
* Client: rename m_mapper to m_minimap
* Add minimap to core.ui namespace (core.ui.minimap)
* Add various functions to manage minimap (show, hide, toggle_shape)
* Cleanup trivial declaration in client

7 years agoAdd ModStorageAPI to client side modding (#5396)
Loïc Blot [Thu, 16 Mar 2017 06:53:39 +0000 (07:53 +0100)]
Add ModStorageAPI to client side modding (#5396)

mod storage is located into user_path / client / mod_storage

7 years agoGet biome list: Downgrade missing biome message to infostream
paramat [Mon, 13 Mar 2017 13:34:32 +0000 (13:34 +0000)]
Get biome list: Downgrade missing biome message to infostream

It is harmless for a biome listed in an ore or decoration registration
to be missing.
Now that we are registering certain biomes or not based on options
(such as floatland biomes), the biome lists in ore and decoration
registrations trigger these error messages, avoiding these error
messages would need a large amount of duplication of ore and decoration
registrations.

7 years agoSneak: Fix various problems with sneaking
sfan5 [Wed, 1 Mar 2017 19:10:30 +0000 (20:10 +0100)]
Sneak: Fix various problems with sneaking

Sneaking won't actually hover you in the air, releasing shift guarantees not
falling down (same as in MC).
Sneak-jump no longer goes higher than a normal jump (^ was required for this).
Sneaking no longer avoids fall damage.
You can sneak on partial nodes (slabs, sideways slabs) correctly.
Sneaking doesn't "go out" as far anymore (0.29 instead of 0.4).
Can't jump when sneaking out as far as possible (breaks the sneak ladder).

7 years agolua_api: Document minetest.features (#5311)
SmallJoker [Wed, 15 Mar 2017 21:07:19 +0000 (22:07 +0100)]
lua_api: Document minetest.features (#5311)

7 years agoUse true distance for block priority.
Lars Hofhansl [Sun, 12 Mar 2017 04:50:14 +0000 (20:50 -0800)]
Use true distance for block priority.

7 years agoFix undefined references (#5400)
Wayward One [Wed, 15 Mar 2017 14:42:47 +0000 (10:42 -0400)]
Fix undefined references (#5400)

7 years agoFix two nul deref if digging unknown nodes. (#5398)
Auke Kok [Wed, 15 Mar 2017 07:04:53 +0000 (00:04 -0700)]
Fix two nul deref if digging unknown nodes. (#5398)

Introduced by d785456b3fa35faf47cb972fde9e8668382c5e22 (#5162)

7 years agoAdd disclaimer to client_lua_api.txt (#5391)
rubenwardy [Tue, 14 Mar 2017 06:51:07 +0000 (06:51 +0000)]
Add disclaimer to client_lua_api.txt (#5391)

7 years agoAdd `get_wielded_item`
red-001 [Tue, 31 Jan 2017 13:18:52 +0000 (13:18 +0000)]
Add `get_wielded_item`

7 years ago[CSM] Add enable_client_modding param (default: false)
nerzhul [Mon, 13 Mar 2017 14:55:30 +0000 (15:55 +0100)]
[CSM] Add enable_client_modding param (default: false)

7 years ago[CSM] Add `on_punchnode` callback
red-001 [Sun, 29 Jan 2017 18:28:38 +0000 (18:28 +0000)]
[CSM] Add `on_punchnode` callback

7 years ago[CSM] Add `get_node` and `get_node_or_nil`
red-001 [Mon, 30 Jan 2017 19:10:37 +0000 (19:10 +0000)]
[CSM] Add `get_node` and `get_node_or_nil`

7 years ago[CSM] Add `on_dignode` callback (#5140)
red-001 [Sun, 29 Jan 2017 17:43:44 +0000 (17:43 +0000)]
[CSM] Add `on_dignode` callback (#5140)

7 years ago[CSM] storage + fixes
Loic Blot [Sat, 28 Jan 2017 17:31:23 +0000 (18:31 +0100)]
[CSM] storage + fixes

7 years ago[CSM] Improve security for client-sided mods (#5100)
red-001 [Sat, 28 Jan 2017 16:24:25 +0000 (16:24 +0000)]
[CSM] Improve security for client-sided mods (#5100)

7 years ago[CSM] implement client side mod loading (#5123)
Loïc Blot [Fri, 27 Jan 2017 06:41:10 +0000 (07:41 +0100)]
[CSM] implement client side mod loading (#5123)

* client side mods are located in clientmods/
* move builtin/preview.lua to clientmods/preview/init.lua as a preview mod
* refactor ModConfiguration class to work properly with client and server using child objects
* move some Server constructor mod load code to ModConfiguration to reduce code duplication between client and server
* remove mods.{cpp,h} unused functions
* use UNORDERED_SET instead of std::set in some modspec storages

7 years ago[CSM] Add local formspecs. (#5094)
red-001 [Tue, 24 Jan 2017 16:26:15 +0000 (16:26 +0000)]
[CSM] Add local formspecs. (#5094)

7 years ago[CSM] sound_play & sound_stop support + client_lua_api doc (#5096)
Loïc Blot [Sun, 22 Jan 2017 10:17:41 +0000 (11:17 +0100)]
[CSM] sound_play & sound_stop support + client_lua_api doc (#5096)

* squashed: CSM: Implement register_globalstep
  * Re-use fatal error mechanism from server to disconnect client on CSM error
  * Little client functions cleanups

* squashed: CSM: add core.after function
  * core.after is shared code between client & server
  * ModApiUtil get_us_time feature enabled for client

7 years ago[CSM] Add client-sided chat commands (#5092)
red-001 [Sun, 22 Jan 2017 08:05:09 +0000 (08:05 +0000)]
[CSM] Add client-sided chat commands (#5092)

7 years ago[CSM] Add on_death, on_hp_modification & oh_damage_taken callbacks (#5093)
Loïc Blot [Sat, 21 Jan 2017 23:20:55 +0000 (00:20 +0100)]
[CSM] Add on_death, on_hp_modification & oh_damage_taken callbacks (#5093)

* Add on_death callback
* Add on_hp_modification & on_damage_taken callbacks
* move preview code to preview.lua

7 years ago[CSM] Add method that display chat to client-sided lua. (#5089) (#5091)
red-001 [Sat, 21 Jan 2017 21:44:37 +0000 (21:44 +0000)]
[CSM] Add method that display chat to client-sided lua. (#5089) (#5091)

* squashed: [Client-sided scripting] Don't register functions that don't work. (#5091)

7 years ago[CSM] Client side modding
Loic Blot [Sat, 21 Jan 2017 14:02:08 +0000 (15:02 +0100)]
[CSM] Client side modding

* rename GameScripting to ServerScripting
* Make getBuiltinLuaPath static serverside
* Add on_shutdown callback
* Add on_receiving_chat_message & on_sending_chat_message callbacks
* ScriptApiBase: use IGameDef instead of Server
  This permits to share common attribute between client & server
* Enable mod security in client side modding without conditions

7 years agoGUI: Allow texture packs to customize the progress bar (#5368)
kilbith [Mon, 13 Mar 2017 07:07:14 +0000 (08:07 +0100)]
GUI: Allow texture packs to customize the progress bar (#5368)

7 years agoSave metainfo for falling nodes
Vladislav Tsendrovskii [Fri, 17 Feb 2017 01:48:48 +0000 (04:48 +0300)]
Save metainfo for falling nodes

7 years agoEnable server side occlusion culling by default.
Lars Hofhansl [Fri, 3 Mar 2017 20:40:50 +0000 (12:40 -0800)]
Enable server side occlusion culling by default.

7 years agoAllow server side occlusion culling.
Lars Hofhansl [Tue, 28 Feb 2017 07:06:15 +0000 (23:06 -0800)]
Allow server side occlusion culling.

7 years agoDo not increase breath if at full breath.
Auke Kok [Sat, 11 Mar 2017 07:37:30 +0000 (23:37 -0800)]
Do not increase breath if at full breath.

Prevents the server from sending TOCLIENT_BREATH packets
every 0.5seconds, if there is no reason to.

7 years agodatabase-redis: Support password authentication
sfan5 [Sat, 11 Mar 2017 20:39:32 +0000 (21:39 +0100)]
database-redis: Support password authentication

7 years agoClimb speed: Increase default setting from 2 to 3
paramat [Mon, 6 Mar 2017 08:35:13 +0000 (08:35 +0000)]
Climb speed: Increase default setting from 2 to 3

7 years agoMinimap: Optimise
number Zero [Thu, 23 Feb 2017 13:04:39 +0000 (16:04 +0300)]
Minimap: Optimise

7 years agoLight calculation: New bulk node lighting code
Dániel Juhász [Sat, 10 Dec 2016 18:02:44 +0000 (19:02 +0100)]
Light calculation: New bulk node lighting code

This commit introduces a new bulk node lighting algorithm to minimize
lighting bugs during l-system tree generation, schematic placement and
non-mapgen-object lua voxelmanip light calculation.

If the block above the changed area is not loaded, it gets loaded to avoid
lighting bugs.
Light is updated as soon as write_to_map is called on a voxel manipulator,
therefore update_map does nothing.

7 years agoOptimize item.lua
tenplus1 [Thu, 23 Feb 2017 19:03:18 +0000 (20:03 +0100)]
Optimize item.lua
Replace slow ItemStack get_definitions with registered_nodes one's and cached playername as it's used multiple times.  Also removed local item = itemstack:peek_item() as it is never used.

7 years agoGUI: Convert loading screen's progress bar to image (#5362)
kilbith [Fri, 10 Mar 2017 12:26:24 +0000 (13:26 +0100)]
GUI: Convert loading screen's progress bar to image (#5362)

7 years agoCI: Add memleak checking using valgrind (#5350)
Loïc Blot [Mon, 6 Mar 2017 19:34:02 +0000 (20:34 +0100)]
CI: Add memleak checking using valgrind (#5350)

Add a new step to check memleaks on our current unit tests suite

7 years agoUpdate .appdata and .desktop files
Juhani Numminen [Tue, 17 Jan 2017 15:26:21 +0000 (17:26 +0200)]
Update .appdata and .desktop files

7 years agoDungeons: Use 'block' instead of 'brick' for nodebox stairs
paramat [Sat, 4 Mar 2017 05:10:10 +0000 (05:10 +0000)]
Dungeons: Use 'block' instead of 'brick' for nodebox stairs

Affects only sandstone dungeons. Nodebox stairs made from
'sandstone_block' look better because every step is undivided.

7 years agoFont: attempt fallback font, abort if no fonts found.
Auke Kok [Sat, 18 Feb 2017 19:40:37 +0000 (11:40 -0800)]
Font: attempt fallback font, abort if no fonts found.

If you happen to have a font_path setting that is incorrect,
minetest will just attempt to start the gui without a valid
font which leads to a segfault later on.

We can attempt to load the fallback font path fairly easy,
but if that fails we should give up with a proper error message
and not a weird segfault later. This forces an abort() if
the fallback fails as well, and prints a useful error
message to the console.

7 years agoREADME.txt: Clarify loading of minetest.conf
Fixer [Thu, 16 Feb 2017 21:11:08 +0000 (23:11 +0200)]
README.txt: Clarify loading of minetest.conf

7 years agoAdd minetest.spawn_falling_node(pos) (#5339)
zaoqi [Sat, 4 Mar 2017 17:36:37 +0000 (01:36 +0800)]
Add minetest.spawn_falling_node(pos) (#5339)

* Add minetest.spawn_falling_node(pos)

* lua_api.txt: Add minetest.spawn_falling_node(pos)

* Update minetest.spawn_falling_node(pos)

7 years agoFormSpec: Add position and anchor elements (#5284)
adelcoding1 [Sat, 4 Mar 2017 09:46:55 +0000 (10:46 +0100)]
FormSpec: Add position and anchor elements (#5284)

7 years agoFixed spelling mistakes (#5312)
Bond-009 [Mon, 27 Feb 2017 12:22:49 +0000 (13:22 +0100)]
Fixed spelling mistakes (#5312)

7 years agoDungeongen: Add and improve parameters
paramat [Tue, 21 Feb 2017 01:56:34 +0000 (01:56 +0000)]
Dungeongen: Add and improve parameters

Add:
Bool for 'only_in_ground'.
Min and max corridor length.
Min and max room size with X, Y, Z components.
Min and max large room size with X, Y, Z components.

'only_in_ground = false' allows core mapgens to create structures
in air and water using dungeongen.
Corridor length parameters replace a fixed random range.
Room size parameters replace the former system where one parameter
'roomsize' was added to fixed random ranges.

All parameters are set for no change to current dungeon behaviour.

Remove some now-redundant and long-unused code.

7 years agoFix crash that can be caused by the shutdown command. (#5292)
red-001 [Sat, 25 Feb 2017 08:28:25 +0000 (08:28 +0000)]
Fix crash that can be caused by the shutdown command. (#5292)

7 years agoFix wrong meta key in item meta on ItemStack construction
rubenwardy [Sun, 19 Feb 2017 20:57:46 +0000 (20:57 +0000)]
Fix wrong meta key in item meta on ItemStack construction

7 years agoFix the documentation for `minetest.is_yes` (#5276)
red-001 [Sun, 19 Feb 2017 16:11:53 +0000 (16:11 +0000)]
Fix the documentation for `minetest.is_yes` (#5276)

7 years agoFixes for colorwallmounted and colorfacedir nodes
Dániel Juhász [Sat, 18 Feb 2017 19:26:19 +0000 (20:26 +0100)]
Fixes for colorwallmounted and colorfacedir nodes

Correct node placement prediction for attached colorwallmounted nodes.
Correct placement direction for colorfacedir and colorwallmounted nodes.
Correct detatch mechanism for attached colorwallmounted nodes.

7 years agoVoxelmanip: Do not emerge or blit to blocks over map gen limit
paramat [Fri, 17 Feb 2017 15:50:51 +0000 (15:50 +0000)]
Voxelmanip: Do not emerge or blit to blocks over map gen limit

Placing a structure that extends into mapblocks that extend past
map_gen_limit causes a crash. For example a sapling growing at the
world edge which adds leaves beyond the edge, or placing a structure
using the lua voxelmanip, or placing a schematic or l-system tree.

Do not run the 'load_if_inexistent' block of code if the mapblock
is over limit, this also marks the mapblock with the flag
VMANIP_BLOCK_DATA_INEXIST which later prevents blitting back those
mapblocks.

This fix therefore uses existing functionality by having the same
effect as the 'load_if_inexistent' bool being false.

7 years agoMultiplayer menu: fix attempt to open nonexistant image
kilbith [Fri, 17 Feb 2017 04:14:49 +0000 (20:14 -0800)]
Multiplayer menu: fix attempt to open nonexistant image

Since local servers and local favorites have no ping value (these
are only provided by the server) we shouldn't load a broken
image filename.

Fixes #5238

7 years agoStatbars.lua: Cache enable_damage setting
tenplus1 [Fri, 10 Feb 2017 17:40:57 +0000 (17:40 +0000)]
Statbars.lua: Cache enable_damage setting

7 years agoFix not being able to damage players in minimal (#5266)
red-001 [Sat, 18 Feb 2017 14:36:29 +0000 (14:36 +0000)]
Fix not being able to damage players in minimal (#5266)

7 years agoUse the `ARRLEN` macro in more places and remove an unused macro. (#5260)
red-001 [Sat, 18 Feb 2017 14:24:49 +0000 (14:24 +0000)]
Use the `ARRLEN` macro in more places and remove an unused macro. (#5260)

7 years agoAdd support for the new arguments of `request_shutdown` to the `/shutdown` chatcomman...
red-001 [Sat, 18 Feb 2017 11:16:11 +0000 (11:16 +0000)]
Add support for the new arguments of `request_shutdown` to the `/shutdown` chatcommand. (#5252)

7 years agoRevert part of eb49009d023e6e3b5d59a97b8fb5fed5eee83296 (#5230)
Auke Kok [Tue, 14 Feb 2017 23:01:25 +0000 (15:01 -0800)]
Revert part of eb49009d023e6e3b5d59a97b8fb5fed5eee83296 (#5230)

This reverts the removal of Droid Sans as fallback font. The
license for this font used to be GPL2. I've updated the font
files to Liberation 2.00, which are SIL, and do not require
us to ship source code.

I've attempted to fix all the attribution and license strings,
and used the strings as provided by redhat for attribution
to make sure they're correct.

Last, I've removed a bunch of executable bits on files that do
not need them.

Fixes #5231

7 years agoCavegen: Place correct biome surface in tunnel entrances
paramat [Wed, 15 Feb 2017 00:14:11 +0000 (00:14 +0000)]
Cavegen: Place correct biome surface in tunnel entrances

Previously in tunnel entrance floors only a single biome 'top' node was
placed and 'filler' nodes were missing.

Place 'top' and 'filler' nodes in tunnel entrance floors with depths
defined by the biome.
In tunnel entrances under rivers 'riverbed' nodes are placed to the
biome-defined depth.

7 years agoObjectpos over limit: Avoid crash caused by sector over limit
paramat [Mon, 13 Feb 2017 04:37:25 +0000 (04:37 +0000)]
Objectpos over limit: Avoid crash caused by sector over limit

Reduce the object limit by mapblock size, to avoid objects being
added just inside the map generation limit but in a block and sector
that extend beyond the map generation limit.

Change notification of 'objectpos over limit' from red in-chat ERROR
to in-terminal only WARNING, since this will happen often using mob
mods near the world's edge.

7 years agoFix a small regression caused by e2ad76f.
red-001 [Wed, 15 Feb 2017 19:14:31 +0000 (19:14 +0000)]
Fix a small regression caused by e2ad76f.

7 years agoFix >5 year old PlayerSAO deletion bug
sfan5 [Wed, 15 Feb 2017 16:36:47 +0000 (17:36 +0100)]
Fix >5 year old PlayerSAO deletion bug

force_delete=true is usually set at shutdown in order to
also remove PlayerSAOs, however when too many objects
per block are detected force_delete is also set to true.
This was intended only for the current loop iteration but
obviously persisted to the next iterations thereby
deleting all other remaining SAOs.

7 years agoFreeType: address font license issues (#5230)
Auke Kok [Tue, 14 Feb 2017 09:08:17 +0000 (01:08 -0800)]
FreeType: address font license issues (#5230)

It appears we were shipping font files without license text, and I
had my doubts about the bitmap fonts being usable directly.

This replaces existing TTF fonts with Apache-2.0 licensed fonts from
chome core (Cousine, Arimo, Tinos). Include the full license file
for all three fonts.

The Lucida Sans font bitmap is removed entirely for non-freetype
builds. There is therefore only mono fonts for non-freetype builds.

7 years agoLighting: Update lighting at block loading
Dániel Juhász [Thu, 27 Oct 2016 21:25:44 +0000 (23:25 +0200)]
Lighting: Update lighting at block loading

This commit updates mapblocks' light if necessary when they are loaded.
This removes ghost lighting.

7 years agoMainmenu: Brighter text colours for readability
Hybrid Dog [Sat, 11 Feb 2017 10:39:41 +0000 (11:39 +0100)]
Mainmenu: Brighter text colours for readability

7 years agoFootsteps: Fix offset footstep and shallow water sound bugs
paramat [Thu, 9 Feb 2017 21:12:53 +0000 (21:12 +0000)]
Footsteps: Fix offset footstep and shallow water sound bugs

Fix footstep sounds coming from nodes to either side when walking on a
1 node wide row of nodebox slabs such as default:snow.
Fix sand footsteps when swimming in 1 node deep water.

Use a new function 'getFootstepNodePos()' instead of 'getStandingNodePos()'
to avoid using a horizontally-offset 'sneak node' for sounds.

Sound is selected from the node BS * 0.05 below the player's feet, so
that 1/16th slabs will play the slab sound but 1/32nd slabs will not.
If the player is not 'touching ground' the node detection position is
changed to BS * 0.5 below to preserve footstep sounds when landing after
a jump or fall.

7 years agoPlantlike: Fix visual_scale being applied squared
paramat [Fri, 10 Feb 2017 17:15:22 +0000 (17:15 +0000)]
Plantlike: Fix visual_scale being applied squared

This re-applies 2 commits that were reverted.

Visual_scale was applied twice to plantlike by accident sometime between
2011 and 2013, squaring the requested scale value. Visual_scale is
correctly applied once in it's other uses in signlike and torchlike.

Two lines of code are removed, they also had no effect for the vast
majority of nodes with the default visual_scale of 1.0.
The texture continues to have it's base at ground level.

Send sqrt(visual_scale) to old clients.

Keep compatibility with protocol < 30 clients now that visual_scale
is no longer applied twice to plantlike drawtype and mods are being
updated to a new value.

7 years agoUse tree to list mods rather than textlist
rubenwardy [Tue, 27 Dec 2016 23:26:36 +0000 (23:26 +0000)]
Use tree to list mods rather than textlist

7 years agoRevert "Plantlike: Fix visual_scale being applied squared (#5115)"
Craig Robbins [Fri, 10 Feb 2017 12:21:49 +0000 (22:21 +1000)]
Revert "Plantlike: Fix visual_scale being applied squared (#5115)"

This reverts commit 953cbb3b15997a0e7c7c32af2365cb5046a9e476.

7 years agoRevert "Plantlike visual scale: Send sqrt(visual_scale) to old clients"
Craig Robbins [Fri, 10 Feb 2017 12:21:23 +0000 (22:21 +1000)]
Revert "Plantlike visual scale: Send sqrt(visual_scale) to old clients"

This reverts commit cdc538e0a242167cd7031d40670d2d4464b87f2c.

7 years agoAdd textures for air and ignore items (#5196)
Wuzzy [Fri, 10 Feb 2017 07:19:31 +0000 (08:19 +0100)]
Add textures for air and ignore items (#5196)

7 years agoCorrect lua_api.txt docs related to meta (#5198)
rubenwardy [Fri, 10 Feb 2017 06:59:38 +0000 (06:59 +0000)]
Correct lua_api.txt docs related to meta (#5198)

7 years agoChange default nodetimer_interval to 0.2s. (#5193)
Auke Kok [Thu, 9 Feb 2017 07:00:37 +0000 (23:00 -0800)]
Change default nodetimer_interval to 0.2s. (#5193)

We want to reduce the chance that we get lots and lots of node
timers all happening once a second, because we're better off doing
small bits of work as they are available.

Reducing this to 0.2 seconds will greatly reduce the total amount
of nodetimers that elapse at the same instance, while not effecting
total work load. This results in a far better chance of the server
keeping up with work loads.

7 years agoPerform mesh animation only once per frame.
Lars Hofhansl [Sun, 5 Feb 2017 00:35:54 +0000 (16:35 -0800)]
Perform mesh animation only once per frame.

7 years agoOpenAL sound: Use a simpler distance model
paramat [Tue, 24 Jan 2017 10:16:56 +0000 (10:16 +0000)]
OpenAL sound: Use a simpler distance model

In createPlayingSoundAt(), AL_ROLLOFF_FACTOR is not set, so it has
the default value of 1.0, this makes the equation of the currently
used AL_EXPONENT_DISTANCE distance model identical to the equation
of the simpler AL_INVERSE_DISTANCE distance model.

Using AL_INVERSE_DISTANCE means an exponent is not processed,
exponents are quite intensive to process.
There is no change in sound attenuation behaviour.

The commented-out AL_ROLLOFF_FACTOR value is removed as it would
now have a different effect if used.

7 years agoNo longer auto-generate a 'guest####' player name when name is empty
red-001 [Sat, 21 Jan 2017 10:44:24 +0000 (10:44 +0000)]
No longer auto-generate a 'guest####' player name when name is empty

You can't join most servers with a 'guest####' player name anyway so
it's only logical to remove them.

7 years agoFix android build
Loic Blot [Wed, 8 Feb 2017 06:47:56 +0000 (07:47 +0100)]
Fix android build
This fixes #5190

7 years agoAdd ModMetadata API (#5131)
Loïc Blot [Tue, 7 Feb 2017 23:15:55 +0000 (00:15 +0100)]
Add ModMetadata API (#5131)

* mod can create a ModMetadata object where store its values and retrieve it.
* Modmetadata object can only be fetched at mod loading
* Save when modified using same time as map interval or at server stop
* add helper function to get mod storage path
* ModMetadata has exactly same calls than all every other Metadata

7 years agoFix incompatibility of ItemStack.to_table() introduced by stack meta 5182/head
rubenwardy [Sun, 5 Feb 2017 18:15:46 +0000 (18:15 +0000)]
Fix incompatibility of ItemStack.to_table() introduced by stack meta

7 years agoFace shading: Add shade factor comments
paramat [Mon, 6 Feb 2017 21:48:54 +0000 (21:48 +0000)]
Face shading: Add shade factor comments

7 years agoAdd support for unix socket connection to redis (#5179)
Travis Burtrum [Mon, 6 Feb 2017 18:10:03 +0000 (13:10 -0500)]
Add support for unix socket connection to redis (#5179)

7 years agoPrevent SIGFPE on entity tile loading issue. (#5178)
Auke Kok [Mon, 6 Feb 2017 07:59:18 +0000 (23:59 -0800)]
Prevent SIGFPE on entity tile loading issue. (#5178)

While experimenting with entities I ran into this unresolvable
error where the server is sending some texture that the client
crashes on. The crash prevents the client from ever reconnecting,
resulting in a server that has to use clearobjects.

We shouldn't crash but just ignore the object and move on.

```
0x00000000004dc0de in TextureSource::generateImagePart (this=this@entry=0x7118eb0, part_of_name="[applyfiltersformesh",
    baseimg=@0x7fffffffbe98: 0x9f1b010) at /home/sofar/git/minetest/src/client/tile.cpp:1744
    1744 u32 xscale = scaleto / dim.Width;
    (gdb) bt
    #0  0x00000000004dc0de in TextureSource::generateImagePart (this=this@entry=0x7118eb0, part_of_name="[applyfiltersformesh",
        baseimg=@0x7fffffffbe98: 0x9f1b010) at /home/sofar/git/minetest/src/client/tile.cpp:1744
```

After reconnecting, the client now can connect without issues
and displays an error message:

```
ERROR[Main]: generateImagePart(): Illegal 0 dimension for part_of_name="[applyfiltersformesh", cancelling.
ERROR[Main]: generateImage(): Failed to generate "[applyfiltersformesh"
ERROR[Main]: Irrlicht: Invalid size of image for OpenGL Texture.
```

7 years agoImprove mesh shading (#5172)
numberZero [Sun, 5 Feb 2017 09:27:58 +0000 (13:27 +0400)]
Improve mesh shading (#5172)

7 years agoAdd per-stack descriptions using ItemStack Metadata 5154/head
rubenwardy [Fri, 3 Feb 2017 22:28:09 +0000 (22:28 +0000)]
Add per-stack descriptions using ItemStack Metadata

7 years agoAdd ItemStack key-value meta storage
rubenwardy [Tue, 31 Jan 2017 19:49:01 +0000 (19:49 +0000)]
Add ItemStack key-value meta storage

7 years agoDerive NodeMetaRef from MetaDataRef
rubenwardy [Tue, 31 Jan 2017 16:43:45 +0000 (16:43 +0000)]
Derive NodeMetaRef from MetaDataRef

7 years agoMake NodeMetaRef::getmeta a non-static member
rubenwardy [Tue, 31 Jan 2017 16:18:45 +0000 (16:18 +0000)]
Make NodeMetaRef::getmeta a non-static member

7 years agoDerive NodeMetadata from Metadata
rubenwardy [Tue, 31 Jan 2017 14:45:28 +0000 (14:45 +0000)]
Derive NodeMetadata from Metadata

7 years agoFix PlayerSAO deletion warning (0eede97af2927dcda3545192403b0a44f30bcd1f)
sfan5 [Sat, 4 Feb 2017 12:31:21 +0000 (13:31 +0100)]
Fix PlayerSAO deletion warning (0eede97af2927dcda3545192403b0a44f30bcd1f)

7 years agoMgv6: Add fallback node for gravel
paramat [Sat, 4 Feb 2017 06:03:04 +0000 (06:03 +0000)]
Mgv6: Add fallback node for gravel

Gravel now falls back to stone.
Gravel is not a particularly fundamental node, allowing it to fall back
to stone frees up subgames from having to include a gravel node.
Non-blob-ore gravel is only present in mgv6 as extremely rare 'gravel
biomes'.

7 years agoMgv6: Add stairs to desert stone dungeons
paramat [Sat, 4 Feb 2017 04:28:02 +0000 (04:28 +0000)]
Mgv6: Add stairs to desert stone dungeons

As with the other mapgens, now that wide stairs in dungeons are
possible we can now finally add stairs to desert stone dungeons.
Re-order some lines.

7 years agoMapgenBasic node resolver: Various fixes
paramat [Sat, 4 Feb 2017 04:04:03 +0000 (04:04 +0000)]
MapgenBasic node resolver: Various fixes

Add a fallback node for stair_desert_stone to avoid ignore placed
in Minimal subgame desert dungeons.
Don't allow river_water_source to fallback to water_source as river
water needs to be non-renewable and have a short flow range.
Make stair_sandstonebrick fall back to sandstonebrick instead of
sandstone.

Re-order some lines.
Add a comment.

7 years agoServerlist: Add ping indicators (#5164)
kilbith [Fri, 3 Feb 2017 13:53:43 +0000 (14:53 +0100)]
Serverlist: Add ping indicators (#5164)

7 years agoTell on_punch to expect a return value
Duane Robertson [Tue, 31 Jan 2017 04:37:04 +0000 (22:37 -0600)]
Tell on_punch to expect a return value

The return value should be interpreted as a boolean saying whether
the lua on_punch function handled damage or the system needs to.

7 years agoMgvalleys: Fix missing decorations and incorrect function order
paramat [Mon, 30 Jan 2017 18:06:17 +0000 (18:06 +0000)]
Mgvalleys: Fix missing decorations and incorrect function order

Fix missing decorations at horizontal chunk borders by adding
'updateHeightmap()' after terrain generation.

Swap order of 'calculateNoise' and 'calcBiomeNoise' because
'calculateNoise' modifies the heat and humidity maps created in
'calcBiomeNoise'.

Remove confusing comment, code block is not just for mods and
seems essential for correct mapgen behaviour.