Better document behavior of on_punchplayer

Esp. the fact that it's invoked even if the punched player is dead
This commit is contained in:
ANAND 2019-04-27 18:05:28 +05:30 committed by sfan5
parent c4578aefe7
commit e32a630937

@ -3718,6 +3718,7 @@ Call these functions only at load time!
* Called after a new player has been created * Called after a new player has been created
* `minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage))` * `minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage))`
* Called when a player is punched * Called when a player is punched
* Note: This callback is invoked even if the punched player is dead.
* `player`: ObjectRef - Player that was punched * `player`: ObjectRef - Player that was punched
* `hitter`: ObjectRef - Player that hit * `hitter`: ObjectRef - Player that hit
* `time_from_last_punch`: Meant for disallowing spamming of clicks * `time_from_last_punch`: Meant for disallowing spamming of clicks