oweals/minetest.git
8 years agoSet EXAMPLE_CONF_DIR to DOCDIR if DOCDIR gets customized
est31 [Wed, 16 Mar 2016 12:21:34 +0000 (13:21 +0100)]
Set EXAMPLE_CONF_DIR to DOCDIR if DOCDIR gets customized

Before, customisation of DOCDIR did not lead to
changes of the EXAMPLE_CONF_DIR default value.
This was inconsistent with expected behaviour
if you didn't know of the existence of the
EXAMPLE_CONF_DIR variable. The confusion is
very strong, as (for not in place builds) both
DOCDIR and EXAMPLE_CONF_DIR share the same
default value, it is unexpected that setting
CUSTOM_DOCDIR changes the location of all
documentation files but one.

The best meaning of EXAMPLE_CONF_DIR is to
further allow customization of the mt.conf.example
storage place, but otherwise keep defaulting to
whatever DOCDIR is set to, at least for not in
place builds. This patch implements that
behaviour.

Fixes #3863.

8 years agoRemove chat escape sequences from chat messages, for future colored chat.
Ekdohibs [Tue, 15 Mar 2016 12:34:27 +0000 (13:34 +0100)]
Remove chat escape sequences from chat messages, for future colored chat.

8 years agoAdd option to not send pre v25 init packet 3855/head
est31 [Mon, 14 Mar 2016 09:18:29 +0000 (10:18 +0100)]
Add option to not send pre v25 init packet

The legacy init packet (pre v25) sends information about the client's
password that a server could use to log in to other servers if the
username and password are the same. All the other benefits of SRP of
protocol v25 are missed if the legacy init packet is still sent during
connection creation.

This patch adds an option to not send the v25 init packet. Not sending
the v25 packet means breaking compat with pre v25 servers, but as the
option is not enabled by default, no servers are affected unless the
user explicitly flips the switch. More than 90% of the servers on the
serverlist support post v25 protocols.

The patch also fixes a bug with greying out of non compliant servers
being done wrongly, the min and max params were mixed.

8 years agoFix two reconnect bugs
est31 [Tue, 15 Mar 2016 07:55:45 +0000 (08:55 +0100)]
Fix two reconnect bugs

Fix two bugs related to the reconnect feature
introduced by commit

3b50b2766aeb09c9fc0ad0ea07426bb2187df3d7 "Optional reconnect functionality"

1. Set the password to the stored one

Before, we have done the reconnect attempt with a
cleared password, so using the feature would only
work if you had an empty password.
Thanks to @orwell96 for reporting the bug.

2. Reset the reconnect_requested flag after its use

the_game only writes to the reconect_requested flag
if it sets it to true. It never sets it to false.
If the flag is not reset after its use, all "reset"s
to the main menu will look like the server had
requested a reconnect.

8 years agoMuch better API for auth.{cpp, h}
est31 [Wed, 9 Mar 2016 02:12:22 +0000 (03:12 +0100)]
Much better API for auth.{cpp, h}

* No function overloading
* Adhere coding style and with method names following
  lowercase_underscore_style
* Use std::string in external API, handling these is
  much more fun

8 years agoMapgen: Fix light in tunnels at mapchunk borders
paramat [Sun, 13 Mar 2016 07:56:27 +0000 (07:56 +0000)]
Mapgen: Fix light in tunnels at mapchunk borders

Don't excavate the overgenerated stone at node_max.Y + 1,
this creates a 'roof' over the tunnel, preventing light in
tunnels at mapchunk borders when generating mapchunks upwards.

8 years agoFix player teleportation bug whilst sneaking
HybridDog [Mon, 4 Jan 2016 16:21:33 +0000 (17:21 +0100)]
Fix player teleportation bug whilst sneaking

Only set back position when sneaking if player wasn't teleported by adding and using a bool "got_teleported" to player
it fixes #2876

8 years agoConnected nodes: fix 2 minor bugs
Auke Kok [Sun, 13 Mar 2016 21:25:54 +0000 (14:25 -0700)]
Connected nodes: fix 2 minor bugs

1. Copy-paste error: properly test for back-connection.

In the case of two different connected nodebox types, we want to
assure that if A connects to B, that B also connects to A. This test
was accidentally not implemented correctly.

2. Clear the connects_to_ids before deserializing.

With each new connected node, the deserialization code added more
and more targets to the map, since the map wasn't cleared in between
deserialization steps. This caused e.g. wall blocks to connect to
things in the fence connects_to map.

8 years agoResend blocks when modified while sending to client
Jeija [Mon, 15 Feb 2016 15:05:40 +0000 (16:05 +0100)]
Resend blocks when modified while sending to client

8 years agoAdd options for screenshot format and quality
Diego Martinez [Mon, 7 Mar 2016 22:09:07 +0000 (19:09 -0300)]
Add options for screenshot format and quality

8 years agoAllow nodes to specify which sides to connect to.
Auke Kok [Fri, 4 Mar 2016 07:18:04 +0000 (23:18 -0800)]
Allow nodes to specify which sides to connect to.

NDT_CONNECTED attempts to connect to any side of nodes that it can
connect to, which is troublesome for FACEDIR type nodes that generally
may only have one usable face, and can be rotated.

We introduce a node parameter `connect_sides` that is valid for
any node type. If specified, it lists faces of the node (in "top",
"bottom", "front", "left", "back", "right", form, as array) that
connecting nodeboxes can connect to. "front" corresponds to the south
facing side of a node with facedir = 0.

If the node is rotatable using *simple* FACEDIR, then the attached
face is properly rotated before checking. This allows e.g. a chest
to be attached to only from the rear side.

8 years agoNodebox: Allow nodeboxes to "connect"
Auke Kok [Thu, 25 Feb 2016 08:16:31 +0000 (00:16 -0800)]
Nodebox: Allow nodeboxes to "connect"

We introduce a new nodebox type "connected", and allow these nodes to
have optional nodeboxes that connect it to other connecting nodeboxes.

This is all done at scenedraw time in the client. The client will
inspect the surrounding nodes and if they are to be connected to,
it will draw the appropriate connecting nodeboxes to make those
connections.

In the node_box definition, we have to specify separate nodeboxes for
each valid connection. This allows us to make nodes that connect only
horizontally (the common case) by providing optional nodeboxes for +x,
-x, +z, -z directions. Or this allows us to make wires that can connect
up and down, by providing nodeboxes that connect it up and down (+y,
-y) as well.

The optional nodeboxes can be arrays. They are named "connect_top,
"connect_bottom", "connect_front", "connect_left", "connect_back" and
"connect_right". Here, "front" means the south facing side of the node
that has facedir = 0.

Additionally, a "fixed" nodebox list present will always be drawn,
so one can make a central post, for instance. This "fixed" nodebox
can be omitted, or it can be an array of nodeboxes.

Collision boxes are also updated in exactly the same fashion, which
allows you to walk over the upper extremities of the individual
node boxes, or stand really close to them. You can also walk up
node noxes that are small in height, all as expected, and unlike the
NDT_FENCELIKE nodes.

I've posted a screenshot demonstrating the flexibility at
    http://i.imgur.com/zaJq8jo.png
In the screenshot, all connecting nodes are of this new subtype.

Transparent textures render incorrectly, Which I don't think is
related to this text, as other nodeboxes also have issues with this.

A protocol bump is performed in order to be able to send older clients
a nodeblock that is usable for them. In order to avoid abuse of users
we send older clients a "full-size" node, so that it's impossible for
them to try and walk through a fence or wall that's created in this
fashion. This was tested with a pre-bump client connected against a
server running the new protocol.

These nodes connect to other nodes, and you can select which ones
those are by specifying node names (or group names) in the
connects_to string array:
      connects_to = { "group:fence", "default:wood" }
By default, nodes do not connect to anything, allowing you to create
nodes that always have to be paired in order to connect. lua_api.txt
is updated to reflect the extension to the node_box API.

Example lua code needed to generate these nodes can be found here:
    https://gist.github.com/sofar/b381c8c192c8e53e6062

8 years agoFix chat console not opening after formspec opened over it
ShadowNinja [Sat, 12 Mar 2016 16:58:02 +0000 (11:58 -0500)]
Fix chat console not opening after formspec opened over it

The MainMenuManager set the console invisible when a
formspec opened over it, but didn't properly close it,
and the chat console never set itself visible again.

8 years agoDocumentation: Auto-update conf.example and settings_translation_file.cpp
paramat [Fri, 11 Mar 2016 21:56:32 +0000 (21:56 +0000)]
Documentation: Auto-update conf.example and settings_translation_file.cpp

8 years agoFix ask_reconnect_on_crash option being ignored
orwell96 [Fri, 11 Mar 2016 17:41:56 +0000 (18:41 +0100)]
Fix ask_reconnect_on_crash option being ignored

Since commit

3b50b2766aeb09c9fc0ad0ea07426bb2187df3d7 "Optional reconnect functionality"

there is a config option named ask_reconnect_on_crash.
It asks the client to reconnect to the server if the server crashed.
It has been implemeted and works, but due to a function parameter not
being passed it never showed effect. This patch adds the parameter
and fixes the bug.

Also fixes the `reconnect` option of minetest.request_shutdown being ignored.

8 years agoDocumentation: Clarify global and mapgen-specific mapgen flags
paramat [Fri, 11 Mar 2016 16:24:55 +0000 (16:24 +0000)]
Documentation: Clarify global and mapgen-specific mapgen flags

8 years agoIntroduce "protection_bypass" privilege.
Auke Kok [Mon, 29 Feb 2016 05:53:26 +0000 (21:53 -0800)]
Introduce "protection_bypass" privilege.

This privilege allows map protection bypassing for server operators
and world moderators.

Initially I had thought that bypassing protection mods would have been
something that could entirely be done inside mods and minetest_game,
but the concept of protection is defined in core, in the code of
core.is_protected().

I don't feel that it would be logical to introduce a protection
concept in core, but not some way around that for server operators
to maintain map parts that need fixing, de-griefing or cleanup.

Others had noticed the same problems, and proposed a patch to
minetest_game. That patch is fine by itself, but it fails to add
protection bypass functionality for digging normal nodes and placing
nodes.

So, instead, we indroduce the new priv "protection_bypass" in core,
and modify 'on_place_node' and 'node_dig' to allow bypassing node
protections if the player holds this priv.

This priv was tested with protector redo by tenplus1.

A followup patch to Minetest Game will include allowing special checks
for doors, trapdoors, chests in Minetest Game.

Protection mods will likely want to mimic the changes in their relevant
code sections.

8 years agoAvoid try/catch for settings.
Auke Kok [Tue, 8 Mar 2016 04:23:34 +0000 (20:23 -0800)]
Avoid try/catch for settings.

We can just test for the presence of these settings nicely here,
no need to use a try / catch construct.

8 years agoAdd consistent monotonic day counter - get_day_count()
Auke Kok [Sun, 6 Mar 2016 20:02:21 +0000 (12:02 -0800)]
Add consistent monotonic day counter - get_day_count()

I've written several experimental bits of code that revolve around the
need for a consistent calendar, but implementing one is extremely hard
in mods due to time changes and mods overriding core.get_timeofday(),
which will conflict.

The second part of the problem is that doing this from a mod requires
constant maintenance of a settings file.

An implementation in core is trivial, however, and solves all of
these problems at virtually no cost: No extra branches in server
steps, and a single branch when minetest.set_time_of_day(), which is
entirely reasonable.

We store the day_count value in env_meta.txt.

The use case is obvious: This change allows mods to create an actual
virtual calendar, or properly account for seasonal changes, etc..

We add a "/days" chatcommand that displays the current day count. No
permissions are needed. It can only retrieve the day count, not
modify it.

8 years agoAdd AreaStore custom ID API
ShadowNinja [Sat, 31 Oct 2015 00:38:22 +0000 (20:38 -0400)]
Add AreaStore custom ID API

8 years agoImplement AreaStore serialization
ShadowNinja [Fri, 30 Oct 2015 23:27:48 +0000 (19:27 -0400)]
Implement AreaStore serialization

8 years agoFix SpatialAreaStore not freeing removed areas
ShadowNinja [Fri, 30 Oct 2015 14:26:14 +0000 (10:26 -0400)]
Fix SpatialAreaStore not freeing removed areas

8 years agoAdd basic AreaStore method documentation
ShadowNinja [Fri, 30 Oct 2015 05:25:44 +0000 (01:25 -0400)]
Add basic AreaStore method documentation

8 years agoSort AreaStore header
ShadowNinja [Fri, 30 Oct 2015 04:52:45 +0000 (00:52 -0400)]
Sort AreaStore header

8 years agoClean up VectorAreaStore
ShadowNinja [Fri, 30 Oct 2015 04:04:10 +0000 (00:04 -0400)]
Clean up VectorAreaStore

8 years agoMove AreaStore container selection logic into getOptimalImplementation
ShadowNinja [Fri, 30 Oct 2015 03:38:36 +0000 (23:38 -0400)]
Move AreaStore container selection logic into getOptimalImplementation

8 years agoMove AreaStore to util
ShadowNinja [Fri, 30 Oct 2015 03:26:03 +0000 (23:26 -0400)]
Move AreaStore to util

8 years agoMake AreaStore cache setting private
ShadowNinja [Fri, 30 Oct 2015 03:17:44 +0000 (23:17 -0400)]
Make AreaStore cache setting private

8 years agoSimplify AreaStore ID management
ShadowNinja [Fri, 30 Oct 2015 03:08:32 +0000 (23:08 -0400)]
Simplify AreaStore ID management

8 years agos_env.{cpp, h} cleanups 3677/head
est31 [Mon, 7 Mar 2016 18:34:48 +0000 (19:34 +0100)]
s_env.{cpp, h} cleanups

* Replace string by-val passing with const reference
* Fix code style
* Remove redundant `int table` definition and indentation level

8 years agoAdd minetest.register_lbm() to run code on block load only
est31 [Tue, 9 Feb 2016 06:08:31 +0000 (07:08 +0100)]
Add minetest.register_lbm() to run code on block load only

8 years agoUse LuaErrors in security check macros
ShadowNinja [Sun, 6 Mar 2016 19:41:26 +0000 (14:41 -0500)]
Use LuaErrors in security check macros

Throwing a LuaError calls destructors as it propagates up the stack,
wheres lua_error just executes a longjmp.

8 years agoSettings Tab: Regroup dropdown datas in tables
Jean-Patrick Guerrero [Sat, 5 Mar 2016 10:48:02 +0000 (11:48 +0100)]
Settings Tab: Regroup dropdown datas in tables

8 years agoFaster insertion into table
Rui914 [Sun, 6 Mar 2016 15:53:45 +0000 (00:53 +0900)]
Faster insertion into table

8 years agoAdd forgotten valleys mapgen in mapgen name
Muhammad Rifqi Priyo Susanto [Sat, 5 Mar 2016 06:21:51 +0000 (13:21 +0700)]
Add forgotten valleys mapgen in mapgen name

Missing `valleys` in `settingtypes.txt` and `minetest.conf.example`.

8 years agoUpdate settings tab + some misc. clean-up
Jean-Patrick Guerrero [Thu, 3 Mar 2016 20:48:18 +0000 (21:48 +0100)]
Update settings tab + some misc. clean-up

8 years agoUpdate Android dependencies, -O3 optimization, remove old ARMv5 config
Maksim Gamarnik [Fri, 5 Feb 2016 18:56:56 +0000 (20:56 +0200)]
Update Android dependencies, -O3 optimization, remove old ARMv5 config

* Update OpenSSL (thanks @sapier, i use his patch!), Curl and SQLite3.
* Remove old arm config. Almost all phones that use ARMv5 have 1 core and 256-512 RAM, it's about 2-5 FPS.
* Do -O3 optimization for libs and remove -fexpensive-optimizations for Minetest (-O3 includes this! Read gcc docs).
* OpenSSL fix - thanks @sapier, again.

8 years agoMgvalleys: Correct spawn problems
Duane Robertson [Wed, 2 Mar 2016 01:50:35 +0000 (19:50 -0600)]
Mgvalleys: Correct spawn problems

Increase maximum spawn altitude to reduce spawn issues.

8 years agoDecoration API: Allow force_placement of simple decorations
paramat [Sat, 27 Feb 2016 23:49:53 +0000 (23:49 +0000)]
Decoration API: Allow force_placement of simple decorations

8 years agoRequire minetest.request_http_api to be called from the mod's main scope
Jeija [Thu, 25 Feb 2016 09:22:54 +0000 (10:22 +0100)]
Require minetest.request_http_api to be called from the mod's main scope

Fixes #3764

8 years agoFix main menu being unable to set secure settings
ShadowNinja [Thu, 3 Mar 2016 05:57:19 +0000 (00:57 -0500)]
Fix main menu being unable to set secure settings

8 years agoRemove debug.getupvalue from the Lua sandbox whitelist
ShadowNinja [Thu, 3 Mar 2016 04:59:42 +0000 (23:59 -0500)]
Remove debug.getupvalue from the Lua sandbox whitelist

This function could be used to steal insecure environments from trusted mods.

8 years agoAdd support for non-ASCII characters to chat console
ShadowNinja [Sun, 28 Feb 2016 18:27:54 +0000 (13:27 -0500)]
Add support for non-ASCII characters to chat console

This still only supports 256 characters, but that's because
Irrlicht's clipboard handlers don't support wide characters.

8 years agoAdd Android chat form
ShadowNinja [Sun, 28 Feb 2016 01:10:35 +0000 (20:10 -0500)]
Add Android chat form

8 years agoAdd text selection and copying to console
ShadowNinja [Sat, 27 Feb 2016 21:04:44 +0000 (16:04 -0500)]
Add text selection and copying to console

8 years agoUnlock cursor when opening console
ShadowNinja [Sat, 27 Feb 2016 20:51:09 +0000 (15:51 -0500)]
Unlock cursor when opening console

8 years agoUse the console instead of a dedicated window when pressing keymap_chat/cmd
Esteban I. Ruiz Moreno [Mon, 3 Jun 2013 00:16:32 +0000 (21:16 -0300)]
Use the console instead of a dedicated window when pressing keymap_chat/cmd

keymap_console opens a full window for chat history browsing.

8 years agoFix a mistake in the world format documentation
Aleksey Vorona [Wed, 2 Mar 2016 18:13:11 +0000 (10:13 -0800)]
Fix a mistake in the world format documentation

Fixed a minor mistake that made it appear as if the inventory
is serialized multiple times - once per each variable. In fact
it is serialized once per each node.

8 years agoRevert "Fix jumping at node edge"
nerzhul [Tue, 1 Mar 2016 10:15:08 +0000 (11:15 +0100)]
Revert "Fix jumping at node edge"

This reverts commit 60dc01dc258db842e229351b871d0989e3e7d62c.

This fixes issue #3773

8 years agoResize object_marker_red.png to 16x16
ShadowNinja [Sun, 28 Feb 2016 01:11:32 +0000 (20:11 -0500)]
Resize object_marker_red.png to 16x16

Having a non-power-of-two image broke the Android app.

8 years agoNodedef: Restore smooth lighting to water
paramat [Fri, 26 Feb 2016 22:30:50 +0000 (22:30 +0000)]
Nodedef: Restore smooth lighting to water

8 years agoMgvalleys: Add Dry Riverbeds
Duane Robertson [Sat, 27 Feb 2016 02:41:13 +0000 (20:41 -0600)]
Mgvalleys: Add Dry Riverbeds

Lower water table where base humidity is low.
Alter heat and humidity to compensate for river humidity and altitude
chill.
Correct misuse of surface_max_y in generateTerrain.
Remove sand trails in the water at river mouths.
Remove river water below water_level.
Correct heat/humidity calculations where noises are less than zero.
Correct heightmap errors as much as possible.
Make humidity calculations more readable.

8 years agoUpdate po files, minetest.conf.example and settings_translation_file.cpp
est31 [Sat, 27 Feb 2016 04:50:42 +0000 (05:50 +0100)]
Update po files, minetest.conf.example and settings_translation_file.cpp

8 years agoDon't generate trailing spaces in minetest.conf.example
est31 [Sat, 27 Feb 2016 04:26:58 +0000 (05:26 +0100)]
Don't generate trailing spaces in minetest.conf.example

If the default value of a setting was empty,
it previously generated a trailing space.

8 years agoTranslated using Weblate (Russian)
Dmitry Smirnov [Sun, 21 Feb 2016 08:46:02 +0000 (09:46 +0100)]
Translated using Weblate (Russian)

Currently translated at 61.3% (483 of 787 strings)

(Merger of five commits)

8 years agoTranslated using Weblate (Russian)
Vasily Pavlov [Sun, 21 Feb 2016 08:45:44 +0000 (09:45 +0100)]
Translated using Weblate (Russian)

Currently translated at 49.5% (390 of 787 strings)

(Merger of three commits)

8 years agoTranslated using Weblate (Spanish)
Miguel Isaac [Thu, 11 Feb 2016 00:41:06 +0000 (01:41 +0100)]
Translated using Weblate (Spanish)

Currently translated at 47.0% (370 of 787 strings)

(Merger of two commits from the same author)

8 years agoTranslated using Weblate (Catalan)
Joan Ciprià Moreno [Sat, 6 Feb 2016 00:25:33 +0000 (01:25 +0100)]
Translated using Weblate (Catalan)

Currently translated at 37.3% (294 of 787 strings)

8 years agoTranslated using Weblate (Spanish)
Laura Arjona Reina [Tue, 2 Feb 2016 18:22:47 +0000 (19:22 +0100)]
Translated using Weblate (Spanish)

Currently translated at 46.6% (367 of 787 strings)

8 years agoTranslated using Weblate (Portuguese (Brazil))
Bruno Borges [Wed, 3 Feb 2016 19:31:55 +0000 (20:31 +0100)]
Translated using Weblate (Portuguese (Brazil))

Currently translated at 65.5% (516 of 787 strings)

8 years agoTranslated using Weblate (Polish)
Amadeo [Sun, 31 Jan 2016 16:19:31 +0000 (17:19 +0100)]
Translated using Weblate (Polish)

Currently translated at 33.9% (267 of 787 strings)

8 years agoTranslated using Weblate (Ukrainian)
Fixer [Mon, 25 Jan 2016 22:23:31 +0000 (23:23 +0100)]
Translated using Weblate (Ukrainian)

Currently translated at 30.4% (240 of 787 strings)

8 years agoTranslated using Weblate (Spanish)
Diego Martínez [Mon, 25 Jan 2016 07:35:47 +0000 (08:35 +0100)]
Translated using Weblate (Spanish)

Currently translated at 45.9% (362 of 787 strings)

8 years agoTranslated using Weblate (Italian)
Paolo DGZ [Mon, 25 Jan 2016 17:13:15 +0000 (18:13 +0100)]
Translated using Weblate (Italian)

Currently translated at 52.7% (415 of 787 strings)

8 years agoTranslated using Weblate (Indonesian)
Muhammad Rifqi Priyo Susanto [Tue, 26 Jan 2016 15:32:41 +0000 (16:32 +0100)]
Translated using Weblate (Indonesian)

Currently translated at 42.4% (334 of 787 strings)

8 years agoTranslated using Weblate (Hungarian)
Kisbenedek Márton [Thu, 28 Jan 2016 19:32:40 +0000 (20:32 +0100)]
Translated using Weblate (Hungarian)

Currently translated at 69.1% (544 of 787 strings)

(Merger of three commits)

8 years agoFix minetest.request_insecure_environment() always returning nil
Jeija [Thu, 25 Feb 2016 08:47:28 +0000 (09:47 +0100)]
Fix minetest.request_insecure_environment() always returning nil

Fixes #3765

8 years agoMapblock mesh: Allow to use VBO
RealBadAngel [Mon, 22 Feb 2016 03:26:32 +0000 (04:26 +0100)]
Mapblock mesh: Allow to use VBO

8 years agoRemove new_style_water
RealBadAngel [Sun, 21 Feb 2016 06:34:29 +0000 (07:34 +0100)]
Remove new_style_water

8 years agoCache some settings
rubenwardy [Wed, 2 Sep 2015 19:21:55 +0000 (20:21 +0100)]
Cache some settings

8 years agoAdd dependencies for Fedora systems
Nathaniel Olsen [Thu, 25 Feb 2016 00:22:22 +0000 (18:22 -0600)]
Add dependencies for Fedora systems

8 years agoShaders: fix fog not affecting opaque liquids
RealBadAngel [Tue, 23 Feb 2016 19:32:57 +0000 (20:32 +0100)]
Shaders: fix fog not affecting opaque liquids

8 years agoSheet Ore: Eliminate crash caused by PcgRandom range max < min
paramat [Sun, 21 Feb 2016 13:28:34 +0000 (13:28 +0000)]
Sheet Ore: Eliminate crash caused by PcgRandom range max < min

In the calculation of y_start,
when 'column height max' was large it caused
nmin.Y + max_height > nmax.Y - max_height
Now, in this situation y_start is set to the
midpoint between nmin.Y and nmax.Y

Limit y0 and y1 to between nmin.Y and nmax.Y,
otherwise index calculation, which has no checks for limits,
places them at unwanted locations in the voxelmanip

8 years agoGOTBLOCKS & DELETEBLOCKS: test packet size only once 3771/head
nerzhul [Tue, 23 Feb 2016 09:58:13 +0000 (10:58 +0100)]
GOTBLOCKS & DELETEBLOCKS: test packet size only once

8 years agoFix android build
est31 [Tue, 23 Feb 2016 00:14:00 +0000 (01:14 +0100)]
Fix android build

Android had a linker error since commit:

31e0667a4a53a238d0321194b57b083bd74c0a5b "Add Lua interface to HTTPFetchRequest"

Fixes #3766. Thanks to @MoNTE48 for reporting the bug.

8 years agoReset block send timer when invoking setBlock(s)NotSent()
orwell96 [Mon, 1 Feb 2016 18:29:53 +0000 (19:29 +0100)]
Reset block send timer when invoking setBlock(s)NotSent()

As stated in this forum thread [1], I noticed that there is a
2 second interval in which inventory changes are shown on the
client. @yyt16384 found the source of these 2 seconds:
m_nothing_to_send_pause_timer is set to 2.0 every time there
are no changes to make, but this timer is not reset when
SetBlockNotSent or setBlocksNotSent are invoked. So in worst
case, the changed block will be sent over 2 seconds too late.

With this change, changed inventories are updated almost
immediately, but it causes additional connection load.

8 years agoAndroid: hardcode leveldb revision
est31 [Mon, 22 Feb 2016 16:43:42 +0000 (17:43 +0100)]
Android: hardcode leveldb revision

Newest leveldb commit breaks build.
With no fix in sight, there is no other way
than to fall back to the last working leveldb
revision, and hardcode it.

Workaround for upstream bug

https://github.com/google/leveldb/issues/340

8 years agoFix getting pointed node
RealBadAngel [Sat, 20 Feb 2016 09:58:40 +0000 (10:58 +0100)]
Fix getting pointed node

Fixes #3719
Closes #3753

8 years agoAdd Lua interface to HTTPFetchRequest
Jeija [Thu, 18 Feb 2016 10:38:47 +0000 (11:38 +0100)]
Add Lua interface to HTTPFetchRequest

This allows mods to perform both asynchronous and synchronous HTTP
requests. Mods are only granted access to HTTP APIs if either mod
security is disabled or if they are whitelisted in any of the
the secure.http_mods and secure.trusted_mods settings.

Adds httpfetch_caller_alloc_secure to generate random, non-predictable
caller IDs so that lua mods cannot spy on each others HTTP queries.

8 years agoFix HTTPFetchRequest performing a GET request if post_data is supplied
Jeija [Wed, 17 Feb 2016 19:36:51 +0000 (20:36 +0100)]
Fix HTTPFetchRequest performing a GET request if post_data is supplied

Instead, perform a POST request with post_data.

8 years agoCamera: remove auto tune FPS, single view range setting
RealBadAngel [Sat, 20 Feb 2016 03:42:35 +0000 (04:42 +0100)]
Camera: remove auto tune FPS, single view range setting

8 years agoRemove preload_item_visuals code
RealBadAngel [Sat, 20 Feb 2016 02:37:26 +0000 (03:37 +0100)]
Remove preload_item_visuals code

Closes #3748

8 years agoDont make fastface if tile is not seamless
RealBadAngel [Sat, 20 Feb 2016 05:53:56 +0000 (06:53 +0100)]
Dont make fastface if tile is not seamless

Fixes #3378
Closes #3751

8 years agoRestore simple settings tab and add advanced settings as dialog
BlockMen [Fri, 19 Feb 2016 09:03:02 +0000 (10:03 +0100)]
Restore simple settings tab and add advanced settings as dialog

8 years agoLittle collision.cpp cleanups 3752/head
Loic Blot [Sat, 20 Feb 2016 08:44:22 +0000 (09:44 +0100)]
Little collision.cpp cleanups

8 years agoFix jumping at node edge
gregorycu [Tue, 27 Jan 2015 12:33:54 +0000 (23:33 +1100)]
Fix jumping at node edge

8 years agoDon't print locale directory error message when GetText is disabled
ShadowNinja [Sat, 20 Feb 2016 00:55:31 +0000 (19:55 -0500)]
Don't print locale directory error message when GetText is disabled

Also, downgrade the error to a warning.

8 years agoIgnore spaces in secure.trusted_mods setting
Jeija [Fri, 19 Feb 2016 20:14:38 +0000 (21:14 +0100)]
Ignore spaces in secure.trusted_mods setting

8 years agoMinimap: show player markers
RealBadAngel [Thu, 18 Feb 2016 16:17:17 +0000 (17:17 +0100)]
Minimap: show player markers

8 years agoCamera: Don't count camera offset twice for Nametagged CAOs
RealBadAngel [Fri, 19 Feb 2016 13:13:21 +0000 (14:13 +0100)]
Camera: Don't count camera offset twice for Nametagged CAOs

8 years agoRequire request_insecure_environment to be called from the mod's main scope
ShadowNinja [Thu, 18 Feb 2016 21:06:07 +0000 (16:06 -0500)]
Require request_insecure_environment to be called from the mod's main scope

Previously you could steal a secure environment from a trusted mod by wrapping
request_insecure_environment with some code like this:

local rie_cp = minetest.request_insecure_environment
local stolen_ie
function minetest.request_insecure_environment()
local ie = rie_cp()
stolen_ie = stolen_ie or ie
return ie
end

8 years agoClientmap: Define p_nodes_min/max as v3s32 instead of v3s16
paramat [Wed, 17 Feb 2016 02:39:21 +0000 (02:39 +0000)]
Clientmap: Define p_nodes_min/max as v3s32 instead of v3s16

'cam_pos_nodes -/+ box_nodes_d' can exceed the range of v3s16
when a player is near the world edge using a large view range
This previously caused world to disappear
Create new function getBlocksInViewRange() called from
updateDrawList() and renderMap()
Correct code style throughout updateDrawList() and renderMap()

8 years agoHOTFIX: fix too agressive block culling
RealBadAngel [Sat, 13 Feb 2016 22:39:37 +0000 (23:39 +0100)]
HOTFIX: fix too agressive block culling

8 years agoMove object nametags to camera
RealBadAngel [Mon, 15 Feb 2016 13:01:01 +0000 (14:01 +0100)]
Move object nametags to camera

8 years agoClientiface: remove "value is dummy" from docs
est31 [Tue, 16 Feb 2016 22:58:30 +0000 (23:58 +0100)]
Clientiface: remove "value is dummy" from docs

Commit

6a1670dbc31cc0e44178bbd9ad34ff0d5981a060 "Migrate to STL containers/algorithms."

has replaced core::map<T, bool> with std::set<T>, but didn't update
the accompanying comment saying "value is dummy". This happened at
two places.

8 years agoMapblock mesh: Eliminate meshgen lags
RealBadAngel [Tue, 16 Feb 2016 02:51:57 +0000 (03:51 +0100)]
Mapblock mesh: Eliminate meshgen lags

8 years agoUse vertices with tangents only when its needed.
RealBadAngel [Fri, 12 Feb 2016 11:25:20 +0000 (12:25 +0100)]
Use vertices with tangents only when its needed.

8 years agoPlayer::accelerateHorizontal/Vertical should be member of LocalPlayer 3708/head
Loic Blot [Sun, 14 Feb 2016 16:45:06 +0000 (17:45 +0100)]
Player::accelerateHorizontal/Vertical should be member of LocalPlayer

8 years agoUse proper variable types for uniform sampler layers
RealBadAngel [Sun, 14 Feb 2016 08:00:34 +0000 (09:00 +0100)]
Use proper variable types for uniform sampler layers

8 years agoFormspec: fix broken irrlicht 1.7 build
RealBadAngel [Sat, 13 Feb 2016 21:08:58 +0000 (22:08 +0100)]
Formspec: fix broken irrlicht 1.7 build

Fixes #3701.