6675 Commits

Author SHA1 Message Date
paramat
6485df01f1 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
2016-02-23 23:51:29 +00:00
nerzhul
62fb95a95a GOTBLOCKS & DELETEBLOCKS: test packet size only once 2016-02-23 14:24:21 +01:00
est31
afcf1a41d8 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.
2016-02-23 01:48:52 +01:00
orwell96
9841e2887b 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.
2016-02-22 19:59:56 +01:00
est31
3768c36612 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
2016-02-22 17:46:16 +01:00
RealBadAngel
772a0dec04 Fix getting pointed node
Fixes #3719
Closes #3753
2016-02-22 15:54:32 +01:00
Jeija
6128dc7a07 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.
2016-02-22 15:39:41 +01:00
Jeija
88819c1689 Fix HTTPFetchRequest performing a GET request if post_data is supplied
Instead, perform a POST request with post_data.
2016-02-22 15:39:19 +01:00
RealBadAngel
e9ccb7fe8e Camera: remove auto tune FPS, single view range setting 2016-02-21 18:18:13 +01:00
RealBadAngel
226be7bc32 Remove preload_item_visuals code
Closes #3748
2016-02-21 17:46:50 +01:00
RealBadAngel
332caea9ee Dont make fastface if tile is not seamless
Fixes #3378
Closes #3751
2016-02-21 17:30:16 +01:00
BlockMen
5e0a7cd4eb Restore simple settings tab and add advanced settings as dialog 2016-02-21 08:54:33 +00:00
Loic Blot
47207a8b9c Little collision.cpp cleanups 2016-02-20 09:44:22 +01:00
gregorycu
ac351b2cc4 Fix jumping at node edge 2016-02-19 20:05:58 -05:00
ShadowNinja
67dffbeb9b Don't print locale directory error message when GetText is disabled
Also, downgrade the error to a warning.
2016-02-19 19:56:34 -05:00
Jeija
194c9518ee Ignore spaces in secure.trusted_mods setting 2016-02-19 18:50:42 -05:00
RealBadAngel
71693bd291 Minimap: show player markers 2016-02-19 21:31:22 +01:00
RealBadAngel
14bc09be93 Camera: Don't count camera offset twice for Nametagged CAOs 2016-02-19 14:52:19 +00:00
ShadowNinja
6cf6c8f25d 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
2016-02-19 14:52:10 +00:00
paramat
e2f3483b63 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()
2016-02-19 14:51:41 +00:00
RealBadAngel
5db94b19db HOTFIX: fix too agressive block culling 2016-02-18 18:07:28 +01:00
RealBadAngel
e0f29ab7d3 Move object nametags to camera 2016-02-18 16:43:29 +01:00
est31
7c6d8d825b 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.
2016-02-16 23:58:30 +01:00
RealBadAngel
e5b8705729 Mapblock mesh: Eliminate meshgen lags 2016-02-16 08:23:32 +00:00
RealBadAngel
26e91b396d Use vertices with tangents only when its needed. 2016-02-15 06:05:39 +00:00
Loic Blot
5ea636d82b Player::accelerateHorizontal/Vertical should be member of LocalPlayer 2016-02-14 17:52:10 +01:00
RealBadAngel
91987ad890 Use proper variable types for uniform sampler layers 2016-02-14 10:01:30 +01:00
RealBadAngel
c2cb6bc900 Formspec: fix broken irrlicht 1.7 build
Fixes #3701.
2016-02-13 22:19:01 +01:00
RealBadAngel
7ffa4bfd79 Formspec: recreate item_image_button pressed state for its image and label 2016-02-13 02:35:52 +01:00
est31
f14e1dc952 Remove unused 'm_selection_active' field
Thanks @ExcaliburZero for noticing. Fixes #3698.
2016-02-13 01:46:12 +01:00
nerzhul
c4bf66116d 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
1c89db2da1 Drop luaentity_common.h which is not included anywhere 2016-02-11 14:34:34 +01:00
RealBadAngel
786beec51b Use single box for halo mesh 2016-02-11 13:11:25 +01:00
RealBadAngel
0571768c30 Set proper GLSL pixel shader version 2016-02-11 09:47:25 +01:00
RealBadAngel
8a15583fd7 Dump shader programs on compile errors 2016-02-11 07:13:07 +01:00
paramat
2c3b7ea73c Documentation: Remove now unused 'vertical spawn range' 2016-02-11 04:23:26 +00:00
Diego Martinez
5c79a36617 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
c1946cc258 Log /clearobjects mode 2016-02-11 04:22:58 +00:00
Kahrl
02cbda530b Add '/clearobjects quick' 2016-02-11 04:22:58 +00:00
Auke Kok
2170a1fae6 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
79e6d472b3 Fix inverted conditions in shader.cpp 2016-02-09 23:50:37 +01:00
Loic Blot
0c383ed270 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
15ccf9b85c FormSpec: Add StaticTextSpec and superimpose over item image buttons 2016-02-09 03:03:55 -05:00
RealBadAngel
ead025fb02 Filmic HDR tone mapping 2016-02-09 02:55:59 -05:00
Kahrl
30dd28fc18 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
2a92bccd00 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
d396cebf35 Use inventory_image in the first place for inventory item mesh 2016-02-08 23:13:19 +01:00
RealBadAngel
8b602bba0f Cleanup selection mesh code, add shaders for halo and selection boxes 2016-02-08 03:57:42 -05:00
Diego Martinez
e877590dec 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
3bb1d941ad 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