Commit Graph

7253 Commits

Author SHA1 Message Date
SmallJoker
c08cc0533f Inventory: Fix wrong stack size behaviour and item loss (#6039)
Also fix itemFits and remove constness-nonsense
2017-06-25 11:39:39 +02:00
paramat
cad10ce3b7 Mgv7: Clean up divide-by-zero fix 2017-06-25 05:01:50 +01:00
paramat
90ed6fc732 Ores: Make 'absheight' flag non-functional
The 'absheight' flag was added years ago for the floatlands of 'indev'
mapgen (now deleted). The feature mirrored all ore placement around y = 0
to place ores in floatlands.

In MTG we now use dedicated ore registrations for floatlands.

The feature is crude, inflexible, problematic and very rarely used, it
also makes ore vertical range code more complex.
Minetest 0.5 is a good chance to remove the feature.

The flag itself remains to not break flag values.
2017-06-25 05:01:42 +01:00
Dániel Juhász
5a41a98ff6 Helper methods for hardware colorization (#5870) 2017-06-24 20:15:09 +02:00
Dániel Juhász
c2df1a0835 Emit liquid sound if the player walks in liquid (#6040) 2017-06-24 20:15:00 +02:00
Vincent Glize
9da5fb1583 C++11 cleanup on constructors guiEngine (#6036)
* C++11 cleanup on constructors guiEngine
2017-06-24 13:41:30 +02:00
Loic Blot
8a84e89922
Game::showOverlayMessage: securise function
Do wgettext call directly in the function instead of caller, as we destroy wstd inside it
2017-06-24 11:43:17 +02:00
paramat
34e8e0e5ce Mgv7: Avoid divide-by-zero errors
Some settings of paramters can cause mgv7 variables to be -inf, nan or -nan.
This can cause massive vertical columns of water to appear above sea level.
2017-06-24 01:48:29 +01:00
paramat
9a77397fbf Mgvalleys: Use existing 'lava_max_height' value in CavesRandomWalk
Now that lava depth in large caves is variable we can use the already
present 'lava_max_height' value to set the lava depth in them.
2017-06-24 01:48:20 +01:00
Wuzzy
08f57e1e38 Show param1 and param2 in debug screen (#6031)
* Show param1 and param2 in debug screen

* Add units and some formatting to debug screen

* Minor refactor of param1/param2 debug display
2017-06-23 13:31:01 +02:00
Loïc Blot
8dd548c0b4 LINT fix 2017-06-22 13:20:20 +02:00
red-001
8b9f40d12f Fix CSM crash caused by move to C++11. (#6027) 2017-06-22 13:18:58 +02:00
paramat
2652d8db19 CavesRandomWalk: Make 'lava_depth' a mapgen parameter
As with 'large_cave_depth', lava depth was previously a fixed y value and
therefore incompatible with the ability to shift terrain vertically.

Add 'lava_depth' mapgen parameter to mgflat, mgfractal, mgv5, mgv7.
2017-06-22 03:14:56 +01:00
Gael-de-Sailly
bc53c82bcf Add minetest.rgba function that returns ColorString from RGBA or RGB values 2017-06-22 03:11:50 +01:00
Loïc Blot
1425c6def1 Cpp11 initializers: last src root changeset (#6022)
* Cpp11 initializers: last src root changeset

Finish to migrate all src root folder files to C++11 constructor initializers
2017-06-21 11:51:29 +02:00
Dániel Juhász
12aad731ad Fix render order of overlays (#6008)
* Fix render order of overlays

* Use C++11 loops

* Fix time_t
2017-06-21 10:47:31 +02:00
Vincent Glize
8daf5b5338 C++11 cleanup on constructors dir network (#6021)
* C++11 cleanup on constructors dir network
2017-06-21 08:28:57 +02:00
Vincent Glize
af3badf7a9 C++11 cleanup on constructors dir client (#6012)
* C++11 cleanup on constructors dir client
2017-06-21 08:04:45 +02:00
Ezhh
76074ad81a Fix console resize issue when maximising game window (#6023) 2017-06-21 07:50:57 +02:00
paramat
b8237099b2 Mgv5/v7/fractal: Add 'large_cave_depth' parameter to replace fixed value
The value cannot be fixed because we can shift terrain vertically.
This also makes these mapgens consistent with mgflat and mgvalleys which
have 'large_cave_depth' parameters.
2017-06-21 01:58:04 +01:00
Jesse McDonald
e6a9e6066a Inventory: Make addItem for empty ItemStacks respect max stack size
When adding items to an empty ItemStack, limit the number of items taken
based on the maximum stack size in the item description.
Likewise, when checking whether items will fit into an empty ItemStack,
only absorb as many items as are allowed in a single stack and return the rest.
2017-06-21 01:53:57 +01:00
Loïc Blot
16938adfc0 Merge cguittfont lib in irrlicht change folder. (#6016)
* Merge cguittfont lib in irrlicht change folder.

This remove hack and static lib for FreeType
2017-06-20 17:18:34 +02:00
Zeno-
318106223f Fix console not being properly resized after window size changed (#6020) 2017-06-20 12:36:58 +02:00
Dániel Juhász
0fcaf9fb1b Automatic item and node colorization (#5640)
* Automatic item and node colorization

Now nodes with a palette yield colored item stacks, and colored items
place colored nodes by default. The client predicts the colorization.

* Backwards compatibility

* Use nil

* Style fixes

* Fix code style

* Document changes
2017-06-20 11:19:56 +02:00
Loïc Blot
7c07cb4ec2 Add new travis required configuration for trusty 2017-06-20 09:39:20 +02:00
Loic Blot
b2977e7691
Fix 1 more warning reported by GCC
We don't write in correct buffer size in analyze_block
2017-06-20 00:19:29 +02:00
Loic Blot
b32f36bf34
Fix 2 warnings reported by GCC
* ClientEnvironment::m_irr is not used anymore since a recent cleanup
* l_vmanip constructor ordering
2017-06-20 00:04:18 +02:00
Vincent Glize
4a5e8ad343 C++11 cleanup on constructors (#6000)
* C++11 cleanup on constructors dir script
2017-06-19 23:54:58 +02:00
Loïc Blot
4a78949083 Remove IrrlichtDevice unused pointer from ClientActiveObject class & childs (#6010) 2017-06-19 16:49:34 +02:00
SmallJoker
6eb03c135f find_nodes_in_area: Extend maximal count to U32_MAX (#5277)
Extend documentation, limit area volume
Remove u16 count limitation

* Prevent integer overflow, replace minp/maxp with pos1/pos2
2017-06-19 16:30:26 +02:00
Loïc Blot
071736ba3f hud.h: add missing false default state on use_hotbar_selected_image 2017-06-19 15:41:33 +02:00
Loïc Blot
53acc32bee hud.cpp: fix wrong indent in drawItem 2017-06-19 15:20:30 +02:00
Loïc Blot
4dcc5985df Verify HudSetParams input when hotbar textures are set (#6013)
* Verify HudSetParams input when hotbar textures are set

This fix #6011
2017-06-19 14:10:30 +02:00
paramat
0c429bd164 Mgv7: Do not limit river generation if no floatlands
Previously, the carving of rivers was disabled above 'shadow_limit' even if
floatlands were disabled. This caused rivers to be unnecessarily disabled if
mapgen was customised to have surface level above y = 1024.
2017-06-19 02:20:14 +01:00
paramat
ea4d407082 Mgv7 spawn search: Cope with extreme custom terrain and biome 'dust'
Previously, maximum spawn level was set to 'water_level + 16'. This would result
in spawn search failing if terrain had been customised to be much higher than
'water_level' at all points.

Also raise spawn level by 1 node to avoid spawning half-buried in a biome 'dust'
node such as 'default:snowblock'.
2017-06-19 02:20:04 +01:00
Loic Blot
8f2e60a961
Client::makeScreenshot: remove device param
We already have the device param as class member
2017-06-19 00:00:55 +02:00
Loïc Blot
4faaadc8d5 Cpp11 patchset 11: continue working on constructor style migration (#6004) 2017-06-18 19:55:15 +02:00
Loïc Blot
8f7785771b Cpp11 initializers 2 (#5999)
* C++11 patchset 10: continue cleanup on constructors

* Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop)

* More classes cleanup

* More classes cleanup + change NULL tests to boolean tests
2017-06-17 19:11:28 +02:00
Loïc Blot
76be103a91 C++11 patchset 9: move hardcoded init parameters to class definitions (part 1) (#5984)
* C++11 patchset 9: move hardcoded init parameters to class definitions

C++11 introduced the possibility to define the default values directly in class definitions, do it on current code

Also remove some unused attributes

* CollisionInfo::bouncy
* collisionMoveResult::collides_xy
* collisionMoveResult::standing_on_unloaded
* Clouds::speed

* More constructor cleanups + some variables removal

* remove only write guiFormSpecMenu::m_old_tooltip
* move header included inside defintions in genericobject.h
* remove some unused since years exception classes
* remove unused & empty debug_stacks_init
* remove unused & empty content_nodemeta_serialize_legacy
* remove forgotten useless bool (bouncy) in collision.cpp code
2017-06-16 11:25:52 +02:00
Rui
49d6e5f4ab Fix deserialization of ItemDefinition (#5995) 2017-06-16 07:17:30 +02:00
paramat
212945c7a3 Mgv6 mudflow: Also check for 'ignore' nodes
Previously, when removing decorations we searched upwards and removed until we
found air or water. However, the node above the decoration can be 'ignore' if
a stacked decoration extends into the volume above the mapchunk. The result
could be a problematic column of air placed in the volume of 'ignore'. The
unnecessary placing of air also slows the function.

Add a check for 'ignore' nodes when removing decorations.
2017-06-16 02:17:25 +01:00
Ezhh
2ab09bb486 Improve chatcommand params consistency (#5985)
* Fix and improve params consistency

* Move parenthesis requirement to descriptions
2017-06-15 22:38:41 +02:00
paramat
f55816f93a Mgv6 mudflow: Avoid partially removed stacked decorations
Recently we started to remove decorations if the dirt below was flowed away,
but this did not check for stacked decorations, causing them to have only
their lowest node removed.
Also, placed mud could partially bury stacked decorations.

Remove 'old_is_water' bool which on testing is never true.
Add new function 'moveMud()' to reduce indentation.
Remove stacked decoration nodes above a removed decoration.
Remove stacked decorations partially buried in placed mud.
2017-06-15 00:38:08 +01:00
Rui
bbe3dd9a7a Fix no sound bug (#5968) 2017-06-14 17:21:08 +02:00
Loïc Blot
ddcd026344 Remove legacy content_abm.{cpp,h} 2017-06-14 16:23:08 +02:00
sfan5
4783ff956b Update list of installed files concerning server and non-RUN_IN_PLACE builds (#5976)
* mods/mods_here.txt should be present on servers
* client/serverlist/ can be omitted for RUN_IN_PLACE=0
* clientmods/ is not used on servers
2017-06-14 08:04:39 +02:00
Rui
683ab3a154 Fix the serialization error by ff73c7a (#5964) 2017-06-11 21:20:50 +02:00
Loïc Blot
65819f3b9f Use thread_local instead from some static settings (#5955)
thread_local permits to limit variable lifetime to thread duration. Use it on each setting place which uses static to cache variable result only for thread lifetime. This permits to keep the same performance level & reconfigure server from MT gui in those various variables places.

Add thread_local to undersampling calculation too.
2017-06-11 13:58:43 +02:00
Rui
ff73c7a5da Sound: Add pitch option (#5960)
* Sound: Add pitch option
2017-06-11 13:58:26 +02:00
Loïc Blot
03ff53e16b Remove minetestmapper from this repository (#5901)
It's now located at https://github.com/minetest/minetestmapper

Remove colors.txt and sectors2sqlite too
2017-06-11 12:49:30 +02:00