mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-24 13:25:21 +02:00
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user