summaryrefslogtreecommitdiff
path: root/src/serverobject.h
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2018-04-30 18:43:49 +0200
committerGitHub <noreply@github.com>2018-04-30 18:43:49 +0200
commitba91624d8c354bac49c35a449029b6712022d0cb (patch)
tree8a6423ab354888691927f852754f86816f9c90c5 /src/serverobject.h
parent0b5b32b026291d5bd8e47acebca10259a379fc1c (diff)
downloadminetest-ba91624d8c354bac49c35a449029b6712022d0cb.tar.gz
minetest-ba91624d8c354bac49c35a449029b6712022d0cb.tar.bz2
minetest-ba91624d8c354bac49c35a449029b6712022d0cb.zip
Allow damage for attached objects, add attach/detach callbacks (#6786)
* Allow right-clicking on attached LuaEntities
Diffstat (limited to 'src/serverobject.h')
-rw-r--r--src/serverobject.h5
1 files changed, 5 insertions, 0 deletions
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<ActiveObjectMessage> 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,