1
0
mirror of https://github.com/luanti-org/luanti.git synced 2026-01-01 02:45:19 +01:00

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

This commit is contained in:
Loic Blot
2015-02-16 17:42:13 +01:00
parent 98d80e2012
commit f8d5af7536
9 changed files with 20 additions and 315 deletions

View File

@@ -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<std::string> &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();