minetest/src/script
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
..
common Abort when trying to set a not registered node (#7011) 2019-03-07 08:31:25 +01:00
cpp_api Add node field to PlayerHPChangeReason table (#8368) 2019-04-11 20:45:39 +01:00
lua_api Force send a mapblock to a player (#8140) 2019-04-28 00:42:13 +01:00
CMakeLists.txt Rename Scripting API files for consistency 2017-04-25 13:41:36 -04:00
scripting_client.cpp Revert "Revert CSM particles commit to fix particle spawner bug for 5.0.0 (#8288)" 2019-02-26 08:53:53 +01:00
scripting_client.h Implement mod communication channels (#6351) 2017-09-26 00:11:20 +02:00
scripting_mainmenu.cpp Add online content repository 2018-04-19 20:14:53 +01:00
scripting_mainmenu.h C++ modernize: Pragma once (#6264) 2017-08-17 22:19:39 +02:00
scripting_server.cpp Replace auth.txt with SQLite auth database (#7279) 2018-08-05 13:13:38 +02:00
scripting_server.h Implement mod communication channels (#6351) 2017-09-26 00:11:20 +02:00