Added EntitySpeed

This commit is contained in:
Elias Fleckenstein
2020-07-20 16:43:11 +02:00
parent 5a8610c2f4
commit 064c25caa1
13 changed files with 100 additions and 53 deletions

View File

@@ -472,13 +472,14 @@ void GenericCAO::setAttachment(int parent_id, const std::string &bone, v3f posit
ClientActiveObject *parent = m_env->getActiveObject(parent_id);
if (parent_id != old_parent) {
if (old_parent)
m_waiting_for_reattach = 10;
if (auto *o = m_env->getActiveObject(old_parent))
o->removeAttachmentChild(m_id);
if (parent)
parent->addAttachmentChild(m_id);
}
updateAttachments();
}