From f8d5af753617d502920556cff88f451ef670c210 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Mon, 16 Feb 2015 17:42:13 +0100 Subject: SAO work: ActiveObject types & SAO cleanup * Replace u8 types with ActiveObjectType. * Merge content_object.h into activeobject.h * Remove DummyLoadSAO, it's now unused. * Remove ItemSAO, it's also unused --- src/content_sao.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/content_sao.h') diff --git a/src/content_sao.h b/src/content_sao.h index 38baeab3a..05f727e16 100644 --- a/src/content_sao.h +++ b/src/content_sao.h @@ -21,14 +21,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #define CONTENT_SAO_HEADER #include "serverobject.h" -#include "content_object.h" #include "itemgroup.h" #include "player.h" #include "object_properties.h" -ServerActiveObject* createItemSAO(ServerEnvironment *env, v3f pos, - const std::string &itemstring); - /* LuaEntitySAO needs some internals exposed. */ @@ -39,9 +35,9 @@ public: LuaEntitySAO(ServerEnvironment *env, v3f pos, const std::string &name, const std::string &state); ~LuaEntitySAO(); - u8 getType() const + ActiveObjectType getType() const { return ACTIVEOBJECT_TYPE_LUAENTITY; } - u8 getSendType() const + ActiveObjectType getSendType() const { return ACTIVEOBJECT_TYPE_GENERIC; } virtual void addedToEnvironment(u32 dtime_s); static ServerActiveObject* create(ServerEnvironment *env, v3f pos, @@ -158,9 +154,9 @@ public: PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_, const std::set &privs, bool is_singleplayer); ~PlayerSAO(); - u8 getType() const + ActiveObjectType getType() const { return ACTIVEOBJECT_TYPE_PLAYER; } - u8 getSendType() const + ActiveObjectType getSendType() const { return ACTIVEOBJECT_TYPE_GENERIC; } std::string getDescription(); -- cgit v1.2.3