From ba91624d8c354bac49c35a449029b6712022d0cb Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Mon, 30 Apr 2018 18:43:49 +0200 Subject: Allow damage for attached objects, add attach/detach callbacks (#6786) * Allow right-clicking on attached LuaEntities --- src/serverobject.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/serverobject.h') diff --git a/src/serverobject.h b/src/serverobject.h index 77b701464..ba205f6a5 100644 --- a/src/serverobject.h +++ b/src/serverobject.h @@ -165,6 +165,8 @@ public: {} virtual void getAttachment(int *parent_id, std::string *bone, v3f *position, v3f *rotation) {} + virtual void clearChildAttachments() {} + virtual void clearParentAttachment() {} virtual void addAttachmentChild(int child_id) {} virtual void removeAttachmentChild(int child_id) @@ -250,6 +252,9 @@ public: std::queue m_messages_out; protected: + virtual void onAttach(int parent_id) {} + virtual void onDetach(int parent_id) {} + // Used for creating objects based on type typedef ServerActiveObject* (*Factory) (ServerEnvironment *env, v3f pos, -- cgit v1.2.3