1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add reasons to on_dieplayer and on_hpchange

This commit is contained in:
Andrew Ward 2018-03-28 16:05:18 +01:00 committed by GitHub
parent 2323842dd3
commit dfc8198349
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 219 additions and 52 deletions

View file

@ -46,6 +46,7 @@ class ServerEnvironment;
struct ItemStack;
struct ToolCapabilities;
struct ObjectProperties;
struct PlayerHPChangeReason;
class ServerActiveObject : public ActiveObject
{
@ -139,7 +140,7 @@ public:
{ return 0; }
virtual void rightClick(ServerActiveObject *clicker)
{}
virtual void setHP(s16 hp)
virtual void setHP(s16 hp, const PlayerHPChangeReason &reason)
{}
virtual s16 getHP() const
{ return 0; }