mirror of
https://github.com/minetest/minetest.git
synced 2024-12-22 14:12:24 +01:00
Fix -Winconsistent-missing-override in unit_sao.h (#15190)
This commit is contained in:
parent
f65fe80e81
commit
3c48671076
@ -31,7 +31,7 @@ public:
|
||||
UnitSAO(ServerEnvironment *env, v3f pos);
|
||||
virtual ~UnitSAO() = default;
|
||||
|
||||
u16 getHP() const { return m_hp; }
|
||||
u16 getHP() const override { return m_hp; }
|
||||
// Use a function, if isDead can be defined by other conditions
|
||||
bool isDead() const { return m_hp == 0; }
|
||||
|
||||
@ -59,39 +59,39 @@ public:
|
||||
{
|
||||
return itemgroup_get(getArmorGroups(), "immortal");
|
||||
}
|
||||
void setArmorGroups(const ItemGroupList &armor_groups);
|
||||
const ItemGroupList &getArmorGroups() const;
|
||||
void setArmorGroups(const ItemGroupList &armor_groups) override;
|
||||
const ItemGroupList &getArmorGroups() const override;
|
||||
|
||||
// Animation
|
||||
void setAnimation(v2f frame_range, float frame_speed, float frame_blend,
|
||||
bool frame_loop);
|
||||
bool frame_loop) override;
|
||||
void getAnimation(v2f *frame_range, float *frame_speed, float *frame_blend,
|
||||
bool *frame_loop);
|
||||
void setAnimationSpeed(float frame_speed);
|
||||
bool *frame_loop) override;
|
||||
void setAnimationSpeed(float frame_speed) override;
|
||||
|
||||
// Bone position
|
||||
void setBoneOverride(const std::string &bone, const BoneOverride &props);
|
||||
BoneOverride getBoneOverride(const std::string &bone);
|
||||
void setBoneOverride(const std::string &bone, const BoneOverride &props) override;
|
||||
BoneOverride getBoneOverride(const std::string &bone) override;
|
||||
const std::unordered_map<std::string, BoneOverride>
|
||||
&getBoneOverrides() const { return m_bone_override; };
|
||||
&getBoneOverrides() const override { return m_bone_override; };
|
||||
|
||||
// Attachments
|
||||
ServerActiveObject *getParent() const;
|
||||
ServerActiveObject *getParent() const override;
|
||||
inline bool isAttached() const { return m_attachment_parent_id != 0; }
|
||||
void setAttachment(object_t parent_id, const std::string &bone, v3f position,
|
||||
v3f rotation, bool force_visible);
|
||||
v3f rotation, bool force_visible) override;
|
||||
void getAttachment(object_t *parent_id, std::string *bone, v3f *position,
|
||||
v3f *rotation, bool *force_visible) const;
|
||||
v3f *rotation, bool *force_visible) const override;
|
||||
void clearChildAttachments() override;
|
||||
void addAttachmentChild(object_t child_id) override;
|
||||
void removeAttachmentChild(object_t child_id) override;
|
||||
const std::unordered_set<object_t> &getAttachmentChildIds() const {
|
||||
const std::unordered_set<object_t> &getAttachmentChildIds() const override {
|
||||
return m_attachment_child_ids;
|
||||
}
|
||||
|
||||
// Object properties
|
||||
ObjectProperties *accessObjectProperties();
|
||||
void notifyObjectPropertiesModified();
|
||||
ObjectProperties *accessObjectProperties() override;
|
||||
void notifyObjectPropertiesModified() override;
|
||||
void sendOutdatedData();
|
||||
|
||||
// Update packets
|
||||
@ -125,11 +125,11 @@ protected:
|
||||
object_t m_attachment_parent_id = 0;
|
||||
|
||||
void clearAnyAttachments();
|
||||
virtual void onMarkedForDeactivation() {
|
||||
virtual void onMarkedForDeactivation() override {
|
||||
ServerActiveObject::onMarkedForDeactivation();
|
||||
clearAnyAttachments();
|
||||
}
|
||||
virtual void onMarkedForRemoval() {
|
||||
virtual void onMarkedForRemoval() override {
|
||||
ServerActiveObject::onMarkedForRemoval();
|
||||
clearAnyAttachments();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user