]> git.lizzy.rs Git - dragonfireclient.git/log
dragonfireclient.git
7 years agoLua_api.txt: Fix description of node drop behaviour
Duane [Mon, 11 Jul 2016 14:46:01 +0000 (09:46 -0500)]
Lua_api.txt: Fix description of node drop behaviour

7 years agoTreegen: Improve use of signed vs. unsigned integers
paramat [Sun, 10 Jul 2016 15:03:53 +0000 (16:03 +0100)]
Treegen: Improve use of signed vs. unsigned integers

To fix GCC 6.1.1 compilation warning:
'assuming signed overflow does not occur when assuming
that (X - c) > X is always false'

7 years agoRun updatepo.sh
est31 [Tue, 12 Jul 2016 18:50:20 +0000 (20:50 +0200)]
Run updatepo.sh

7 years agoUpdate minetest.conf.example, and settings_translation_file.cpp
est31 [Tue, 12 Jul 2016 18:49:33 +0000 (20:49 +0200)]
Update minetest.conf.example, and settings_translation_file.cpp

7 years agoTranslated using Weblate (French)
Onyx Steinheim [Tue, 12 Jul 2016 16:56:29 +0000 (16:56 +0000)]
Translated using Weblate (French)

Currently translated at 100.0% (887 of 887 strings)

7 years agoTranslated using Weblate (Dutch)
ikmaak [Fri, 8 Jul 2016 10:32:09 +0000 (10:32 +0000)]
Translated using Weblate (Dutch)

Currently translated at 89.6% (795 of 887 strings)

7 years agoTranslated using Weblate (Indonesian)
Muhammad Rifqi Priyo Susanto [Thu, 23 Jun 2016 17:34:59 +0000 (17:34 +0000)]
Translated using Weblate (Indonesian)

Currently translated at 55.8% (495 of 887 strings)

7 years agoTranslated using Weblate (Spanish)
Roberto Mengíbar Fernández [Tue, 14 Jun 2016 21:57:46 +0000 (21:57 +0000)]
Translated using Weblate (Spanish)

Currently translated at 59.0% (524 of 887 strings)

7 years agoTranslated using Weblate (French)
Guillaume Robert [Mon, 13 Jun 2016 18:39:36 +0000 (18:39 +0000)]
Translated using Weblate (French)

Currently translated at 91.2% (809 of 887 strings)

7 years agoTranslated using Weblate (Chinese (China))
arsdragonfly [Sat, 11 Jun 2016 10:56:31 +0000 (10:56 +0000)]
Translated using Weblate (Chinese (China))

Currently translated at 75.1% (667 of 887 strings)

7 years agoTranslated using Weblate (Serbian (cyrillic))
Лазар Вукановић [Thu, 9 Jun 2016 11:11:15 +0000 (11:11 +0000)]
Translated using Weblate (Serbian (cyrillic))

Currently translated at 31.5% (280 of 887 strings)

7 years agoAdded translation using Weblate (Serbian (cyrillic))
Лазар Вукановић [Thu, 9 Jun 2016 08:40:00 +0000 (08:40 +0000)]
Added translation using Weblate (Serbian (cyrillic))

7 years agoTranslated using Weblate (Esperanto)
Tim [Sat, 4 Jun 2016 13:18:08 +0000 (13:18 +0000)]
Translated using Weblate (Esperanto)

Currently translated at 32.2% (286 of 887 strings)

7 years agoTranslated using Weblate (Chinese (China))
susan [Fri, 3 Jun 2016 12:31:02 +0000 (12:31 +0000)]
Translated using Weblate (Chinese (China))

Currently translated at 74.1% (658 of 887 strings)

7 years agoFix typos (#4298)
Snipie [Sat, 9 Jul 2016 14:00:14 +0000 (14:00 +0000)]
Fix typos (#4298)

7 years agoUbuntu build HOWTO: Suggest to install git instead of git-core
est31 [Fri, 8 Jul 2016 15:07:31 +0000 (17:07 +0200)]
Ubuntu build HOWTO: Suggest to install git instead of git-core

The package docs for the git-core Ubuntu package in all supported
Ubuntu versions, including 12.04 say:

This is a transitional dummy package.  The 'git-core' package has been
renamed to 'git', which has been installed automatically.  This git-core
package is now obsolete, and can safely be removed from the system if no
other package depends on it.

Fixes #4109

7 years agoFix -Wterminate warnings in rollback.cpp as well
est31 [Fri, 8 Jul 2016 05:26:00 +0000 (07:26 +0200)]
Fix -Wterminate warnings in rollback.cpp as well

Fix #4137 for rollback.cpp as well.

7 years agoFix -Wterminate warning on GCC 6
est31 [Fri, 8 Jul 2016 04:24:22 +0000 (06:24 +0200)]
Fix -Wterminate warning on GCC 6

Fixes #4137

7 years agoFix warning in porting::setXorgWindowIcon when building without X11 (#4288)
Jay Arndt [Thu, 7 Jul 2016 01:15:36 +0000 (20:15 -0500)]
Fix warning in porting::setXorgWindowIcon when building without X11 (#4288)

7 years agoAdding minetest.clear_craft
Foghrye4 [Mon, 25 Apr 2016 15:50:10 +0000 (18:50 +0300)]
Adding minetest.clear_craft

Modifications by est31: grammar fixes in doc + error messages and
a little style fix, no functional change.

7 years agoUse mathematical function to determine yaw direction
sfan5 [Mon, 20 Jun 2016 16:11:05 +0000 (18:11 +0200)]
Use mathematical function to determine yaw direction

7 years agoFix for cropped text "Toggle Cinematic"
Snipie [Tue, 5 Jul 2016 07:43:25 +0000 (07:43 +0000)]
Fix for cropped text "Toggle Cinematic"

7 years agoRemove cinematic toggle on F8
rubenwardy [Mon, 4 Jul 2016 17:01:58 +0000 (18:01 +0100)]
Remove cinematic toggle on F8

Also update cinematic mode's description to include mouse

7 years agoFinally set a window icon on X11
est31 [Sun, 3 Jul 2016 23:33:46 +0000 (01:33 +0200)]
Finally set a window icon on X11

Since the creation of minetest, it had no window icon on X11.
Now we have one.

The misc/minetest-xorg-icon-128.png file is a rendering of the
misc/minetest.svg file with inkscape, created with something like:

inkscape -z -e misc/minetest-xorg-icon-128.png -w 128 -h 128 misc/minetest.svg

7 years agoTemporarily disable "testStartStopWait" Threading unit test on mac
est31 [Mon, 4 Jul 2016 19:32:32 +0000 (21:32 +0200)]
Temporarily disable "testStartStopWait" Threading unit test on mac

The "testStartStopWait" unit test is unreliably failing on mac,
for some time already. See bug #3786.

Having the unittest fail unreliably doesn't help anybody but mostly
inhibits the main feature of travis builds: to test PRs for regressions.

Therefore, disable the specific unit test for until bug #3786
is fixed.

7 years agoFix & make linux conditionals uniform (#4278)
Rogier-5 [Mon, 4 Jul 2016 19:00:57 +0000 (21:00 +0200)]
Fix & make linux conditionals uniform (#4278)

The source used a hodge-podge of different combinations of different
macros to check for linux: 'linux', '__linux', '__linux__'.

As '__linux__' is standard (Posix), and the others are not, the source
now uniformly uses __linux__. If either linux or __linux are defined,
it is made sure that __linux__ is defined as well.

7 years agoDisable joysticks per default for now
est31 [Mon, 4 Jul 2016 18:49:13 +0000 (20:49 +0200)]
Disable joysticks per default for now

It seems that various different devices register as
Joysticks on linux, and their presence has caused
lots of confusion amongst minetest users.

Therefore, disable the joystick feature.

Closes #4261
Closes #4221

8 years agoRemove top left minetest watermark
est31 [Sun, 3 Jul 2016 17:36:51 +0000 (19:36 +0200)]
Remove top left minetest watermark

Move version information into the window caption.

On popular player request.

Fixes #4209.

8 years agoAdd MapSettingsManager and new mapgen setting script API functions
kwolekr [Fri, 24 Jun 2016 22:15:56 +0000 (18:15 -0400)]
Add MapSettingsManager and new mapgen setting script API functions

This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
  instead of the EmergeManager.
- New Script API functions added:
    core.get_mapgen_setting
    core.get_mapgen_setting_noiseparams,
    core.set_mapgen_setting, and
    core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
  rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.

8 years agoMapgen: Refactor mapgen creation and management
kwolekr [Tue, 14 Jun 2016 04:10:55 +0000 (00:10 -0400)]
Mapgen: Refactor mapgen creation and management

- Move mapgen creation logic out of EmergeManager and into Mapgen
- Internally represent mapgen type as an enum value, instead of a string
- Remove the need for a MapgenFactory per mapgen

8 years agoRemove old docs. We have VCS history anyways. (#4266)
Pavel Puchkin [Sun, 3 Jul 2016 11:30:09 +0000 (13:30 +0200)]
Remove old docs. We have VCS history anyways. (#4266)

8 years agoopenbsd's port fix for non Linux systems w/o libRT
David Carlier [Sun, 19 Jun 2016 07:48:12 +0000 (08:48 +0100)]
openbsd's port fix for non Linux systems w/o libRT

X11 headers are not always in expected locations, add them to include list.

Modifications by est31: indentation fixes, commit message improved

8 years agoOnly allow strings to be passed to minetest.global_exists (#4253)
HybridDog [Tue, 28 Jun 2016 04:34:22 +0000 (06:34 +0200)]
Only allow strings to be passed to minetest.global_exists (#4253)

Sometimes you accidentally forget the quotes when using global_exists, this makes minetest abort if you did so.

M  builtin/common/strict.lua

8 years agoAlso shut down when SIGTERM was received
est31 [Fri, 24 Jun 2016 18:43:29 +0000 (20:43 +0200)]
Also shut down when SIGTERM was received

Fixes #4251

8 years agoMgflat/fractal/v7/valleys: Denser 3D noise tunnels
paramat [Tue, 21 Jun 2016 02:48:24 +0000 (03:48 +0100)]
Mgflat/fractal/v7/valleys: Denser 3D noise tunnels

Reduce spread from 96 to primes 61 and 67 (either side of 64)
Prime spreads help to keep 3D noise periodic features unaligned
'cave width' 0.2 to preserve tunnel width
Reduce octaves to 3 to improve network structure

8 years agoPlayer: New get_look, set_look API
raymoo [Fri, 17 Jun 2016 19:57:27 +0000 (12:57 -0700)]
Player: New get_look, set_look API

Deprecate get_look / set_look pitch / yaw

8 years agoDungeons: Generalise use, add capabilities, various modifications
paramat [Sun, 12 Jun 2016 02:11:26 +0000 (03:11 +0100)]
Dungeons: Generalise use, add capabilities, various modifications

- Generalise node names to c_wall and c_alt_wall
- Remove 'mossratio' and instead disable alt_wall loop if
  c_alt_wall == CONTENT_IGNORE
- Use one generalised 3D noise for alternative wall nodes and in
  mgv6 create moss distribution similar to the previous

- Rename rarity noise to density noise and enable the option of multiple
  dungeons per chunk determined by the value. Recreate previous distribution
- Add parameters for min and max rooms per dungeon
- Add dungeon y limits

- Integrate river water properly

Generalisation is needed now that we have sandstone and desert stone
dungeons by default and can choose any node for alternative structure.
The current code is based around cobble dungeons with mossycobble
alternative nodes, the 2 noises controlling the alternative nodes
are based on wetness.

Enabling multiple dungeons per chunk with definable number of rooms
allows the option of very dense and complex underground structures
that could interconnect to create megastructures.
Y limits are added to be consistent with other mapgen elements, and
enable locaton of dungeon or megastructure realms as part of our
'stacked realms' philosophy.

8 years agoBuiltin/game/item: Add `place_param2` nodedef field
Auke Kok [Mon, 30 May 2016 22:07:09 +0000 (15:07 -0700)]
Builtin/game/item: Add `place_param2` nodedef field

This allows a nodedef to specify a fixed value for param2 to be
used for all normal placements.

There are several uses for this:

- nodes that require param2 to be set to a non-zero value for
  internal mod use. E.g. leafdecay could use this to detect that
  leaves are played by players.
- force wallmounted or facedir value at placement at placement

This overrides any player look direction or other on-the-fly
param2 setting during placement.

8 years agoMove unknown node message when applying texture overrides to infostream (#4218)
Yutao Yuan [Mon, 13 Jun 2016 22:29:15 +0000 (06:29 +0800)]
Move unknown node message when applying texture overrides to infostream (#4218)

Texture packs have no way to know what nodes are available, so this shouldn't be a error message.

8 years agoSky.cpp: Improve code style. Define sky colours as SColor
paramat [Thu, 9 Jun 2016 02:15:41 +0000 (03:15 +0100)]
Sky.cpp: Improve code style. Define sky colours as SColor

8 years agoMake node timers more efficient
Ekdohibs [Mon, 21 Mar 2016 11:58:52 +0000 (12:58 +0100)]
Make node timers more efficient

8 years agoRandom misc. warning fixes and cleanups
kwolekr [Sat, 11 Jun 2016 07:23:53 +0000 (03:23 -0400)]
Random misc. warning fixes and cleanups

 - Fix unused c_sand member warning in Valleys Mapgen
 - Fix some code style
 - Make some std::string params const ref

8 years agoSettings: Clean up settings changed callback code
kwolekr [Sat, 11 Jun 2016 04:10:25 +0000 (00:10 -0400)]
Settings: Clean up settings changed callback code

8 years agoFix android build
est31 [Sat, 11 Jun 2016 03:41:12 +0000 (05:41 +0200)]
Fix android build

Thanks to @Wayward1 for reporting the bug.

Fixes #4212.

8 years agoServer: Add reason for leave to `on_leaveplayer` callbacks
Diego Martinez [Tue, 5 Jan 2016 01:49:11 +0000 (22:49 -0300)]
Server: Add reason for leave to `on_leaveplayer` callbacks

8 years agoSky: Darker, bluer sky and improved horizon haze at night
paramat [Tue, 24 May 2016 23:56:49 +0000 (00:56 +0100)]
Sky: Darker, bluer sky and improved horizon haze at night

Add new colours 'skycolour_bright_night', 'bgcolour_bright_night'
and enable these between sunset end and sunrise start
Night sky has same hue as day sky but is darker and more saturated
Night horizon haze (bgcolour) is slightly less saturated and
slightly brighter than night sky, to be consistent with daytime
horizon haze

8 years agoSky: Fix sunrisebg texture motion (#4199)
Paramat [Wed, 8 Jun 2016 06:43:27 +0000 (07:43 +0100)]
Sky: Fix sunrisebg texture motion (#4199)

Top of texture no longer shows above horizon during night and day

8 years agoLua_api.txt: Split long lines. Capitalise 'Biome API'. Minor edits
paramat [Tue, 7 Jun 2016 02:23:23 +0000 (03:23 +0100)]
Lua_api.txt: Split long lines. Capitalise 'Biome API'. Minor edits

8 years agoMapgen: Optimize biomemap creation by combining with generateBiomes
kwolekr [Sun, 5 Jun 2016 00:24:07 +0000 (20:24 -0400)]
Mapgen: Optimize biomemap creation by combining with generateBiomes

8 years agoBiome API: Add per-biome riverbed material and depth
paramat [Fri, 3 Jun 2016 11:58:50 +0000 (12:58 +0100)]
Biome API: Add per-biome riverbed material and depth

Mgvalleys: Remove riverbed sand placement from base terrain generation
Riverbed material placement moved to MapgenBasic::generateBiomes()
Document fields and add note that the biome API is still unstable

8 years agoMapgen: Performance improvement and fixes for updateLiquid (#4065)
MillersMan [Sat, 4 Jun 2016 23:30:36 +0000 (01:30 +0200)]
Mapgen: Performance improvement and fixes for updateLiquid (#4065)

- Adds only ~100 nodes per chunk to trans_liquid with similar processing time
- Adds liquid nodes themselves instead of potential solid nodes below them
- CONTENT_IGNORE nodes are interpreted as if they continue their neighborhood
- This allows liquid columns to span multiple chunks without being interrupted
- NOTE: Expects an one-node border in generation chunk without liquid changes

8 years agoBiomes: Define and use biome_t for biome IDs
kwolekr [Sat, 4 Jun 2016 07:00:45 +0000 (03:00 -0400)]
Biomes:  Define and use biome_t for biome IDs

8 years agoPcgRandom: Fix/improve documentation
kwolekr [Sat, 4 Jun 2016 06:16:06 +0000 (02:16 -0400)]
PcgRandom: Fix/improve documentation

8 years agoChange internal type for seeds to s32
kwolekr [Sat, 4 Jun 2016 05:35:37 +0000 (01:35 -0400)]
Change internal type for seeds to s32

This fixes value truncation (and therefore incompatibility) on platforms
with an LP32 data model, such as VAX or MS-DOS.

8 years agoInitial Gamepad support
est31 [Fri, 27 May 2016 06:35:07 +0000 (08:35 +0200)]
Initial Gamepad support

Adds initial ingame gamepad support to minetest.

Full Formspec support is not implemented yet and
can be added by a later change.

8 years agoInput related generalisations
est31 [Wed, 25 May 2016 07:22:20 +0000 (09:22 +0200)]
Input related generalisations

* Move key types into own file
* Use Generalized input methods in game.cpp

8 years agoSapier's fix for the RESEND RELIABLE problem (#4170)
Robert Kiraly [Fri, 3 Jun 2016 07:50:21 +0000 (00:50 -0700)]
Sapier's fix for the RESEND RELIABLE problem (#4170)

8 years agoMgv7: Always carve river channels in mountain terrain
paramat [Mon, 30 May 2016 12:15:14 +0000 (13:15 +0100)]
Mgv7: Always carve river channels in mountain terrain

Previously, rivers were sometimes blocked by vertical walls
of mountain terrain due to river carving being disabled
when base terrain height was below water_level - 16
Remove now unused base terrain heightmap created in
generateTerrain()

8 years agoAdd colored text (not only colored chat).
Ekdohibs [Tue, 31 May 2016 15:30:11 +0000 (17:30 +0200)]
Add colored text (not only colored chat).

Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.

8 years agoColored chat working as expected for both freetype and non-freetype builds. @nerzhul...
TriBlade9 [Fri, 16 Jan 2015 06:54:26 +0000 (14:54 +0800)]
Colored chat working as expected for both freetype and non-freetype builds. @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/

8 years agoTranslated using Weblate (Hebrew)
yuval hreman [Thu, 26 May 2016 21:02:00 +0000 (21:02 +0000)]
Translated using Weblate (Hebrew)

Currently translated at 7.8% (70 of 887 strings)

8 years agoTranslated using Weblate (Russian)
Andrey K [Fri, 20 May 2016 15:18:33 +0000 (15:18 +0000)]
Translated using Weblate (Russian)

Currently translated at 57.2% (508 of 887 strings)

8 years agoTranslated using Weblate (Italian)
Emon Omen [Sat, 14 May 2016 11:34:53 +0000 (13:34 +0200)]
Translated using Weblate (Italian)

Currently translated at 100.0% (887 of 887 strings)

8 years agoTranslated using Weblate (Ukrainian)
Fixer [Wed, 11 May 2016 23:10:28 +0000 (01:10 +0200)]
Translated using Weblate (Ukrainian)

Currently translated at 39.3% (349 of 887 strings)

8 years agoTranslated using Weblate (Russian)
Sergey [Wed, 11 May 2016 20:34:38 +0000 (22:34 +0200)]
Translated using Weblate (Russian)

Currently translated at 57.0% (506 of 887 strings)

This is a merger of three commits.

8 years agoTranslated using Weblate (Russian)
Vasily Pavlov [Wed, 11 May 2016 20:36:17 +0000 (22:36 +0200)]
Translated using Weblate (Russian)

Currently translated at 57.1% (507 of 887 strings)

8 years agoTranslated using Weblate (German)
Wuzzy [Wed, 11 May 2016 02:34:34 +0000 (04:34 +0200)]
Translated using Weblate (German)

Currently translated at 100.0% (887 of 887 strings)

8 years agoAdd minetest.check_password_entry callback
est31 [Mon, 30 May 2016 13:27:48 +0000 (23:27 +1000)]
Add minetest.check_password_entry callback

Gives a convenient way to check a player's password.

This entirely bypasses the SRP protocol, so should be used
with great care.

This function is not intended to be used
in-game, but solely by external protocols, where no
authentication of the minetest engine is provided, and
also only for protocols, in which the user already gives the
server the plaintext password.

Examples for good use are the classical http form, or irc,
an example for a bad use is a password change dialog inside
formspec.

Users should be aware that they lose the advantages of the SRP
protocol if they enter their passwords for servers outside the
normal entry box, like in in-game formspec menus,
or through irc /msg s,

This patch also fixes an auth.h mistake which has mixed up the
order of params inside the decode_srp_verifier_and_salt function.

Zeno-: Added errorstream message for invalid format when I committed

8 years agoprotection_bypass priv can now be revoked in singleplayer (#4169)
Sokomine [Mon, 30 May 2016 12:40:32 +0000 (14:40 +0200)]
protection_bypass priv can now be revoked in singleplayer (#4169)

8 years agoRemove unused code in s_security.cpp (#4172)
Zeno- [Mon, 30 May 2016 12:37:40 +0000 (22:37 +1000)]
Remove unused code in s_security.cpp (#4172)

Note that the macro CHECK_FILE_ERR implements the code removed

8 years agoParticles: Add option to remove particles on collision
Auke Kok [Sat, 28 May 2016 04:08:23 +0000 (21:08 -0700)]
Particles: Add option to remove particles on collision

Adds the particle option `collision_removal = bool`

Some particles are hard to use right now since they either go through
solid blocks (without collision detection), and with collision
detection enabled they (e.g. raindrops) would just stop dead on the
floor and sit there until they expire, or worse, scrape along a wall
or ceiling.

We can solve the problem by adding a boolean flag that tells the
particle to be removed if it ever collides with something. This will
make it easier to add rain that doesn't fall through your roof or stick
on the top of it. Or clouds and smoke that don't go through trees.

Particles that collide with this flag are marked expired
unconditionally, causing them to be treated like normal expired
particles and cleaned up normally.

Documentation is adjusted accordingly.

An added bonus of this patch is that particles can potentially collide
many times with nodes, and this reduces the amount of collisions to 1
(max), which may end up reducing particle load on the client.

8 years agoAdd base64 encoding and decoding to the lua api. (#3919)
red-001 [Sat, 28 May 2016 03:37:28 +0000 (04:37 +0100)]
Add base64 encoding and decoding to the lua api. (#3919)

8 years agoDisallow external linkage for default Cavegen NoiseParams
kwolekr [Fri, 27 May 2016 03:23:05 +0000 (23:23 -0400)]
Disallow external linkage for default Cavegen NoiseParams

8 years agoDungeongen: Remove dependency on Mapgen
kwolekr [Sun, 22 May 2016 20:50:43 +0000 (16:50 -0400)]
Dungeongen: Remove dependency on Mapgen

8 years agoMapgen: Combine dungeon generation code
kwolekr [Sun, 22 May 2016 20:27:31 +0000 (16:27 -0400)]
Mapgen: Combine dungeon generation code

8 years agoMapgen: Deduplicate common constructor code
kwolekr [Sun, 22 May 2016 06:17:19 +0000 (02:17 -0400)]
Mapgen: Deduplicate common constructor code

8 years agoMapgen: Remove calculateNoise from most mapgens
kwolekr [Fri, 20 May 2016 07:37:31 +0000 (03:37 -0400)]
Mapgen: Remove calculateNoise from most mapgens

This commit moves noise calculation to the functions where the noise is
actually required, increasing the separation of concerns and level of
interdependency for each mapgen method.  Valleys Mapgen is left unmodified.

8 years agoMapgen V7: Remove now-unused ridge heightmap
kwolekr [Thu, 19 May 2016 18:05:51 +0000 (14:05 -0400)]
Mapgen V7: Remove now-unused ridge heightmap

8 years agoCavegen: Move V5-style caves to CavesNoiseIntersection
kwolekr [Thu, 19 May 2016 07:40:22 +0000 (03:40 -0400)]
Cavegen: Move V5-style caves to CavesNoiseIntersection

8 years agoCavegen: Minor misc. fixes
kwolekr [Sun, 15 May 2016 02:46:50 +0000 (22:46 -0400)]
Cavegen: Minor misc. fixes

- Convert instances of numeric literal doubles to floats
- Move dswitchint to a local variable now that being a member is unnecessary
- Improve const correctness
- Indentation fixes

8 years agoFix undefined evaluation order when constructing random vectors
kwolekr [Wed, 11 May 2016 07:47:45 +0000 (03:47 -0400)]
Fix undefined evaluation order when constructing random vectors

MSVC and GCC evaluate parameters in right-to-left order, whereas Clang
evaluates in left-to-right order, and of course, an optimization could
leave the order of evaluation completely indeterminate.

This commit fixes all instances of the error by explicitly assigning the
results of expressions that use PseudoRandom::next() or range() to their
respective vector components.

The right-to-left evaluation behavior is preserved since Clang is much less
commonly used to compile Minetest than GCC and MSVC combined, and would
therefore cause the least harm.

8 years agoCavegen: Re-add small caves to CavesRandomWalk
kwolekr [Wed, 11 May 2016 04:00:05 +0000 (00:00 -0400)]
Cavegen: Re-add small caves to CavesRandomWalk

8 years agoCavegen: Remove CavesRandomWalk dependency on Mapgen
kwolekr [Wed, 11 May 2016 02:56:03 +0000 (22:56 -0400)]
Cavegen: Remove CavesRandomWalk dependency on Mapgen

8 years agoCavegen: Merge instances of repetitive surface level-finding code
kwolekr [Tue, 10 May 2016 17:35:39 +0000 (13:35 -0400)]
Cavegen: Merge instances of repetitive surface level-finding code

8 years agoCavegen: Remove CavesV6 dependency on Mapgen
kwolekr [Tue, 10 May 2016 17:21:13 +0000 (13:21 -0400)]
Cavegen: Remove CavesV6 dependency on Mapgen

8 years agoCavegen: Rename CaveV6 to CavesV6
kwolekr [Tue, 10 May 2016 04:10:59 +0000 (00:10 -0400)]
Cavegen: Rename CaveV6 to CavesV6

- Add comment explaining why it exists
- Remove unused 'flooded' variable
- Rename shadowed variable
- Fix some code style

8 years agoCavegen: Merge CaveV5 and CaveV7 into CavesRandomWalk
kwolekr [Tue, 10 May 2016 04:01:37 +0000 (00:01 -0400)]
Cavegen: Merge CaveV5 and CaveV7 into CavesRandomWalk

8 years agoFix MgStoneType and BiomeType enum names
kwolekr [Mon, 2 May 2016 06:45:59 +0000 (02:45 -0400)]
Fix MgStoneType and BiomeType enum names

8 years agoMapgen: Combine generateBiomes, dustTopNodes, and generateCaves
kwolekr [Mon, 2 May 2016 06:24:57 +0000 (02:24 -0400)]
Mapgen: Combine generateBiomes, dustTopNodes, and generateCaves

This commit condenses the above methods into a single implementation used by
V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.

8 years agoMove biome calculation to BiomeGen
kwolekr [Thu, 28 Apr 2016 07:43:09 +0000 (03:43 -0400)]
Move biome calculation to BiomeGen

BiomeGen defines an interface that, given a set of BiomeParams, computes biomes
for a given area using the algorithm implemented by that specific BiomeGen.
This abstracts away the old system where each mapgen supplied the noises
required for biome generation.

8 years agoTell irrlicht if we handle a key or not.
est31 [Sat, 14 May 2016 14:25:57 +0000 (16:25 +0200)]
Tell irrlicht if we handle a key or not.

We can remove the function in MtNativeActivity now
as it serves precisely that purpose: to tell irrlicht
that we handled the esc key.

TODO for later:
 * Perhaps try to find a more performant container than KeyList

8 years agoFix rollback.txt migration
ShadowNinja [Fri, 12 Feb 2016 23:39:03 +0000 (18:39 -0500)]
Fix rollback.txt migration

Broken by b1965ac20922e3722392114bd63a22b403dcbe98.
This also prepares the begin and commit statements only once.

8 years agoFix irrlicht version checking macro for tooltip_height calculation
Craig Robbins [Mon, 23 May 2016 14:27:11 +0000 (00:27 +1000)]
Fix irrlicht version checking macro for tooltip_height calculation

8 years agoMove updateTextures and fillTileAttribs to ContentFeatures
Ekdohibs [Sun, 22 May 2016 18:33:06 +0000 (20:33 +0200)]
Move updateTextures and fillTileAttribs to ContentFeatures

8 years agoTolerate packet reordering in the early init process
est31 [Wed, 18 May 2016 04:18:08 +0000 (06:18 +0200)]
Tolerate packet reordering in the early init process

Fixes a bug where packet reordering made the server give the
client two peer ids instead of one. This in turn confused
reliable packet sending and made connecting to the server fail.

The client usually sends three packets at init: one "dummy"
packet consisting of two 0 bytes, and the init packet as well as
its legacy counterpart. The last one can be turned off since commit
af30183124d40a969040d7de4b3a487feec466e4, but this is of lower
relevance for the bug. The relevant part here is that network
packet reorder (which is a normal occurence) can make the packets
reach the server in different order.

If reorder puts the dummy packet further behind, the following
would happen before the patch:

1. The server will get one of the init packets on channel 1 and
   assign the client a peer id, as the packet will have zero as
   peer id.

2. The server sends a CONTROLTYPE_SET_PEER_ID packet to inform
   the client of the peer id.

3. The next packet from the client will contain the peer id set by
   the server.

4. The server sets the m_has_sent_with_id member for the client's
   peer structure to true.

5. Now the dummy packet arrives. It has a peer id of zero, therefore
   the server searches whether it already has a peer id for the
   address the packet was sent from. The search fails because
   m_has_sent_with_id was set to true and the server only searched
   for peers with m_has_sent_with_id set to false.

6. In a working setup, the server would assign the dummy packet to
   the correct peer id. However the server instead now assigns a
   second peer id and peer structure to the peer, and assign the
   packet to that new peer.

7. In order to inform the peer of its peer id, the server sends a
   CONTROLTYPE_SET_PEER_ID command packet, reliably, to the peer.
   This packet uses the new peer id.

8. The client sends an ack to that packet, not with the new peer id
   but with the peer id sent in 2.

9. This packet reaches the server, but it drops the ACK as the peer
   id does not map to any un-ACK-ed packets with that seqnum. The
   same time, the server still waits for an ACK with the new peer
   id, which of course won't come. This causes the server to
   periodically re-try sending that packet, and the client ACKing it
   each time.

Steps 7-9 cause annoyances and erroneous output, but don't cause
the connection failure itself.
The actual mistake that causes the connection failure happens in 6:
The server does not assign the dummy packet to the correct peer, but
to a newly created one.
Therefore, all further packets sent by the client on channel 0 are
now buffered by the server as it waits for the dummy packet to reach
the peer, which of course doesn't happen as the server assigned
that packet to the second peer it created for the client.
This makes the connection code indefinitely buffer the
TOSERVER_CLIENT_READY packet, not passing it to higher level code,
which stalls the continuation of the further init process
indefinitely and causes the actual bug.

Maybe this can be caused by reordered init packets as well, the only
studied case was where network has reliably reordered the dummy
packet to get sent after the init packets.

The patch fixes the bug by not ignoring peers where
m_has_sent_with_id has been set anymore. The other changes of the
patch are just cleanups of unused methods and fields and additional
explanatory comments.

One could think of alternate ways to fix the bug:

* The client could simply take the new peer id and continue
  communicating with that. This is however worse than the fix as
  it requires the peer id set command to be sent reliably (which
  currently happens, but it cant be changed anymore). Also, such a
  change would require both server and client to be patched in order
  for the bug to be fixed, as right now the client ignores peer id
  set commands after the peer id is different from
  PEER_ID_INEXISTENT and the server requires modification too to
  change the peer id internally.
  And, most importantly, right now we guarantee higher level server
  code that the peer id for a certain peer does not change. This
  guarantee would have to be broken, and it would require much
  larger changes to the server than this patch means.

* One could stop sending the dummy packet. One may be unsure whether
  this is a good idea, as the meaning of the dummy packet is not
  known (it might be there for something important), and as it is
  possible that the init packets may cause this problem as well
  (although it may be possible too that they can't cause this).

Thanks to @auouymous who had originally reported this bug and who
has helped patiently in finding its cause.

8 years agoFix a m_camera not used warning fix pointed by clang
Loic Blot [Sun, 22 May 2016 11:31:41 +0000 (13:31 +0200)]
Fix a m_camera not used warning fix pointed by clang

8 years agoImplement a PostgreSQL backend
Loic Blot [Sat, 14 May 2016 09:00:42 +0000 (11:00 +0200)]
Implement a PostgreSQL backend

8 years agoGitignore: ignore idea and ninja files
HybridDog [Fri, 20 May 2016 20:08:07 +0000 (22:08 +0200)]
Gitignore: ignore idea and ninja files

8 years agoItem entities: Don't show description as infotext
paramat [Mon, 16 May 2016 23:22:27 +0000 (00:22 +0100)]
Item entities: Don't show description as infotext

Partially reverts #3547
Infotext remains optional for objects, empty by default

8 years agoFix tooltip height for versions of irrlicht < 1.8.2
Craig Robbins [Fri, 20 May 2016 11:18:59 +0000 (21:18 +1000)]
Fix tooltip height for versions of irrlicht < 1.8.2

Version 1.8.2 of irrlicht changed the way that IGUIStaticText::getTextHeight() works and since that release properly deals with newlines.

From irrlicht changes.txt for 1.8.2, "IGUIStaticText::getTextHeight returns now the correct height for texts with newlines even WordWrap is not set."