minetest/src/script/lua_api
sofar b839a6dd54 Force send a mapblock to a player (#8140)
* Force send a mapblock to a player.

Send a single mapblock to a specific remote player.

This is badly needed for mods and games where players are teleported
into terrain which may be not generated, loaded, or modified
significantly since the last player visit.

In all these cases, the player currently ends up in void, air, or
inside blocks which not only looks bad, but has the effect that the
player might end up falling and then the server needs to correct for
the player position again later, which is a hack.

The best solution is to send at least the single mapblock that the
player will be teleported to. I've tested this with ITB which does this
all the time, and I can see it functioning as expected (it even shows
a half loaded entry hallway, as the further blocks aren't loaded yet).

The parameter is a blockpos (table of x, y, z), not a regular pos.

The function may return false if the call failed. This is most likely
due to the target position not being generated or emerged yet, or
another internal failure, such as the player not being initialized.

* Always send mapblock on teleport or respawn.

This avoids the need for mods to send a mapblock on teleport or
respawn, since any call to `player:set_pos()` will pass this code.
2019-04-28 00:42:13 +01:00
..
CMakeLists.txt Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)" 2019-02-26 08:53:53 +01:00
l_areastore.cpp Modernize lua read (part 2 & 3): C++ templating assurance (#7410) 2018-06-30 17:11:38 +02:00
l_areastore.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
l_auth.cpp Replace auth.txt with SQLite auth database (#7279) 2018-08-05 13:13:38 +02:00
l_auth.h Replace auth.txt with SQLite auth database (#7279) 2018-08-05 13:13:38 +02:00
l_base.cpp markAliasDeprecated: Fix MSVC build 2018-09-11 19:32:10 +02:00
l_base.h Log deprecated Lua function calls (#7491) 2018-07-01 12:31:49 +02:00
l_camera.cpp Move client-specific files to 'src/client' (#7902) 2018-11-28 20:01:49 +01:00
l_camera.h Code modernization: subfolders (#6283) 2017-08-19 22:23:47 +02:00
l_client.cpp CSM: add requested CSM_RF_READ_PLAYERINFO (#8007) 2018-12-24 10:51:10 +01:00
l_client.h CSM: Remove screenshot API 2018-01-23 05:27:38 +00:00
l_craft.cpp clear_craft: Return false if recipe not found, don't throw error (#7804) 2018-10-24 15:03:21 +01:00
l_craft.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
l_env.cpp Add minetest.load_area (#8023) 2018-12-31 00:32:54 +00:00
l_env.h Add minetest.load_area (#8023) 2018-12-31 00:32:54 +00:00
l_http.cpp Modernize lua read (part 2 & 3): C++ templating assurance (#7410) 2018-06-30 17:11:38 +02:00
l_http.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
l_internal.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
l_inventory.cpp Add core.remove_detached_inventory (#7684) 2018-10-10 20:48:58 +02:00
l_inventory.h Add core.remove_detached_inventory (#7684) 2018-10-10 20:48:58 +02:00
l_item.cpp Modernize lua read (part 2 & 3): C++ templating assurance (#7410) 2018-06-30 17:11:38 +02:00
l_item.h Code modernization: subfolders (#6283) 2017-08-19 22:23:47 +02:00
l_itemstackmeta.cpp Send only changed node metadata to clients instead of whole mapblock (#5268) 2018-12-04 20:37:48 +01:00
l_itemstackmeta.h Send only changed node metadata to clients instead of whole mapblock (#5268) 2018-12-04 20:37:48 +01:00
l_localplayer.cpp Move client-specific files to 'src/client' (#7902) 2018-11-28 20:01:49 +01:00
l_localplayer.h [CSM] Add basic HUD manipulation. (#6067) 2018-01-20 14:09:58 +01:00
l_mainmenu.cpp Hide uninstall package button on unmodifiable paths (#8255) 2019-03-05 08:12:58 +01:00
l_mainmenu.h Hide uninstall package button on unmodifiable paths (#8255) 2019-03-05 08:12:58 +01:00
l_mapgen.cpp Fix various bugs (Anticheat, Lua helpers) (#8013) 2019-01-06 10:24:44 +01:00
l_mapgen.h Biome API: Add 'get_biome_name(biome_id)' API 2018-03-11 23:06:17 +00:00
l_metadata.cpp Send only changed node metadata to clients instead of whole mapblock (#5268) 2018-12-04 20:37:48 +01:00
l_metadata.h Send only changed node metadata to clients instead of whole mapblock (#5268) 2018-12-04 20:37:48 +01:00
l_minimap.cpp Move client-specific files to 'src/client' (#7902) 2018-11-28 20:01:49 +01:00
l_minimap.h Code modernization: subfolders (#6283) 2017-08-19 22:23:47 +02:00
l_modchannels.cpp Fix mod channels crash (#7481) 2018-06-27 17:45:40 +02:00
l_modchannels.h Fix mod channels crash (#7481) 2018-06-27 17:45:40 +02:00
l_nodemeta.cpp Send only changed node metadata to clients instead of whole mapblock (#5268) 2018-12-04 20:37:48 +01:00
l_nodemeta.h Send only changed node metadata to clients instead of whole mapblock (#5268) 2018-12-04 20:37:48 +01:00
l_nodetimer.cpp Modernize lua read (part 1): C++ templating insurance (#7394) 2018-06-04 22:38:07 +02:00
l_nodetimer.h Code modernization: subfolders (#6283) 2017-08-19 22:23:47 +02:00
l_noise.cpp Lua templating reading (part 4): s16, v2s16, v2f (#7512) 2018-07-08 23:06:33 +02:00
l_noise.h Log deprecated Lua function calls (#7491) 2018-07-01 12:31:49 +02:00
l_object.cpp Force send a mapblock to a player (#8140) 2019-04-28 00:42:13 +01:00
l_object.h Force send a mapblock to a player (#8140) 2019-04-28 00:42:13 +01:00
l_particles_local.cpp Fix particle spawners not visible since CSM spawner implementation (#8289) 2019-03-01 20:16:11 +01:00
l_particles_local.h Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)" 2019-02-26 08:53:53 +01:00
l_particles.cpp Move client-specific files to 'src/client' (#7902) 2018-11-28 20:01:49 +01:00
l_particles.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
l_playermeta.cpp reportMetadataChange; Silence clang warnings 2018-12-21 19:05:29 +01:00
l_playermeta.h reportMetadataChange; Silence clang warnings 2018-12-21 19:05:29 +01:00
l_rollback.cpp SAPI: Mark all Lua API functions requiring envlock 2015-10-25 23:06:48 -04:00
l_rollback.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
l_server.cpp Modernize lua read (part 2 & 3): C++ templating assurance (#7410) 2018-06-30 17:11:38 +02:00
l_server.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
l_settings.cpp Modernize lua read (part 2 & 3): C++ templating assurance (#7410) 2018-06-30 17:11:38 +02:00
l_settings.h Improvements/fixes for noise parameter input in advanced settings 2017-10-23 01:28:13 +01:00
l_sound.cpp Modernize lua read (part 2 & 3): C++ templating assurance (#7410) 2018-06-30 17:11:38 +02:00
l_sound.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
l_storage.cpp Modernize lua read (part 2 & 3): C++ templating assurance (#7410) 2018-06-30 17:11:38 +02:00
l_storage.h Fix memory leaks in mod storage (#7500) 2018-06-30 17:11:04 +02:00
l_util.cpp Modernize lua read (part 2 & 3): C++ templating assurance (#7410) 2018-06-30 17:11:38 +02:00
l_util.h Fix isNan on setYaw Lua call (#7380) 2018-05-31 22:52:08 +02:00
l_vmanip.cpp LuaVoxelManip: Throw warning or error instead of silently doing nothing (#7567) 2018-08-02 19:54:44 +01:00
l_vmanip.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00