X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fscript%2Fcpp_api%2Fs_player.h;h=9b4611f9ec7b75848ab3cdb252936b18b98f7945;hb=772944daf69ab463568fbbf35a9011e4c8e6c44a;hp=663e3c2abc851c5281f7f52e1778072e0f6abae1;hpb=1dfc2e02b3c358af4bb20bb3cb60ac7bd3ed1124;p=dragonfireclient.git diff --git a/src/script/cpp_api/s_player.h b/src/script/cpp_api/s_player.h index 663e3c2ab..9b4611f9e 100644 --- a/src/script/cpp_api/s_player.h +++ b/src/script/cpp_api/s_player.h @@ -21,10 +21,12 @@ with this program; if not, write to the Free Software Foundation, Inc., #define S_PLAYER_H_ #include "cpp_api/s_base.h" +#include "irr_v3d.h" +#include "util/string.h" +struct ToolCapabilities; -class ScriptApiPlayer - : virtual public ScriptApiBase +class ScriptApiPlayer : virtual public ScriptApiBase { public: virtual ~ScriptApiPlayer(); @@ -32,13 +34,17 @@ class ScriptApiPlayer void on_newplayer(ServerActiveObject *player); void on_dieplayer(ServerActiveObject *player); bool on_respawnplayer(ServerActiveObject *player); + bool on_prejoinplayer(const std::string &name, const std::string &ip, + std::string *reason); void on_joinplayer(ServerActiveObject *player); - void on_leaveplayer(ServerActiveObject *player); - + void on_leaveplayer(ServerActiveObject *player, bool timeout); + 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); + s16 on_player_hpchange(ServerActiveObject *player, s16 hp_change); void on_playerReceiveFields(ServerActiveObject *player, - const std::string &formname, - const std::map &fields); + const std::string &formname, const StringMap &fields); }; - #endif /* S_PLAYER_H_ */