From: ANAND Date: Sat, 27 Apr 2019 12:35:28 +0000 (+0530) Subject: Better document behavior of on_punchplayer X-Git-Tag: 5.1.0~227 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e32a630937de69454c741e93979a7889fcddc7a9;p=oweals%2Fminetest.git Better document behavior of on_punchplayer Esp. the fact that it's invoked even if the punched player is dead --- diff --git a/doc/lua_api.txt b/doc/lua_api.txt index c75800cf4..f72b87625 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -3718,6 +3718,7 @@ Call these functions only at load time! * Called after a new player has been created * `minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage))` * Called when a player is punched + * Note: This callback is invoked even if the punched player is dead. * `player`: ObjectRef - Player that was punched * `hitter`: ObjectRef - Player that hit * `time_from_last_punch`: Meant for disallowing spamming of clicks