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