Better document behavior of on_punchplayer
authorANAND <ClobberXD@gmail.com>
Sat, 27 Apr 2019 12:35:28 +0000 (18:05 +0530)
committersfan5 <sfan5@live.de>
Mon, 29 Apr 2019 12:08:34 +0000 (14:08 +0200)
Esp. the fact that it's invoked even if the punched player is dead

doc/lua_api.txt

index c75800cf423dfd5cfbf9de74e5c6d2cfcebf80fe..f72b87625b9c90768645808776a03ae3691a5de1 100644 (file)
@@ -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