summaryrefslogtreecommitdiff
path: root/src/content_sao.cpp
diff options
context:
space:
mode:
authorsapier <sapier at gmx dot net>2012-02-07 21:37:42 +0100
committersapier <sapier at gmx dot net>2012-02-07 21:37:42 +0100
commit52996cd5eb8939686b8a3eb9f075043c67d1355c (patch)
tree1489a64b177f77020de9510ff5568bda885ffb20 /src/content_sao.cpp
parent61ae136431bebd88796ea0789842611a36b7c424 (diff)
downloadminetest-sapier-20120207.tar.xz
maualy merged object linking interface from cao_sao_split patchsapier-20120207
Diffstat (limited to 'src/content_sao.cpp')
-rw-r--r--src/content_sao.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/content_sao.cpp b/src/content_sao.cpp
index 6c1b4c05b..d9bc80744 100644
--- a/src/content_sao.cpp
+++ b/src/content_sao.cpp
@@ -1852,3 +1852,24 @@ aabb3f* LuaEntitySAO::getCollisionBox() {
return NULL;
}
+bool LuaEntitySAO::sendLinkMsg(ServerActiveObject* parent,v3f offset) {
+ std::ostringstream os(std::ios::binary);
+ writeU8(os, 3);
+ // parameters
+ writeU16(os, parent->getId());
+ writeV3F1000(os, offset);
+ // create message and add to list
+ ActiveObjectMessage aom(getId(), false, os.str());
+ m_messages_out.push_back(aom);
+ return true;
+}
+
+bool LuaEntitySAO::sendUnlinkMsg() {
+ std::ostringstream os(std::ios::binary);
+ writeU8(os, 4);
+ // create message and add to list
+ ActiveObjectMessage aom(getId(), false, os.str());
+ m_messages_out.push_back(aom);
+ return true;
+}
+