Commit Graph

8314 Commits

Author SHA1 Message Date
starling13
1db4ae96b1 util/hex.h: Reserve result space in hex_encode()
Reserve enough space for the result of hex_encode() to eliminate reallocations
2019-04-07 12:01:42 +02:00
ANAND
3deaa7cf57 Add deprecation warnings for ObjectRef:get/set_attribute (#8443) 2019-04-07 12:00:57 +02:00
Paramat
5b8363af00
Stabilise 'day night ratio' to fix object brightness flicker (#8417)
Previously, when basic shaders were enabled, the function
time_to_daynight_ratio() returned values jumping between 149 and 150
between times 4375 and 4625, and values jumping between 999 and 1000
between times 6125 and 6375, (and the corresponding times at sunset)
due to tiny float errors in the interpolation code.

This caused the light level returned by blend_light() to jump between
14 and 15, which became noticeable recently as those light levels were
given different visual brightnesses.

Add early returns to avoid the problematic interpolation, and to
avoid unnecessary running of the loop.
2019-04-04 23:30:10 +01:00
ANAND
d111865890 Change sign of pitch angle in debug menu (#8438)
Co-Authored-By: ClobberXD <ClobberXD@gmail.com>
2019-04-04 22:42:18 +01:00
rubenwardy
4f7674d448 Change pitch fly binding to 'P', add to change keys menu (#8314) 2019-04-03 21:37:30 +01:00
Loic Blot
a4677496f3 Fix comments 2019-03-31 20:49:39 +02:00
Loïc Blot
64bdd4b509 Create ServerThread earlier in the startup process 2019-03-31 20:49:39 +02:00
Loïc Blot
b55fc3d773 mapgen: drop mapgen id from child mapgens.
This id must be owned by the child mapgen and never be set to a misc value by a developer

Also use nullptr in some places
2019-03-31 20:49:39 +02:00
Loïc Blot
b3716a03a6 EmergeManager::initMapgens use FATAL_ERROR if and drop boolean return
We never handle the boolean return, also init twice is a coding error, not a runtime error
2019-03-31 20:49:39 +02:00
HybridDog
ab322fc5aa Use unordered_map instead of map for craft definitions (#8432) 2019-03-31 19:26:17 +02:00
DS
ad75dba87b Optimize core.after in a simple way (#8351) 2019-03-27 21:05:50 +01:00
Paramat
42e1a12714
Require 'waving = 3' in a nodedef to apply the liquid waving shader (#8418)
Makes the liquid waving shader per-nodedef like waving leaves/plants,
instead of being applied to all liquids.
Like the waving leaves/plants shaders, the liquid waving shader can
also be applied to meshes and nodeboxes.

Derived from a PR by t0ny2.
2019-03-27 00:18:43 +00:00
Paramat
5e7662ca16
Dungeons: Do not remove nodes that have 'is_ground_content = false' (#8423)
Like randomwalk caves, preserve nodes that have 'is_ground_content = false',
to avoid dungeons that generate out beyond the edge of a mapchunk destroying
nodes added by mods in 'register_on_generated()'.

Issue discovered by, and original PR by, argyle77.
2019-03-26 03:56:57 +00:00
rubenwardy
d0a1a29ab3
Prevent multi-line chat messages server-side (#8420) 2019-03-26 01:18:52 +00:00
Paramat
38ea0890ec
Document 'highly unstable' mapgens instead of 'stable' mapgens (#8404) 2019-03-20 04:37:33 +00:00
sfan5
5b99abb847 Fix texture rotation for wallmounted nodeboxes
fixes #8358
2019-03-19 22:36:51 +01:00
sfan5
426bdba7fb httpfetch: Disable IPv6 here too if requested by settings (#8399) 2019-03-18 15:06:27 +01:00
Paramat
c0fb5dd317 num_emerge_threads: Initialise value to cope with setting syntax error (#8396) 2019-03-18 11:19:53 +01:00
paramat
77cfc4fcd1 num_emerge_threads: Fix documentation of automatic selection 2019-03-17 22:27:36 +01:00
Wuzzy
9f1b98b997 Add newline before itemstring in item tooltip (#8213) 2019-03-17 13:55:02 +01:00
ANAND
d50feb89de core.after: Improve assertion message (#8388) 2019-03-17 10:25:47 +01:00
ANAND
7f1c2b8a00 Builtin: Add vector.angle(). Returns the angle between 2 vectors (#7738) 2019-03-17 02:05:03 +00:00
Paramat
eadcbe474a
Lua_api.txt: Document blockpos, coordinate conversion, map terminology (#8376)
Also fix and improve LVM 'calc_lighting()' warning.
2019-03-16 05:04:11 +00:00
Paramat
ee57b63008 num_emerge_threads: Warn of crashes when > 1 (#8357) 2019-03-14 13:49:33 +01:00
Loïc Blot
02a23892f9 LINT fixes since recent tooling update 2019-03-14 12:30:13 +01:00
Loïc Blot
a6a04c4b5b Update our tooling (Clang 5 -> 7, GCC 7 -> 8)
This change permits to use up-to-date compilers, clang-tidy and
clang-format

It also refactor the tidy/format step to drop the binary selection from
scripts and perform it directly in travis
2019-03-14 12:30:13 +01:00
Paramat
aafbdd442f
Valleys mapgen code rewrite (#8101)
Shorter, simpler, clearer and more consistent with other mapgens,
while preserving functionality.
Base terrain shape is unchanged.
With the 'vary river depth' option disabled, river surface level
is unchanged.
Behaviour of the 4 heat/humidity/river depth options is very
slightly changed due to bugfixes and code cleanup (the mapgen is
'unstable').
Apply heat and humidity gradients above water_level instead of
above y = 0.
2019-03-14 00:27:16 +00:00
Loïc Blot
e22a69d61a Drop GUIConfirmRegistration::m_address unused field 2019-03-12 16:53:21 +01:00
rubenwardy
38f6e7a198 Fix cast from const by accessing string data directly (#8354)
Fixes #8327
2019-03-12 08:58:02 +01:00
rubenwardy
1e3e4fb649 HPChange Reason: Fix push after free, and type being overwritten (#8359)
* HPChange Reason: Fix push after free, and type being overwritten

Fixes #8227 and #8344
2019-03-12 08:56:56 +01:00
rubenwardy
3b25b807f3
Fix serialization of std::time_t by casting to u64 first (#8353)
Fixes #8332
2019-03-10 18:53:02 +00:00
DS
77961aa73d Document the float special group (#8306) 2019-03-10 11:16:35 +01:00
Ragulan R
c8914664a3 Display pitch angle in debug menu (#8321) 2019-03-10 11:16:27 +01:00
Paramat
0b492f82f7
Confirm registration GUI: Remove positional strings to fix Windows bug (#8258)
Positional strings don't work on some Windows builds.
Remove server address string, leave player name string present.
2019-03-10 01:49:03 +00:00
HybridDog
431d8a9b83 Abort when trying to set a not registered node (#7011)
I removed the MapNode constructor which takes a nodename and gives the node's id or CONTENT_IGNORE
The code which used this constructor (two places) now handles the situation of not registered nodes correctly:
* minetest.set_node and similar functions make minetest crash when a not registered node is passed
* reverting a node with rollback aborts if the node is not registered
2019-03-07 08:31:25 +01:00
HybridDog
3066d76e33 World config: Make depends easier to read (#7396)
* Do not always show every depends textfieds

When there are no dependencies, it does not longer show an empty list.

* Adjust the list height to avoid a scrollbar when possible

* change minimum height and no dependencies message

* Do not get depends for modpacks
2019-03-07 08:23:03 +01:00
Jozef Behran
bb35d06225 Optimize string handling in path search (#8098)
Use "append" method to construct the various game paths
instead of wasteful string concatenation. Additionally, use a
temporary to extract and reuse a result of a few common
subexpressions to further reduce the overhead.
2019-03-07 08:20:33 +01:00
Jozef Behran
007c8440d7 Optimize interaction distance checker (#8193)
The "what" parameter is being passed by value, most likely by
accident as the type is "const std::string". Convert it to a
reference by adding the missing "&".
2019-03-07 08:19:13 +01:00
sfan5
557afdc429 Update a few dependency versions for buildbot (#8319) 2019-03-07 08:17:01 +01:00
rubenwardy
ac86d04784 Fix detach inventory serialisation (#8331) 2019-03-07 07:41:21 +01:00
rubenwardy
82c6363559
Fix incorrect string length check after cast 2019-03-06 22:24:39 +00:00
rubenwardy
c735497a65 Fix clang tidy error due to incorrect use of quotes for character 2019-03-06 14:41:37 +00:00
Paramat
1c87d57e1d
Change 'num_emerge_threads' default to 1 (#8303) 2019-03-05 22:58:38 +00:00
HybridDog
a7c5dc50e5 Add math.factorial (#8298) 2019-03-05 10:11:21 +01:00
Loic Blot
250420e566
Add Android keystore to the repository
Password is not included :)
2019-03-05 08:35:15 +01:00
DS
60ab2d94f0 Add sounds for falling and attached nodes (#7719)
* Add sounds for falling and attached nodes

The sound specified in `node_definition.sounds.fall` is used.
When a falling node is spawned at a position or an attached node drops, the sound is played at this position.

* allow all sorts of soundspecs
2019-03-05 08:17:48 +01:00
HybridDog
ee698770b9 Fix --color command line parameter ignorance (#7173)
* Fix color command line parameter ignorance

* coloured log: Support detecting the tty on windows

* Print an error message when setting something invalid as color mode instead of silently using mode never

* Revert "coloured log: Support detecting the tty on windows"

This reverts commit 4c9fc6366487ac0e6799e181796ca594797bb6f8.
It didn't work for travis and belongs to a separate PR

* Allow adjusting the log color with an environment variable

If --color is not passed to minetest,  is used to decide on the log colorization.
Minetest settings can not be used instead of an environment variable because logs may appear before loading them.

* fix empty if body
2019-03-05 08:14:33 +01:00
Benjamin Lindley
e19565c170 Replace for loop with call to standard library function (#8194)
This loop makes multiple passes over m_stack (type std::list) in order to remove all elements with a specified value. Replacing the loop with a call to std::list::remove does the same job, but in only one pass.
2019-03-05 08:13:15 +01:00
rubenwardy
5d2624ab82 Hide uninstall package button on unmodifiable paths (#8255) 2019-03-05 08:12:58 +01:00
sofar
b5defcffba Add referer to remote media requests. (#8135)
This sends the following header to a remote media server:

    Referer: minetest://<server_name>:port

This was verified with CTF and the Minetest Public Remove Media
server. If the servername was a plain IPv6 address it will
contain `:` characters and will be encapsulated in `[]` to
be a valid URI.
2019-03-05 08:12:02 +01:00