X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fserverremoteplayer.h;h=2ff1b0013582189dae7c0f51b23e665dd06d82ab;hb=ca0fd4173cb18dd54219a1e8f05ec412e4d707ec;hp=15a9ebc38cd4dba467faafa5acddf557d1d0be11;hpb=9344816bd6c40603729256b454e2f171902b02e5;p=dragonfireclient.git diff --git a/src/serverremoteplayer.h b/src/serverremoteplayer.h index 15a9ebc38..2ff1b0013 100644 --- a/src/serverremoteplayer.h +++ b/src/serverremoteplayer.h @@ -46,9 +46,6 @@ class ServerRemotePlayer : public Player, public ServerActiveObject virtual void setPosition(const v3f &position); - // Returns a reference - virtual InventoryItem* getWieldedItem(); - /* ServerActiveObject interface */ u8 getType() const @@ -70,29 +67,35 @@ class ServerRemotePlayer : public Player, public ServerActiveObject void step(float dtime, bool send_recommended); std::string getClientInitializationData(); std::string getStaticData(); - void punch(ServerActiveObject *puncher, float time_from_last_punch); + int punch(v3f dir, + const ToolCapabilities *toolcap, + ServerActiveObject *puncher, + float time_from_last_punch); void rightClick(ServerActiveObject *clicker); void setPos(v3f pos); void moveTo(v3f pos, bool continuous); - virtual std::string getDescription(){return getName();} - - virtual void getWieldDiggingProperties(ToolDiggingProperties *dst); - virtual void damageWieldedItem(u16 amount); - // If all fits, eats item and returns true. Otherwise returns false. - virtual bool addToInventory(InventoryItem *item); - virtual void addToInventoryLater(InventoryItem *item); - void clearAddToInventoryLater(); - void completeAddToInventoryLater(u16 preferred_index); + virtual std::string getDescription() + {return std::string("player ")+getName();} + + virtual Inventory* getInventory(); + virtual const Inventory* getInventory() const; + virtual InventoryLocation getInventoryLocation() const; + virtual void setInventoryModified(); + virtual std::string getWieldList() const; + virtual int getWieldIndex() const; + virtual void setWieldIndex(int i); + virtual void setHP(s16 hp_); virtual s16 getHP(); v3f m_last_good_position; float m_last_good_position_age; - std::vector m_additional_items; + int m_wield_index; bool m_inventory_not_sent; bool m_hp_not_sent; - bool m_respawn_active; bool m_is_in_environment; + // Incremented by step(), read and reset by Server + float m_time_from_last_punch; private: bool m_position_not_sent;