diff options
author | ShadowNinja <shadowninja@minetest.net> | 2021-12-01 18:30:40 -0500 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2022-04-08 14:55:21 +0100 |
commit | 5683bb76cc3a60d952c9f58c41adaa5f195dd3f4 (patch) | |
tree | 86154779a5a23b1385a8e6872a7c3d79da51847d /src/server | |
parent | 3a87fab6c899afa50b2b7615b882d0a81b922832 (diff) | |
download | minetest-5683bb76cc3a60d952c9f58c41adaa5f195dd3f4.tar.gz minetest-5683bb76cc3a60d952c9f58c41adaa5f195dd3f4.tar.bz2 minetest-5683bb76cc3a60d952c9f58c41adaa5f195dd3f4.zip |
Fix compiler warnings
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/player_sao.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/server/player_sao.h b/src/server/player_sao.h index 96d8f7189..1067801e7 100644 --- a/src/server/player_sao.h +++ b/src/server/player_sao.h @@ -72,24 +72,24 @@ public: PlayerSAO(ServerEnvironment *env_, RemotePlayer *player_, session_t peer_id_, bool is_singleplayer); - ActiveObjectType getType() const { return ACTIVEOBJECT_TYPE_PLAYER; } - ActiveObjectType getSendType() const { return ACTIVEOBJECT_TYPE_GENERIC; } - std::string getDescription(); + ActiveObjectType getType() const override { return ACTIVEOBJECT_TYPE_PLAYER; } + ActiveObjectType getSendType() const override { return ACTIVEOBJECT_TYPE_GENERIC; } + std::string getDescription() override; /* Active object <-> environment interface */ - void addedToEnvironment(u32 dtime_s); - void removingFromEnvironment(); - bool isStaticAllowed() const { return false; } - bool shouldUnload() const { return false; } - std::string getClientInitializationData(u16 protocol_version); - void getStaticData(std::string *result) const; - void step(float dtime, bool send_recommended); + void addedToEnvironment(u32 dtime_s) override; + void removingFromEnvironment() override; + bool isStaticAllowed() const override { return false; } + bool shouldUnload() const override { return false; } + std::string getClientInitializationData(u16 protocol_version) override; + void getStaticData(std::string *result) const override; + void step(float dtime, bool send_recommended) override; void setBasePosition(const v3f &position); - void setPos(const v3f &pos); - void moveTo(v3f pos, bool continuous); + void setPos(const v3f &pos) override; + void moveTo(v3f pos, bool continuous) override; void setPlayerYaw(const float yaw); // Data should not be sent at player initialization void setPlayerYawAndSend(const float yaw); @@ -110,8 +110,8 @@ public: */ u32 punch(v3f dir, const ToolCapabilities *toolcap, ServerActiveObject *puncher, - float time_from_last_punch, u16 initial_wear = 0); - void rightClick(ServerActiveObject *clicker); + float time_from_last_punch, u16 initial_wear = 0) override; + void rightClick(ServerActiveObject *clicker) override; void setHP(s32 hp, const PlayerHPChangeReason &reason) override { return setHP(hp, reason, false); @@ -124,13 +124,13 @@ public: /* Inventory interface */ - Inventory *getInventory() const; - InventoryLocation getInventoryLocation() const; - void setInventoryModified() {} - std::string getWieldList() const { return "main"; } - u16 getWieldIndex() const; - ItemStack getWieldedItem(ItemStack *selected, ItemStack *hand = nullptr) const; - bool setWieldedItem(const ItemStack &item); + Inventory *getInventory() const override; + InventoryLocation getInventoryLocation() const override; + void setInventoryModified() override {} + std::string getWieldList() const override { return "main"; } + u16 getWieldIndex() const override; + ItemStack getWieldedItem(ItemStack *selected, ItemStack *hand = nullptr) const override; + bool setWieldedItem(const ItemStack &item) override; /* PlayerSAO-specific @@ -171,9 +171,9 @@ public: m_is_singleplayer = is_singleplayer; } - bool getCollisionBox(aabb3f *toset) const; - bool getSelectionBox(aabb3f *toset) const; - bool collideWithObjects() const { return true; } + bool getCollisionBox(aabb3f *toset) const override; + bool getSelectionBox(aabb3f *toset) const override; + bool collideWithObjects() const override { return true; } void finalize(RemotePlayer *player, const std::set<std::string> &privs); |