summaryrefslogtreecommitdiff
path: root/src/serverobject.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2020-04-10 19:49:20 +0200
committerGitHub <noreply@github.com>2020-04-10 19:49:20 +0200
commitf648fb76aef96a1da608c64346fc65d4dd44caa8 (patch)
tree5f46a0d40742c7ae3e81f58728a702c8f3d6035e /src/serverobject.h
parent2349d31bae1bfc4d58fd88efbc88261e69b11dad (diff)
downloadminetest-f648fb76aef96a1da608c64346fc65d4dd44caa8.tar.gz
minetest-f648fb76aef96a1da608c64346fc65d4dd44caa8.tar.bz2
minetest-f648fb76aef96a1da608c64346fc65d4dd44caa8.zip
Drop genericobject.{cpp,h} (#9629)
* Drop genericobject.{cpp,h} This file is not for generic object but for ActiveObject message passing. Put ownership of the various commands to the right objects and cleanup the related code. * Protect ServerActiveObject::m_messages_out * typo fix
Diffstat (limited to 'src/serverobject.h')
-rw-r--r--src/serverobject.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/serverobject.h b/src/serverobject.h
index 48689fcb4..2e013a6b6 100644
--- a/src/serverobject.h
+++ b/src/serverobject.h
@@ -113,7 +113,7 @@ public:
The return value of this is passed to the client-side object
when it is created
*/
- virtual std::string getClientInitializationData(u16 protocol_version){return "";}
+ virtual std::string getClientInitializationData(u16 protocol_version) {return "";}
/*
The return value of this is passed to the server-side object
@@ -192,6 +192,10 @@ public:
m_attached_particle_spawners.erase(id);
}
+ std::string generateUpdateInfantCommand(u16 infant_id, u16 protocol_version);
+ std::string generateUpdateNametagAttributesCommand(const video::SColor &color) const;
+
+ void dumpAOMessagesToQueue(std::queue<ActiveObjectMessage> &queue);
/*
Number of players which know about this object. Object won't be
@@ -236,11 +240,6 @@ public:
*/
v3s16 m_static_block = v3s16(1337,1337,1337);
- /*
- Queue of messages to be sent to the client
- */
- std::queue<ActiveObjectMessage> m_messages_out;
-
protected:
virtual void onAttach(int parent_id) {}
virtual void onDetach(int parent_id) {}
@@ -255,6 +254,11 @@ protected:
v3f m_base_position;
std::unordered_set<u32> m_attached_particle_spawners;
+ /*
+ Queue of messages to be sent to the client
+ */
+ std::queue<ActiveObjectMessage> m_messages_out;
+
private:
// Used for creating objects based on type
static std::map<u16, Factory> m_types;