summaryrefslogtreecommitdiff
path: root/src/game-server/actor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/actor.h')
-rw-r--r--src/game-server/actor.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/game-server/actor.h b/src/game-server/actor.h
index 83b2c0fe..2950d512 100644
--- a/src/game-server/actor.h
+++ b/src/game-server/actor.h
@@ -45,20 +45,17 @@ enum
* Generic client-visible object. Keeps track of position, size and what to
* update clients about.
*/
-class Actor : public Entity
+class ActorComponent : public Component
{
public:
- Actor(EntityType type)
- : Entity(type),
- mMoveTime(0),
- mUpdateFlags(0),
- mPublicID(65535),
- mSize(0),
- mWalkMask(0),
- mBlockType(BLOCKTYPE_NONE)
+ static const ComponentType type = CT_Actor;
+
+ ActorComponent(Entity &entity);
+
+ void update(Entity &entity)
{}
- ~Actor();
+ void removed(Entity *entity);
/**
* Sets the coordinates. Also updates the walkmap of the map the actor
@@ -66,7 +63,7 @@ class Actor : public Entity
*
* @param p the coordinates.
*/
- void setPosition(const Point &p);
+ void setPosition(Entity &entity, const Point &p);
/**
* Gets the coordinates.
@@ -138,7 +135,7 @@ class Actor : public Entity
/**
* Overridden in order to update the walkmap.
*/
- virtual void setMap(MapComposite *map);
+ virtual void mapChanged(Entity *entity);
protected: