-
-#include "serverobject.h"
-#include "content_object.h" // Object type IDs
-
-class ServerRemotePlayer : public Player, public ServerActiveObject
-{
-public:
- ServerRemotePlayer():
- ServerActiveObject(NULL, v3f(0,0,0))
- {
- }
- ServerRemotePlayer(ServerEnvironment *env, v3f pos_, u16 peer_id_,
- const char *name_):
- ServerActiveObject(env, pos_)
- {
- setPosition(pos_);
- peer_id = peer_id_;
- updateName(name_);
- }
- virtual ~ServerRemotePlayer()
- {
- }
-
- virtual bool isLocal() const
- {
- return false;
- }
-
- virtual void move(f32 dtime, Map &map, f32 pos_max_d)
- {
- }
-
- virtual void setPosition(const v3f &position)
- {
- Player::setPosition(position);
- ServerActiveObject::setBasePosition(position);
- }
-
- /* ServerActiveObject interface */
-
- u8 getType() const
- {return ACTIVEOBJECT_TYPE_PLAYER;}
- virtual std::string getDescription(){return getName();}
- // Returns a reference
- virtual InventoryItem* getWieldedItem();
- virtual void damageWieldedItem(u16 amount);
- // If all fits, eats item and returns true. Otherwise returns false.
- virtual bool addToInventory(InventoryItem *item);
- virtual void setHP(s16 hp_);
- virtual s16 getHP();
-
-private:
-};
-
-#ifndef SERVER
-
-/*
- All the other players on the client are these
-*/
-
-class RemotePlayer : public Player, public scene::ISceneNode