10#include <quaternion.h>
33 * core::quaternion(rot.getRotationDegrees() * core::DEGTORAD))
35 return res * core::RADTODEG;
51 void setAnimation(
v2f frame_range,
float frame_speed,
float frame_blend,
52 bool frame_loop)
override;
53 void getAnimation(
v2f *frame_range,
float *frame_speed,
float *frame_blend,
54 bool *frame_loop)
override;
60 const std::unordered_map<std::string, BoneOverride>
67 v3f rotation,
bool force_visible)
override;
69 v3f *rotation,
bool *force_visible)
const override;
88 const v3f &velocity,
const v3f &acceleration,
const v3f &rotation,
89 bool do_interpolate,
bool is_movement_end, f32 update_interval);
u16 object_t
Definition activeobject.h:143
Definition serveractiveobject.h:41
virtual void onMarkedForDeactivation()
Definition serveractiveobject.h:244
virtual void onMarkedForRemoval()
Definition serveractiveobject.h:245
Definition serverenvironment.h:219
void setArmorGroups(const ItemGroupList &armor_groups) override
Definition unit_sao.cpp:27
static std::string generateUpdateBoneOverrideCommand(const std::string &bone, const BoneOverride &props)
Definition unit_sao.cpp:300
bool m_bone_override_sent
Definition unit_sao.h:144
void sendPunchCommand()
Definition unit_sao.cpp:400
void setAnimation(v2f frame_range, float frame_speed, float frame_blend, bool frame_loop) override
Definition unit_sao.cpp:40
void clearChildAttachments() override
Definition unit_sao.cpp:221
f32 m_rotation_add_yaw
Definition unit_sao.h:99
u16 getHP() const override
Definition unit_sao.h:19
bool isDead() const
Definition unit_sao.h:21
u8 m_attachment_call_counter
Definition unit_sao.h:130
std::string generateUpdateAnimationSpeedCommand() const
Definition unit_sao.cpp:322
std::string generateSetPropertiesCommand(const ObjectProperties &prop) const
Definition unit_sao.cpp:382
ItemGroupList m_armor_groups
Definition unit_sao.h:101
std::unordered_map< std::string, BoneOverride > m_bone_override
Definition unit_sao.h:108
UnitSAO(ServerEnvironment *env, v3f pos)
Definition unit_sao.cpp:11
virtual void onMarkedForRemoval() override
Definition unit_sao.h:117
void notifyObjectPropertiesModified() override
Definition unit_sao.cpp:281
std::string generateUpdateAnimationCommand() const
Definition unit_sao.cpp:332
const v3f & getRotation() const
Definition unit_sao.h:25
bool m_properties_sent
Definition unit_sao.h:104
const ItemGroupList & getArmorGroups() const override
Definition unit_sao.cpp:35
std::unordered_set< object_t > m_attachment_child_ids
Definition unit_sao.h:147
ObjectProperties m_prop
Definition unit_sao.h:105
v3f m_attachment_rotation
Definition unit_sao.h:150
bool isAttached() const
Definition unit_sao.h:65
f32 getRadYawDep() const
Definition unit_sao.h:40
void onAttach(ServerActiveObject *parent)
Definition unit_sao.cpp:246
static std::string generateUpdatePositionCommand(const v3f &position, const v3f &velocity, const v3f &acceleration, const v3f &rotation, bool do_interpolate, bool is_movement_end, f32 update_interval)
Definition unit_sao.cpp:358
ObjectProperties * accessObjectProperties() override
Definition unit_sao.cpp:276
u16 m_hp
Definition unit_sao.h:96
void setBoneOverride(const std::string &bone, const BoneOverride &props) override
Definition unit_sao.cpp:68
std::string m_attachment_bone
Definition unit_sao.h:148
const std::unordered_map< std::string, BoneOverride > & getBoneOverrides() const override
Definition unit_sao.h:61
float m_animation_blend
Definition unit_sao.h:138
BoneOverride getBoneOverride(const std::string &bone) override
Definition unit_sao.cpp:75
v2f m_animation_range
Definition unit_sao.h:136
v3f m_attachment_position
Definition unit_sao.h:149
void setRotation(v3f rotation)
Definition unit_sao.h:24
void getAttachment(object_t *parent_id, std::string *bone, v3f *position, v3f *rotation, bool *force_visible) const override
Definition unit_sao.cpp:200
ServerActiveObject * getParent() const override
Definition unit_sao.cpp:17
bool m_force_visible
Definition unit_sao.h:152
virtual ~UnitSAO()=default
void removeAttachmentChild(object_t child_id) override
Definition unit_sao.cpp:241
void sendOutdatedData()
Definition unit_sao.cpp:84
bool m_animation_speed_sent
Definition unit_sao.h:141
void setAnimationSpeed(float frame_speed) override
Definition unit_sao.cpp:60
v3f getRadRotation()
Definition unit_sao.h:37
std::string generateUpdateArmorGroupsCommand() const
Definition unit_sao.cpp:346
float m_animation_speed
Definition unit_sao.h:137
bool m_armor_groups_sent
Definition unit_sao.h:133
void setAttachment(object_t parent_id, const std::string &bone, v3f position, v3f rotation, bool force_visible) override
Definition unit_sao.cpp:115
bool m_attachment_sent
Definition unit_sao.h:151
const v3f getTotalRotation() const
Definition unit_sao.h:26
bool isImmortal() const
Definition unit_sao.h:43
std::string generateUpdateAttachmentCommand() const
Definition unit_sao.cpp:286
bool m_animation_sent
Definition unit_sao.h:140
std::string generatePunchCommand(u16 result_hp) const
Definition unit_sao.cpp:390
virtual void onMarkedForDeactivation() override
Definition unit_sao.h:113
object_t m_attachment_parent_id
Definition unit_sao.h:110
void clearAnyAttachments()
Definition unit_sao.cpp:210
v3f m_rotation
Definition unit_sao.h:98
const std::unordered_set< object_t > & getAttachmentChildIds() const override
Definition unit_sao.h:73
void onDetach(ServerActiveObject *parent)
Definition unit_sao.cpp:259
void getAnimation(v2f *frame_range, float *frame_speed, float *frame_blend, bool *frame_loop) override
Definition unit_sao.cpp:51
void addAttachmentChild(object_t child_id) override
Definition unit_sao.cpp:236
bool m_animation_loop
Definition unit_sao.h:139
core::vector2d< f32 > v2f
Definition irr_v2d.h:11
core::vector3df v3f
Definition irr_v3d.h:11
std::unordered_map< std::string, int > ItemGroupList
Definition itemgroup.h:10
static int itemgroup_get(const ItemGroupList &groups, const std::string &name)
Definition itemgroup.h:12
ServerActiveObject::object_t object_t
Definition l_object.cpp:28
void setPitchYawRoll(core::matrix4 &m, v3f rot)
Definition numeric.h:462
Definition activeobject.h:63
Definition object_properties.h:15