mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow damage for attached objects, add attach/detach callbacks (#6786)
* Allow right-clicking on attached LuaEntities
This commit is contained in:
parent
0b5b32b026
commit
ba91624d8c
9 changed files with 136 additions and 78 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue