diff options
author | Brandon <brandon@bremaweb.com> | 2014-05-16 23:47:12 -0500 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-05-15 11:09:55 +0200 |
commit | c5b4e541749c50805519ce040d98a0a8e5e0ec03 (patch) | |
tree | bbc735720d6ac2e3b27c07c0b6d01ef586d61211 /src/script/cpp_api/s_player.h | |
parent | 86a963caca9604ad57904e9acd9bef7c46ca47d8 (diff) | |
download | minetest-c5b4e541749c50805519ce040d98a0a8e5e0ec03.tar.gz minetest-c5b4e541749c50805519ce040d98a0a8e5e0ec03.tar.bz2 minetest-c5b4e541749c50805519ce040d98a0a8e5e0ec03.zip |
Add minetest.register_on_punchplayer
Diffstat (limited to 'src/script/cpp_api/s_player.h')
-rw-r--r-- | src/script/cpp_api/s_player.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_player.h b/src/script/cpp_api/s_player.h index c77d397c4..a0f764cd5 100644 --- a/src/script/cpp_api/s_player.h +++ b/src/script/cpp_api/s_player.h @@ -23,7 +23,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <map> #include "cpp_api/s_base.h" +#include "irr_v3d.h" +struct ToolCapabilities; class ScriptApiPlayer : virtual public ScriptApiBase @@ -38,6 +40,9 @@ public: void on_joinplayer(ServerActiveObject *player); void on_leaveplayer(ServerActiveObject *player); void on_cheat(ServerActiveObject *player, const std::string &cheat_type); + bool on_punchplayer(ServerActiveObject *player, + ServerActiveObject *hitter, float time_from_last_punch, + const ToolCapabilities *toolcap, v3f dir, s16 damage); void on_playerReceiveFields(ServerActiveObject *player, const std::string &formname, |