Commit Graph

5372 Commits

Author SHA1 Message Date
Pavel Puchkin 83583aa2d5 Fix OSX building issue caused by ad884f2 2016-01-29 10:54:50 -05:00
est31 4e93ba06a7 Don't pass non-const references to collision methods
Non const references cause a lot of confusion with behaviour of code,
and are disallowed by minetest style guide.
2016-01-29 15:53:54 +01:00
Auke Kok ad884f23d4 New timer design.
I could honestly not make much sense of the timer implementation
that was here. Instead I've implemented the type of timer algorithm
that I've used before, and tested it instead.

The concept is extremely simple: all timers are put in an ordered
list. We check every server tick if any of the timers have
elapsed, and execute the function associated with this timer.

We know that many timers by themselves cause new timers to be
added to this list, so we iterate *backwards* over the timer
list. This means that new timers being added while timers are
being executed, can never be executed in the same function pass,
as they are always appended to the table *after* the end of
the table, which we will never reach in the current pass over
all the table elements.

We switch time keeping to minetest.get_us_time(). dtime is
likely unreliable and we have our own high-res timer that we
can fix if it is indeed broken. This removes the need to do
any sort of time keeping.
2016-01-29 01:04:51 -05:00
Auke Kok 4ac1e9bccb Clocksource: use a better clock if available.
clock_gettime() is a far better clock than gettimeofday().

Even better than clock_gettime() is that you can select either
CLOCK_MONOTONIC, or even CLOCK_MONOTONIC_RAW. These clocks offer
high precision time. And the _RAW variant will never roll back
due to NTP drift or daylight savings, or otherwise.

I've adjusted this code to select the right clock method auto-
matically based on what's available in the OS. This means that
if you're running a very old linux version, MacOS or other,
you will automatically get the best clocksource available.

I've tested all Linux clocksources by selectively compiling and
running a 10k+ timer test suite. In all cases I confirmed that
the 3 POSIX Linux clocksources worked properly, and were
selected properly.

I've modified the OS X compile path to use the high-res clock
source for all time functions, but I can't confirm it works or
that it compiles.

As for WIN32, I confirmed that the used clocksource is indeed
a Monotonic clocksource, so good news: that code section appears
to be exactly what it should be.
2016-01-29 00:58:08 -05:00
est31 860d70bd0e Don't print whole json data buffer to errorstream on error
`errorstream` must not be overly verbose as clientside it is directly printed
onto the ingame chat window. These days, the serverlist can contain > 200k bytes,
so better print it to warningstream if the data buffer is too long.
2016-01-28 23:53:58 +01:00
Paolo DGZ e52ebda8b2 Translated using Weblate (Italian)
Currently translated at 52.0% (410 of 787 strings)
2016-01-25 05:53:09 +01:00
Kisbenedek Márton 0097e0308d Translated using Weblate (Hungarian)
Currently translated at 32.4% (255 of 787 strings)
2016-01-25 05:53:09 +01:00
Tobyplowy c07a242d8b Translated using Weblate (Dutch)
Currently translated at 95.5% (752 of 787 strings)
2016-01-25 05:53:09 +01:00
Ian giestas pauli d0d7122c00 Translated using Weblate (Portuguese (Brazil))
Currently translated at 41.6% (328 of 787 strings)
2016-01-25 05:53:09 +01:00
Ian giestas pauli e24de58b4d Translated using Weblate (Portuguese (Brazil))
Currently translated at 26.6% (210 of 787 strings)
2016-01-25 05:53:09 +01:00
Ian giestas pauli e3e75a43db Translated using Weblate (Portuguese)
Currently translated at 23.6% (186 of 787 strings)
2016-01-25 05:53:09 +01:00
Rui 42dc568f16 Translated using Weblate (Japanese)
Currently translated at 43.4% (342 of 787 strings)
2016-01-25 05:53:09 +01:00
Rui d486ca064c Translated using Weblate (Japanese)
Currently translated at 42.0% (331 of 787 strings)
2016-01-25 05:53:09 +01:00
Peter Mikkelsen 1bd48e4298 Translated using Weblate (Danish)
Currently translated at 30.1% (237 of 787 strings)
2016-01-25 05:53:09 +01:00
Jun Zhang 73838a982f Translated using Weblate (Chinese (China))
Currently translated at 34.8% (274 of 787 strings)
2016-01-25 05:53:09 +01:00
Diego Martinez a594963a7d Fix world config menu ignoring `name` in `mod.conf`. 2016-01-23 21:14:14 -05:00
Auke Kok 735e3b7059 Backface culling: Ignore setting in tiledef from old servers.
Outdated servers are always sending tiledefs with culling
enabled no matter what, as the value was previously entirely
ignored.

To compensate, we must (1) detect that we're running against
an old server with a new client, and (2) disable culling for
mesh, plantlike, firelike and liquid draw types no matter what
the server is telling us.

In order to achieve this, we need to bump the protocol version
since we cannot rely on the tiledef version, and test for it
being older. I've bumped the protocol version, although that
should have likely happened in the actual change that introduced
the new backface_culling PR #3578. Fortunately that's only 2
commits back at this point.

We also explicitly test for the drawtype to assure we are not
changing the culling value for other nodes, where it should
remain enabled.

This was tested against various pub servers, including 0.4.13 and
0.4.12.

Fixes #3598
2016-01-23 16:33:24 +01:00
est31 ef779b0ab6 Fix compilation warning if compiling for android with c++11 2016-01-23 06:26:58 +01:00
RealBadAngel 52eea79928 Fix texture tear issue 2016-01-23 06:01:57 +01:00
est31 e50c784e2c Fix C++11 compilability
Previous commits broke it... :(
2016-01-23 05:45:29 +01:00
paramat 0459eca8eb Liquid flow: Prevent water spreading on ignore 2016-01-20 00:37:00 +00:00
Auke Kok 882a89d65a Allow per-tiles culling.
Backface culling is enabled by default for all tiles, as this
is how the lua parser initializes each tiledef. We revert to
always using the value from the tiledef since it is always
read and serialized.

Mods that wish to enable culling for e.g. mesh nodes, now can
specify the following to enable backface culling:

    tiles = {{ name = "tex.png", backface_culling = true }},

Note the double '{' and use of 'name' key here! In the same
fashion, backface_culling can be disabled for any node now.

I've tested this against the new door models and this properly
allows me to disable culling per node. I've also tested this
against my crops mod which uses mesh nodes where culling needs
to be disabled, and tested also with plantlike drawtype nodes
where we want this to continue to be disabled.

No default setting has changed. The defaults are just migrated
from nodedef.cpp to c_content.cpp.
2016-01-20 00:36:48 +00:00
kwolekr 9f988e3b96 EmergeManager: Do not queue duplicate block requests 2016-01-19 04:18:06 -05:00
Kahrl b67eab3b00 Fix Settings::remove() always returning true 2016-01-19 10:15:01 +01:00
RealBadAngel 87291ea44a Show infotext with description for item entities 2016-01-18 17:21:41 +00:00
Duane Robertson eb6e2c11b1 Correct overflowing rivers in Valleys mapgen. 2016-01-18 17:21:13 +00:00
RealBadAngel 13e7589fec Fix wield item glitch 2016-01-18 17:20:53 +00:00
Pinky Snow 22bc66d3a7 corrected minetest.pos_to_string()
corrected this bit reflect the function properly.
2016-01-16 13:06:41 +00:00
Rogier 487ab593d0 Fix error message in settings tab overlapping 'save' button
The save button is now fully functional again when an error message
is shown.

After an invalid value is entered in the settings tab dialog, the GUI
label for the error message that is shown was partly overlapping the
'save' button, so that the top half of the button could not be clicked
on.
2016-01-16 13:05:46 +00:00
Duane Robertson 752d820206 Prevent spawning in rivers with valleys mapgen. Remove unecessary whitespace. 2016-01-16 13:05:03 +00:00
sfan5 a58c0f458d Make ItemStack:set_count(0) clear the item stack
fixes minetest/minetest_game#786
2016-01-15 13:44:45 +01:00
Kahrl da686160c3 Make all mesh manipulators in mesh.cpp work with any vertex type
cloneMesh() has to use a switch in order to create a different
mesh buffer type depending on vertex type. (Credit: the new cloneMesh
was written by RealBadAngel.)

To avoid repetitive code, all other methods use getVertexPitchFromType()
to automatically adapt the indexing to the vertex type at runtime.
2016-01-15 04:18:32 +01:00
Duane Robertson 3c6b2ffb10 Add Valleys mapgen. 2016-01-14 05:04:29 +00:00
paramat b4cbcaea26 Mgv7/flat/fractal: Place biome top node on tunnel entrance floor 2016-01-14 04:43:50 +00:00
paramat 8fc8cb819b Mapgen: Various fixes and improvements
Lua_api.txt: Document 'minetest.registered_biomes'
Minimal: Remove 'mapgen_air' alias
Cavegen: Add fallback node for 'mapgen_ice'
Dungeongen: Add fallback node for 'mapgen_river_water_source'
Mgv5: Remove unnecessary '#include util/directiontables.h'
Add missing 'this->'s in makeChunk()
Mgv6: Edit empty line formatting
Remove leading spaces in makeChunk()
Add missing spaces after 'for' and 'if'
Mgv7: Edit empty line formatting
2016-01-11 01:32:20 +00:00
paramat 3e0ea3c6ed Mgflat: Set blank default spflags. Unhide 2016-01-10 04:07:47 +00:00
Rogier 31ac53dfd0 Fix the checking of flags values in the settings tab
Changes:
- Accept setting an empty flags-type value in the settings tab
  if the variable specification permits it
- Don't accept substrings of flag values
  E.g. with values: 'one,two,three', 'hree', 'w', etc. used to
  be accepted. Not any more
- Don't accept flags with random pattern-matching special characters
  E.g. with values: 'one,two,three', 'on.', '(o)[n]e*' etc. used
  to be accepted. Not any more.
2016-01-10 01:03:06 +00:00
Rogier 58babf8b19 Improve parsing of setting types from settingtypes.txt for settings tab
- Accept numbers prefixed with '+'
- Accept multiple spaces instead of just a single one where spaces are expected
- Allow flags to have an empty default value
2016-01-10 01:03:06 +00:00
ASL97 106d4b7d05 Cache disable_anticheat and check it for "interacted_too_far" 2016-01-09 16:24:22 -05:00
ShadowNinja 711808343d Actually add Doxygen main page
I apparently forgot to add this file in my previous commit (bd40ee2b95).
2016-01-09 15:11:43 -05:00
Dalai Felinto 9943ae3f1a New 3D Mode: Pageflip
The pageflip mode requires a stereo quadbuffer, and a modern graphic
card. Patch tested with NVidia 3D Vision.

The mini-map is not drawn, but that's what is done for topbottom and
sidebyside modes as well.

Also most of the time the user would prefer the HUD to be off. That's
for the user to decide though, and toggle it manually.

Finally, the interocular distance (aka eye separation) is twice as much
as the "3d_paralax_strength" settings. I find this a strange design
decision. I didn't want to chance this though, since it's how the other
3d modes interpret this settings.
2016-01-09 16:52:29 +01:00
Pavel Puchkin fe3f6be4d2 Simplify custom games packaging 2016-01-09 16:50:04 +01:00
sfan5 7510e0b551 Fix screenshot links in AppData file 2016-01-09 16:13:37 +01:00
Pinky Snow 2800ff0660 fixed spelling
Fixed spelling mistake!
2016-01-09 02:29:07 +00:00
gregorycu 9c77725653 Replace instance of readsome with read in decompressZlib Make decompressZlib more robust 2016-01-09 02:28:35 +00:00
Robert Zenz 386d190e09 Clarified what get_node does. 2016-01-09 01:07:03 +00:00
slemonide 95c1b66722 Update lua_api.txt
set_sky does work with on_joinplayer
2016-01-09 01:06:45 +00:00
est31 57a461930b Fix redis error reporting
Previously, we assumed that reply->str was NULL
terminated. However, this turned out to be not true,
as users reported crashes in strlen connected to
where reply->str was appended to an std::string.

Use the method recomended by the docs, to read the
length separately.
2016-01-08 15:37:11 +01:00
paramat 0bbbc6e13d Liquids: Flow into and destroy 'floodable' nodes
Add new node property 'floodable', default false
Define "air" as floodable = true in C++ and lua
2016-01-07 05:57:19 +00:00
ShadowNinja bd40ee2b95 Improve Doxyfile
* Add main page.
* Organize into sections.
* Add threading sources.
* Include SpatialAreaStore, LevelDB/Redis, sound, FreeType, and cURL in output.
* Add logo.
* Fix project name hardcoding.
* Remove PAPER_TYPE (only used when GENERATE_LATEX is enabled).
* Have dot render graphs as SVG (smaller, and works even if dot's text drawing functionality is broken).
* Enable built-in STL support.
* Enable search bar.
* Switch from header-bar based navigation to treeview based navigation.
* Enable dynamic HTML (collapses graphs).
* Enable generation timestamp.
2016-01-04 11:32:03 -05:00