Commit Graph

5404 Commits (3a74b84007f2c0f0690524459cc935616f8805d2)

Author SHA1 Message Date
Loic Blot 3a74b84007 Player::accelerateHorizontal/Vertical should be member of LocalPlayer 2016-02-14 17:52:10 +01:00
RealBadAngel cfc8e44759 Use proper variable types for uniform sampler layers 2016-02-14 10:01:30 +01:00
RealBadAngel c17c40a0f5 Formspec: fix broken irrlicht 1.7 build
Fixes #3701.
2016-02-13 22:19:01 +01:00
RealBadAngel 5ca48a35a6 Formspec: recreate item_image_button pressed state for its image and label 2016-02-13 02:35:52 +01:00
est31 bd43933828 Remove unused 'm_selection_active' field
Thanks @ExcaliburZero for noticing. Fixes #3698.
2016-02-13 01:46:12 +01:00
nerzhul fefa148d69 v2d & aabbox3d<f32> & sky cleanups
* Sky: rename Box => m_box and inline getBoundingBox
* Uniformize aabbox3d<f32> to aabb3f
2016-02-11 16:55:15 +01:00
Loic Blot 24b312cc08 Drop luaentity_common.h which is not included anywhere 2016-02-11 14:34:34 +01:00
RealBadAngel 9357294cfc Use single box for halo mesh 2016-02-11 13:11:25 +01:00
RealBadAngel c1044b9a4a Set proper GLSL pixel shader version 2016-02-11 09:47:25 +01:00
RealBadAngel f253ff9f1a Dump shader programs on compile errors 2016-02-11 07:13:07 +01:00
paramat 7e5eea9ad5 Documentation: Remove now unused 'vertical spawn range' 2016-02-11 04:23:26 +00:00
Diego Martinez 13dd7959db Initialize facedir and wallmounted tables only once.
This makes the functions a bit faster since they don't
have to recreate the tables every invocation, and makes
the code more readable.

Also, document `wallmounted_to_dir`.

The function was implemented but not documented in `lua_api.txt`.
2016-02-11 04:23:17 +00:00
Kahrl 0f03547b03 Log /clearobjects mode 2016-02-11 04:22:58 +00:00
Kahrl b1428ab4bb Add '/clearobjects quick' 2016-02-11 04:22:58 +00:00
Auke Kok 47464c9344 Fix backface culling when connecting to new servers.
Introduce a new contentfeatures version (8). When clients
connect using v27 protocol version, they can assume that
the tiledef.backface_culling is trustable, but if clients
connect to servers providing contentfeatures version 7,
then the v27 clients know that backface culling settings
provided by the server in tiledefs are bogus for mesh,
plantlike, firelike or liquid drawtype nodes.

thanks to hmmmm, est31, nerzhul.

Tested on new client - new server, new client - old server
old client - new server.
2016-02-10 00:10:51 +01:00
Loic Blot ba8fa9e889 Fix inverted conditions in shader.cpp 2016-02-09 23:50:37 +01:00
Loic Blot 4e3fe460e3 shader.cpp: don't test twice if shader programs are present
Also use string::empty method, it is better than comparing with empty strings.
2016-02-09 23:19:19 +01:00
RealBadAngel baa7c8f8ad FormSpec: Add StaticTextSpec and superimpose over item image buttons 2016-02-09 03:03:55 -05:00
RealBadAngel eb3840a3f8 Filmic HDR tone mapping 2016-02-09 02:55:59 -05:00
Kahrl 180893e79d Remove ClientMap::m_camera_mutex
All places that lock this mutex are only called by the main thread:
ClientMap::updateCamera(), ClientMap::updateDrawList(), ClientMap::renderMap(), ClientMap::renderPostFx().
2016-02-09 07:16:00 +00:00
paramat 4adbd69a37 FindSpawnPos: Let mapgens decide what spawn altitude is suitable
To avoid spawn search failing in new specialised mapgens
Increase spawn search range to 4000 nodes
Add getSpawnLevelAtPoint() functions to EmergeManager, class Mapgen
and all mapgens
Remove getGroundLevelAtPoint() functions from all mapgens except mgv6
(possibly to be re-added later in the correct form to return actual
ground level)
Make mgvalleys flag names consistent with other mapgens
Remove now unused 'vertical spawn range' setting
2016-02-09 07:14:45 +00:00
RealBadAngel 38e7122600 Use inventory_image in the first place for inventory item mesh 2016-02-08 23:13:19 +01:00
RealBadAngel b44da4916a Cleanup selection mesh code, add shaders for halo and selection boxes 2016-02-08 03:57:42 -05:00
Diego Martinez 430195381d builtin: Fix `print` crashing on nil "holes".
The engine implementation of `print` packs the varargs into a
table and passes the table directly to `table.concat`. If you
pass any value not supported by `table.concat` (particularly
`nil`), the server crashes. This is unexpected behavior, as
`print` is supposed to be able to work with anything.

This patch changes the implementation so it first converts
all arguments using `tostring`, which fixes the issue and
makes the custom `print` function compatible with the stock
Lua behavior.
2016-02-08 01:55:02 +01:00
est31 16c7008771 small drawItemStack cleanup
-> Replace the three bool params with an enum
-> Add struct for the static content, leads to less repetition
-> cache enable_animations setting
2016-02-08 00:35:24 +01:00
RealBadAngel 6cd2b3b445 Use meshes to display inventory items 2016-02-07 19:51:55 +01:00
RealBadAngel bf884e37a0 Use tangent space meshes only when shaders are enabled 2016-02-07 04:12:49 +00:00
Splizard 0e75eb4324 Add admin command which says who the administator is for the server. 2016-02-04 13:23:02 +01:00
Pavel Puchkin c4e0d95c87 Implement OSX Travis builds 2016-02-04 13:22:32 +01:00
Duane Robertson 99c905c563 Mgvalleys: fix riverbeds below sea level
Stop riverbeds from forming plateaus under sea. Minor corrections to
random lava/water placement.
2016-02-02 06:37:22 +00:00
paramat 0a8af88147 Mgv5/v7/flat/fractal: Move tunnel noise calculation into generateCaves
Tunnel 3D noises are only calculated when solid terrain is present
in mapchunk, avoiding large amounts of unnecessary calculations
Change 'int' to 's16' in calculateNoise
Change 'i' to 'vi' for voxelmanip indexes for consistency
Keep 'u32 index3d' local to a smaller part of tunnel code
Mgv7: Don't call CaveV7 if no solid terrain in mapchunk
Give 'open' bool a more descriptive name
2016-02-02 06:37:01 +00:00
Duane Robertson 80c7612e76 Mgvalleys: use standard caves
Replace simple caves with V5 caves, adding unpredictable water and lava
settings and massive caves based on subterrain. Remove fast terrain mode
and accompanying settings. Remove superfluous temperature/humidity
settings. Remove lava/water height setting. Fix errors in humidity
handling and remove humidity_break_point setting. Move cave noises to
generateCaves. Fix minor formatting/naming issues and use
MYMAX/MYMIN/myround.
2016-01-31 22:31:25 +00:00
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