Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
GenericCAO Class Reference

#include <content_cao.h>

+ Inheritance diagram for GenericCAO:
+ Collaboration diagram for GenericCAO:

Public Member Functions

 GenericCAO (Client *client, ClientEnvironment *env)
 
 ~GenericCAO ()
 
ActiveObjectType getType () const override
 
const ItemGroupListgetGroups () const
 
void initialize (const std::string &data) override
 
void processInitData (const std::string &data)
 
bool getCollisionBox (aabb3f *toset) const override
 
bool collideWithObjects () const override
 
virtual bool getSelectionBox (aabb3f *toset) const override
 
const v3f getPosition () const override final
 
const v3f getVelocity () const override final
 
const v3fgetRotation () const
 
bool isImmortal () const
 
const ObjectPropertiesgetProperties () const
 
const std::string & getName () const
 
scene::ISceneNode * getSceneNode () const override
 
scene::IAnimatedMeshSceneNode * getAnimatedMeshSceneNode () const override
 
core::matrix4 & getPosRotMatrix ()
 
const core::matrix4 * getAbsolutePosRotMatrix () const
 
f32 getStepHeight () const
 
bool isLocalPlayer () const override
 
bool isPlayer () const
 
bool isVisible () const
 
void setVisible (bool toset)
 
void setChildrenVisible (bool toset)
 
void setAttachment (object_t parent_id, const std::string &bone, v3f position, v3f rotation, bool force_visible) override
 
void getAttachment (object_t *parent_id, std::string *bone, v3f *position, v3f *rotation, bool *force_visible) const override
 
void clearChildAttachments () override
 
void addAttachmentChild (object_t child_id) override
 
void removeAttachmentChild (object_t child_id) override
 
ClientActiveObjectgetParent () const override
 
const std::unordered_set< object_t > & getAttachmentChildIds () const override
 
void updateAttachments () override
 
void removeFromScene (bool permanent) override
 
void addToScene (ITextureSource *tsrc, scene::ISceneManager *smgr) override
 
void expireVisuals ()
 
void updateLight (u32 day_night_ratio) override
 
void setNodeLight (const video::SColor &light)
 
u16 getLightPosition (v3s16 *pos)
 
void updateNametag ()
 
void updateMarker ()
 
void updateNodePos ()
 
void step (float dtime, ClientEnvironment *env) override
 
void updateTexturePos ()
 
void updateTextures (std::string mod)
 
void updateAnimation ()
 
void updateAnimationSpeed ()
 
void updateBones (f32 dtime)
 
void processMessage (const std::string &data) override
 
bool directReportPunch (v3f dir, const ItemStack *punchitem=NULL, float time_from_last_punch=1000000) override
 
std::string debugInfoText () override
 
std::string infoText () override
 
void updateMeshCulling ()
 
- Public Member Functions inherited from ClientActiveObject
 ClientActiveObject (u16 id, Client *client, ClientEnvironment *env)
 
virtual ~ClientActiveObject ()
 
virtual bool doShowSelectionBox ()
 
- Public Member Functions inherited from ActiveObject
 ActiveObject (object_t id)
 
object_t getId () const
 
void setId (object_t id)
 
virtual void clearParentAttachment ()
 

Static Public Member Functions

static std::unique_ptr< ClientActiveObjectcreate (Client *client, ClientEnvironment *env)
 
- Static Public Member Functions inherited from ClientActiveObject
static std::unique_ptr< ClientActiveObjectcreate (ActiveObjectType type, Client *client, ClientEnvironment *env)
 

Private Member Functions

bool visualExpiryRequired (const ObjectProperties &newprops) const
 

Private Attributes

std::string m_name = ""
 
bool m_is_player = false
 
bool m_is_local_player = false
 
ObjectProperties m_prop
 
scene::ISceneManager * m_smgr = nullptr
 
Clientm_client = nullptr
 
aabb3f m_selection_box = aabb3f(-BS/3.,-BS/3.,-BS/3., BS/3.,BS/3.,BS/3.)
 
scene::IMeshSceneNode * m_meshnode = nullptr
 
scene::IAnimatedMeshSceneNode * m_animated_meshnode = nullptr
 
WieldMeshSceneNodem_wield_meshnode = nullptr
 
scene::IBillboardSceneNode * m_spritenode = nullptr
 
scene::IDummyTransformationSceneNode * m_matrixnode = nullptr
 
Nametagm_nametag = nullptr
 
MinimapMarkerm_marker = nullptr
 
v3f m_position = v3f(0.0f, 10.0f * BS, 0)
 
v3f m_velocity
 
v3f m_acceleration
 
v3f m_rotation
 
u16 m_hp = 1
 
SmoothTranslator< v3fpos_translator
 
SmoothTranslatorWrappedv3f rot_translator
 
v2f m_tx_size = v2f(1,1)
 
v2s16 m_tx_basepos
 
bool m_initial_tx_basepos_set = false
 
bool m_tx_select_horiz_by_yawpitch = false
 
v2f m_animation_range
 
float m_animation_speed = 15.0f
 
float m_animation_blend = 0.0f
 
bool m_animation_loop = true
 
BoneOverrideMap m_bone_override
 
object_t m_attachment_parent_id = 0
 
std::unordered_set< object_tm_attachment_child_ids
 
std::string m_attachment_bone = ""
 
v3f m_attachment_position
 
v3f m_attachment_rotation
 
bool m_attached_to_local = false
 
bool m_force_visible = false
 
int m_anim_frame = 0
 
int m_anim_num_frames = 1
 
float m_anim_framelength = 0.2f
 
float m_anim_timer = 0.0f
 
ItemGroupList m_armor_groups
 
float m_reset_textures_timer = -1.0f
 
std::string m_previous_texture_modifier = ""
 
std::string m_current_texture_modifier = ""
 
bool m_visuals_expired = false
 
float m_step_distance_counter = 0.0f
 
video::SColor m_last_light = video::SColor(0xFFFFFFFF)
 
bool m_is_visible = false
 
video::E_MATERIAL_TYPE m_material_type
 
f32 m_material_type_param
 
bool m_enable_shaders = false
 

Additional Inherited Members

- Public Types inherited from ActiveObject
typedef u16 object_t
 
- Protected Types inherited from ClientActiveObject
typedef std::unique_ptr< ClientActiveObject >(* Factory) (Client *client, ClientEnvironment *env)
 
- Static Protected Member Functions inherited from ClientActiveObject
static void registerType (u16 type, Factory f)
 
- Protected Attributes inherited from ClientActiveObject
Clientm_client
 
ClientEnvironmentm_env
 
- Protected Attributes inherited from ActiveObject
object_t m_id
 

Constructor & Destructor Documentation

◆ GenericCAO()

GenericCAO::GenericCAO ( Client * client,
ClientEnvironment * env )

References create(), getType(), m_client, and ClientActiveObject::registerType().

+ Here is the call graph for this function:

◆ ~GenericCAO()

GenericCAO::~GenericCAO ( )

References removeFromScene().

+ Here is the call graph for this function:

Member Function Documentation

◆ addAttachmentChild()

void GenericCAO::addAttachmentChild ( object_t child_id)
overridevirtual

Reimplemented from ActiveObject.

References m_attachment_child_ids.

Referenced by processMessage().

+ Here is the caller graph for this function:

◆ addToScene()

void GenericCAO::addToScene ( ITextureSource * tsrc,
scene::ISceneManager * smgr )
overridevirtual

Implements ClientActiveObject.

References ObjectProperties::backface_culling, BS, checkMeshNormals(), createCubeMesh(), ItemStack::deSerialize(), errorstream, RenderingEngine::get_shadow_renderer(), Client::getMesh(), getSceneNode(), IShaderSource::getShader(), IShaderSource::getShaderInfo(), Client::getShaderSource(), ITextureSource::getTextureForMesh(), ObjectProperties::glow, IGameDef::idef(), infostream, ObjectProperties::is_visible, logOnce(), m_animated_meshnode, m_client, m_current_texture_modifier, m_enable_shaders, m_is_player, m_last_light, m_material_type, m_material_type_param, m_matrixnode, m_meshnode, m_prop, m_reset_textures_timer, m_smgr, m_spritenode, m_visuals_expired, m_wield_meshnode, ShaderInfo::material, ObjectProperties::mesh, NDT_NORMAL, setBillboardTextureMatrix(), WieldMeshSceneNode::setItem(), setMeshColor(), setNodeLight(), ObjectProperties::shaded, ObjectProperties::textures, TILE_MATERIAL_ALPHA, TILE_MATERIAL_BASIC, TILE_MATERIAL_PLAIN, TILE_MATERIAL_PLAIN_ALPHA, updateAnimation(), updateAttachments(), updateBones(), updateMarker(), updateMeshCulling(), updateNametag(), updateNodePos(), updateTextures(), ObjectProperties::use_texture_alpha, ObjectProperties::visual, ObjectProperties::visual_size, warningstream, and ObjectProperties::wield_item.

Referenced by step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearChildAttachments()

void GenericCAO::clearChildAttachments ( )
overridevirtual

Reimplemented from ActiveObject.

References ClientEnvironment::getActiveObject(), m_attachment_child_ids, ClientActiveObject::m_env, and removeAttachmentChild().

Referenced by processMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ collideWithObjects()

bool GenericCAO::collideWithObjects ( ) const
overridevirtual

Reimplemented from ClientActiveObject.

References ObjectProperties::collideWithObjects, and m_prop.

◆ create()

static std::unique_ptr< ClientActiveObject > GenericCAO::create ( Client * client,
ClientEnvironment * env )
inlinestatic

Referenced by GenericCAO().

+ Here is the caller graph for this function:

◆ debugInfoText()

std::string GenericCAO::debugInfoText ( )
overridevirtual

Reimplemented from ClientActiveObject.

References m_armor_groups, and m_hp.

◆ directReportPunch()

bool GenericCAO::directReportPunch ( v3f dir,
const ItemStack * punchitem = NULL,
float time_from_last_punch = 1000000 )
overridevirtual

◆ expireVisuals()

void GenericCAO::expireVisuals ( )
inline

References m_visuals_expired.

Referenced by processMessage().

+ Here is the caller graph for this function:

◆ getAbsolutePosRotMatrix()

const core::matrix4 * GenericCAO::getAbsolutePosRotMatrix ( ) const
inline

References m_matrixnode.

◆ getAnimatedMeshSceneNode()

scene::IAnimatedMeshSceneNode * GenericCAO::getAnimatedMeshSceneNode ( ) const
overridevirtual

Reimplemented from ClientActiveObject.

References m_animated_meshnode.

◆ getAttachment()

void GenericCAO::getAttachment ( object_t * parent_id,
std::string * bone,
v3f * position,
v3f * rotation,
bool * force_visible ) const
overridevirtual

◆ getAttachmentChildIds()

const std::unordered_set< object_t > & GenericCAO::getAttachmentChildIds ( ) const
inlineoverridevirtual

Reimplemented from ClientActiveObject.

References m_attachment_child_ids.

◆ getCollisionBox()

bool GenericCAO::getCollisionBox ( aabb3f * toset) const
overridevirtual

Returns the collision box of the object. This box is translated by the object's location. The box's coordinates are world coordinates.

Returns
true if the object has a collision box.

Reimplemented from ClientActiveObject.

References BS, ObjectProperties::collisionbox, m_position, m_prop, and ObjectProperties::physical.

◆ getGroups()

const ItemGroupList & GenericCAO::getGroups ( ) const
inline

References m_armor_groups.

Referenced by ClientEnvironment::getSelectedActiveObjects(), isImmortal(), LuaLocalPlayer::l_get_armor_groups(), and ClientEnvironment::step().

+ Here is the caller graph for this function:

◆ getLightPosition()

u16 GenericCAO::getLightPosition ( v3s16 * pos)

References BS, ObjectProperties::collisionbox, floatToInt(), m_position, and m_prop.

Referenced by updateLight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getName()

const std::string & GenericCAO::getName ( ) const
inline

References m_name.

Referenced by ClientEnvironment::getSelectedActiveObjects().

+ Here is the caller graph for this function:

◆ getParent()

ClientActiveObject * GenericCAO::getParent ( ) const
overridevirtual

Reimplemented from ClientActiveObject.

References ClientEnvironment::getActiveObject(), m_attachment_parent_id, and ClientActiveObject::m_env.

Referenced by LocalPlayer::getParent(), getPosition(), processMessage(), step(), updateAttachments(), and updateNodePos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPosition()

const v3f GenericCAO::getPosition ( ) const
finaloverridevirtual

Reimplemented from ClientActiveObject.

References BS, ClientEnvironment::getCameraOffset(), getParent(), intToFloat(), ClientActiveObject::m_env, m_matrixnode, m_position, pos_translator, and SmoothTranslator< T >::val_current.

Referenced by LocalPlayer::move(), LocalPlayer::old_move(), step(), and updateAttachments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPosRotMatrix()

core::matrix4 & GenericCAO::getPosRotMatrix ( )
inline

References m_matrixnode.

Referenced by updateAttachments(), and updateNodePos().

+ Here is the caller graph for this function:

◆ getProperties()

const ObjectProperties & GenericCAO::getProperties ( ) const
inline

References m_prop.

Referenced by ClientEnvironment::getSelectedActiveObjects(), Game::handleClientEvent_PlayerDamage(), and Game::updatePointedThing().

+ Here is the caller graph for this function:

◆ getRotation()

const v3f & GenericCAO::getRotation ( ) const
inline

References m_rotation.

◆ getSceneNode()

scene::ISceneNode * GenericCAO::getSceneNode ( ) const
overridevirtual

Reimplemented from ClientActiveObject.

References m_animated_meshnode, m_meshnode, m_spritenode, and m_wield_meshnode.

Referenced by addToScene(), ClientEnvironment::getSelectedActiveObjects(), removeFromScene(), setNodeLight(), step(), updateMarker(), updateMeshCulling(), updateNametag(), updateNodePos(), and Game::updatePointedThing().

+ Here is the caller graph for this function:

◆ getSelectionBox()

bool GenericCAO::getSelectionBox ( aabb3f * toset) const
overridevirtual

Returns the selection box of the object. This box is not translated when the object moves. The box's coordinates are world coordinates.

Returns
true if the object has a selection box.

Reimplemented from ClientActiveObject.

References ObjectProperties::is_visible, m_is_local_player, m_is_visible, m_prop, and m_selection_box.

◆ getStepHeight()

f32 GenericCAO::getStepHeight ( ) const
inline

References m_prop, and ObjectProperties::stepheight.

Referenced by LocalPlayer::move(), and Camera::update().

+ Here is the caller graph for this function:

◆ getType()

ActiveObjectType GenericCAO::getType ( ) const
inlineoverridevirtual

Implements ActiveObject.

References ACTIVEOBJECT_TYPE_GENERIC.

Referenced by GenericCAO().

+ Here is the caller graph for this function:

◆ getVelocity()

const v3f GenericCAO::getVelocity ( ) const
inlinefinaloverridevirtual

Reimplemented from ClientActiveObject.

References m_velocity.

◆ infoText()

std::string GenericCAO::infoText ( )
inlineoverridevirtual

Reimplemented from ClientActiveObject.

References ObjectProperties::infotext, and m_prop.

◆ initialize()

void GenericCAO::initialize ( const std::string & data)
overridevirtual

Reimplemented from ClientActiveObject.

References g_settings, Settings::getBool(), m_enable_shaders, and processInitData().

+ Here is the call graph for this function:

◆ isImmortal()

bool GenericCAO::isImmortal ( ) const

References getGroups(), and itemgroup_get().

Referenced by LocalPlayer::isDead(), and ClientEnvironment::step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isLocalPlayer()

bool GenericCAO::isLocalPlayer ( ) const
inlineoverridevirtual

Reimplemented from ClientActiveObject.

References m_is_local_player.

◆ isPlayer()

bool GenericCAO::isPlayer ( ) const
inline

References m_is_player.

Referenced by ClientEnvironment::getSelectedActiveObjects().

+ Here is the caller graph for this function:

◆ isVisible()

bool GenericCAO::isVisible ( ) const
inline

References m_is_visible.

◆ processInitData()

void GenericCAO::processInitData ( const std::string & data)

References deSerializeString16(), deSerializeString32(), errorstream, ClientEnvironment::getLocalPlayer(), Player::getName(), SmoothTranslator< T >::init(), ClientActiveObject::m_env, m_hp, ActiveObject::m_id, m_is_local_player, m_is_player, m_is_visible, m_name, m_position, m_rotation, pos_translator, processMessage(), readU16(), readU8(), readV3F32(), rot_translator, LocalPlayer::setCAO(), updateNodePos(), and wrapDegrees_0_360_v3f().

Referenced by initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processMessage()

void GenericCAO::processMessage ( const std::string & data)
overridevirtual

Reimplemented from ClientActiveObject.

References BoneOverride::PositionProperty::absolute, BoneOverride::RotationProperty::absolute, BoneOverride::ScaleProperty::absolute, addAttachmentChild(), ClientEnvironment::addSimpleObject(), AO_CMD_ATTACH_TO, AO_CMD_OBSOLETE1, AO_CMD_PUNCHED, AO_CMD_SET_ANIMATION, AO_CMD_SET_ANIMATION_SPEED, AO_CMD_SET_BONE_POSITION, AO_CMD_SET_PHYSICS_OVERRIDE, AO_CMD_SET_PROPERTIES, AO_CMD_SET_SPRITE, AO_CMD_SET_TEXTURE_MOD, AO_CMD_SPAWN_INFANT, AO_CMD_UPDATE_ARMOR_GROUPS, AO_CMD_UPDATE_POSITION, BS, clearChildAttachments(), ActiveObject::clearParentAttachment(), ObjectProperties::collisionbox, createSmokePuff(), ObjectProperties::damage_texture_modifier, ObjectProperties::deSerialize(), deSerializeString16(), BoneOverride::dtime_passed, expireVisuals(), ObjectProperties::eye_height, FUNCTION_NAME, ClientEnvironment::getLocalPlayer(), getParent(), LocalPlayer::hp, SmoothTranslator< T >::init(), ObjectProperties::initial_sprite_basepos, BoneOverride::PositionProperty::interp_timer, BoneOverride::RotationProperty::interp_timer, BoneOverride::ScaleProperty::interp_timer, BoneOverride::isIdentity(), LocalPlayer::last_animation, Player::local_animations, m_acceleration, m_anim_frame, m_anim_framelength, m_anim_num_frames, m_animation_blend, m_animation_loop, m_animation_range, m_animation_speed, m_armor_groups, m_bone_override, m_current_texture_modifier, ClientActiveObject::m_env, m_hp, m_initial_tx_basepos_set, m_is_local_player, m_is_player, m_name, m_position, m_previous_texture_modifier, m_prop, m_reset_textures_timer, m_rotation, m_selection_box, m_smgr, m_tx_basepos, m_tx_select_horiz_by_yawpitch, m_tx_size, m_velocity, LocalPlayer::makes_footstep_sound, ObjectProperties::makes_footstep_sound, ObjectProperties::nametag, BoneOverride::RotationProperty::next, NO_ANIM, p(), ObjectProperties::physical, Player::physics_override, pos_translator, BoneOverride::position, BoneOverride::PositionProperty::previous, BoneOverride::RotationProperty::previous, BoneOverride::ScaleProperty::previous, readF32(), readS16(), readU16(), readU8(), readV2F32(), readV2S16(), readV3F32(), rot_translator, BoneOverride::rotation, BoneOverride::scale, ObjectProperties::selectionbox, setAttachment(), LocalPlayer::setCollisionbox(), LocalPlayer::setEyeHeight(), LocalPlayer::setZoomFOV(), ObjectProperties::show_on_minimap, PlayerPhysicsOverride::speed, ObjectProperties::spritediv, ObjectProperties::textures, SmoothTranslator< T >::update(), updateAnimation(), updateAnimationSpeed(), updateMarker(), updateNametag(), updateNodePos(), updateTexturePos(), updateTextures(), BoneOverride::PositionProperty::vector, BoneOverride::ScaleProperty::vector, ObjectProperties::visual_size, visualExpiryRequired(), warningstream, wrapDegrees_0_360_v3f(), and ObjectProperties::zoom_fov.

Referenced by processInitData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeAttachmentChild()

void GenericCAO::removeAttachmentChild ( object_t child_id)
overridevirtual

Reimplemented from ActiveObject.

References m_attachment_child_ids.

Referenced by clearChildAttachments().

+ Here is the caller graph for this function:

◆ removeFromScene()

void GenericCAO::removeFromScene ( bool permanent)
overridevirtual

Reimplemented from ClientActiveObject.

References ActiveObject::clearParentAttachment(), RenderingEngine::get_shadow_renderer(), Client::getCamera(), Client::getMinimap(), getSceneNode(), m_animated_meshnode, m_client, ClientActiveObject::m_env, m_marker, m_matrixnode, m_meshnode, m_nametag, m_spritenode, m_wield_meshnode, Minimap::removeMarker(), and Camera::removeNametag().

Referenced by ~GenericCAO(), and step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAttachment()

void GenericCAO::setAttachment ( object_t parent_id,
const std::string & bone,
v3f position,
v3f rotation,
bool force_visible )
overridevirtual

Reimplemented from ActiveObject.

References ActiveObject::addAttachmentChild(), CAMERA_MODE_FIRST, ClientEnvironment::getActiveObject(), Client::getCamera(), Camera::getCameraMode(), m_attached_to_local, m_attachment_bone, m_attachment_parent_id, m_attachment_position, m_attachment_rotation, m_client, ClientActiveObject::m_env, m_force_visible, ActiveObject::m_id, m_is_local_player, m_is_visible, ActiveObject::removeAttachmentChild(), and updateAttachments().

Referenced by processMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setChildrenVisible()

void GenericCAO::setChildrenVisible ( bool toset)

References ClientEnvironment::getGenericCAO(), m_attachment_child_ids, ClientActiveObject::m_env, m_force_visible, and setVisible().

Referenced by LuaCamera::l_set_camera_mode(), and Game::updateCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNodeLight()

void GenericCAO::setNodeLight ( const video::SColor & light)

References getSceneNode(), m_animated_meshnode, m_enable_shaders, m_meshnode, m_prop, m_spritenode, m_wield_meshnode, setColorParam(), setMeshColor(), WieldMeshSceneNode::setNodeLightColor(), and ObjectProperties::visual.

Referenced by addToScene(), and updateLight().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setVisible()

void GenericCAO::setVisible ( bool toset)
inline

References m_is_visible.

Referenced by setChildrenVisible().

+ Here is the caller graph for this function:

◆ step()

void GenericCAO::step ( float dtime,
ClientEnvironment * env )
overridevirtual

Reimplemented from ClientActiveObject.

References addToScene(), SmoothTranslator< T >::aim_is_end, SmoothTranslator< T >::anim_time, ObjectProperties::automatic_face_movement_dir, ObjectProperties::automatic_face_movement_dir_offset, ObjectProperties::automatic_face_movement_max_rotation_per_sec, ObjectProperties::automatic_rotate, PlayerControl::aux1, BS, Client::checkLocalPrivilege(), collisionMoveResult::collides, ObjectProperties::collideWithObjects, ObjectProperties::collisionbox, collisionMoveSimple(), PlayerControl::dig, DIG_ANIM, floatToInt(), g_settings, SoundSpec::gain, NodeDefManager::get(), ClientEnvironment::getActiveObject(), Settings::getBool(), ClientEnvironment::getGameDef(), ClientEnvironment::getLocalPlayer(), ClientEnvironment::getMap(), Map::getNode(), getParent(), Player::getPlayerControl(), getPosition(), LocalPlayer::getPosition(), ClientActiveObject::getSceneNode(), getSceneNode(), LocalPlayer::getYaw(), LocalPlayer::last_animation, LocalPlayer::last_animation_speed, Player::local_animation_speed, Player::local_animations, m_acceleration, m_anim_frame, m_anim_framelength, m_anim_num_frames, m_anim_timer, m_animated_meshnode, m_animation_range, m_animation_speed, m_attachment_child_ids, m_client, ClientActiveObject::m_env, m_is_local_player, m_is_visible, m_matrixnode, m_position, m_previous_texture_modifier, m_prop, m_reset_textures_timer, m_rotation, m_smgr, m_step_distance_counter, m_velocity, m_visuals_expired, ObjectProperties::makes_footstep_sound, modulo360f(), PlayerControl::movement_speed, IGameDef::ndef(), NO_ANIM, ObjectProperties::physical, PlayerControl::place, ISoundManager::playSoundAt(), pos_translator, removeFromScene(), rot_translator, PlayerControl::sneak, Client::sound(), ContentFeatures::sound_footstep, ObjectProperties::stepheight, LocalPlayer::touching_ground, SmoothTranslator< T >::translate(), SmoothTranslatorWrappedv3f::translate(), Client::tsrc(), SmoothTranslator< T >::update(), updateAnimation(), ClientActiveObject::updateAttachments(), updateBones(), updateNodePos(), updatePositionRecursive(), updateTexturePos(), updateTextures(), SmoothTranslator< T >::val_current, SmoothTranslator< T >::val_target, WALK_ANIM, WD_ANIM, wrapDegrees_0_360(), and wrappedApproachShortest().

+ Here is the call graph for this function:

◆ updateAnimation()

void GenericCAO::updateAnimation ( )

References m_animated_meshnode, m_animation_blend, m_animation_loop, m_animation_range, and m_animation_speed.

Referenced by addToScene(), processMessage(), and step().

+ Here is the caller graph for this function:

◆ updateAnimationSpeed()

void GenericCAO::updateAnimationSpeed ( )

References m_animated_meshnode, and m_animation_speed.

Referenced by processMessage().

+ Here is the caller graph for this function:

◆ updateAttachments()

void GenericCAO::updateAttachments ( )
overridevirtual

Reimplemented from ClientActiveObject.

References BS, ClientActiveObject::getAnimatedMeshSceneNode(), ClientEnvironment::getCameraOffset(), getParent(), getPosition(), getPosRotMatrix(), ClientActiveObject::getSceneNode(), intToFloat(), ClientActiveObject::isLocalPlayer(), m_attached_to_local, m_attachment_bone, m_attachment_position, m_attachment_rotation, ClientActiveObject::m_env, m_matrixnode, m_smgr, and ClientActiveObject::updateAttachments().

Referenced by addToScene(), and setAttachment().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateBones()

void GenericCAO::updateBones ( f32 dtime)

References BoneOverride::dtime_passed, BoneOverride::getPosition(), BoneOverride::getRotationEulerDeg(), BoneOverride::getScale(), m_animated_meshnode, and m_bone_override.

Referenced by addToScene(), and step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateLight()

void GenericCAO::updateLight ( u32 day_night_ratio)
overridevirtual

Reimplemented from ClientActiveObject.

References encode_light(), final_color_blend(), getInteriorLight(), getLightPosition(), ClientEnvironment::getMap(), Map::getNode(), ObjectProperties::glow, LIGHT_SUN, m_client, m_enable_shaders, ClientActiveObject::m_env, m_last_light, m_prop, MYMAX, IGameDef::ndef(), and setNodeLight().

+ Here is the call graph for this function:

◆ updateMarker()

void GenericCAO::updateMarker ( )

References Minimap::addMarker(), Client::getMinimap(), getSceneNode(), m_client, m_marker, m_prop, Minimap::removeMarker(), and ObjectProperties::show_on_minimap.

Referenced by addToScene(), and processMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateMeshCulling()

void GenericCAO::updateMeshCulling ( )

References ObjectProperties::backface_culling, CAMERA_MODE_FIRST, Client::getCamera(), Camera::getCameraMode(), getSceneNode(), m_client, m_is_local_player, m_prop, and ObjectProperties::visual.

Referenced by addToScene(), LuaCamera::l_set_camera_mode(), Game::updateCamera(), and updateTextures().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateNametag()

void GenericCAO::updateNametag ( )

References Camera::addNametag(), Nametag::bgcolor, Client::getCamera(), getSceneNode(), m_client, m_is_local_player, m_nametag, m_prop, ObjectProperties::nametag, ObjectProperties::nametag_bgcolor, ObjectProperties::nametag_color, Nametag::pos, Camera::removeNametag(), ObjectProperties::selectionbox, Nametag::text, and Nametag::textcolor.

Referenced by addToScene(), and processMessage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateNodePos()

void GenericCAO::updateNodePos ( )

References BS, ClientEnvironment::getCameraOffset(), getParent(), getPosRotMatrix(), getSceneNode(), intToFloat(), ClientActiveObject::m_env, m_is_local_player, m_rotation, m_spritenode, pos_translator, rot_translator, setPitchYawRoll(), and SmoothTranslator< T >::val_current.

Referenced by addToScene(), processInitData(), processMessage(), and step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTexturePos()

void GenericCAO::updateTexturePos ( )

References dir(), m_anim_frame, m_meshnode, m_prop, m_rotation, m_spritenode, m_tx_basepos, m_tx_select_horiz_by_yawpitch, m_tx_size, setBillboardTextureMatrix(), setMeshBufferTextureCoords(), ObjectProperties::visual, and wrapDegrees_180().

Referenced by processMessage(), and step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTextures()

void GenericCAO::updateTextures ( std::string mod)

References ObjectProperties::backface_culling, ObjectProperties::colors, errorstream, g_settings, Settings::getBool(), ITextureSource::getTextureForMesh(), ObjectProperties::glow, m_animated_meshnode, m_client, m_current_texture_modifier, m_is_local_player, m_material_type, m_material_type_param, m_meshnode, m_previous_texture_modifier, m_prop, m_spritenode, setMaterialFilters(), setMeshColor(), ObjectProperties::textures, Client::tsrc(), updateMeshCulling(), and ObjectProperties::visual.

Referenced by addToScene(), directReportPunch(), processMessage(), and step().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visualExpiryRequired()

bool GenericCAO::visualExpiryRequired ( const ObjectProperties & newprops) const
private

Member Data Documentation

◆ m_acceleration

v3f GenericCAO::m_acceleration
private

Referenced by processMessage(), and step().

◆ m_anim_frame

int GenericCAO::m_anim_frame = 0
private

◆ m_anim_framelength

float GenericCAO::m_anim_framelength = 0.2f
private

Referenced by processMessage(), and step().

◆ m_anim_num_frames

int GenericCAO::m_anim_num_frames = 1
private

Referenced by processMessage(), and step().

◆ m_anim_timer

float GenericCAO::m_anim_timer = 0.0f
private

Referenced by step().

◆ m_animated_meshnode

scene::IAnimatedMeshSceneNode* GenericCAO::m_animated_meshnode = nullptr
private

◆ m_animation_blend

float GenericCAO::m_animation_blend = 0.0f
private

Referenced by processMessage(), and updateAnimation().

◆ m_animation_loop

bool GenericCAO::m_animation_loop = true
private

Referenced by processMessage(), and updateAnimation().

◆ m_animation_range

v2f GenericCAO::m_animation_range
private

◆ m_animation_speed

float GenericCAO::m_animation_speed = 15.0f
private

◆ m_armor_groups

ItemGroupList GenericCAO::m_armor_groups
private

◆ m_attached_to_local

bool GenericCAO::m_attached_to_local = false
private

Referenced by setAttachment(), and updateAttachments().

◆ m_attachment_bone

std::string GenericCAO::m_attachment_bone = ""
private

◆ m_attachment_child_ids

std::unordered_set<object_t> GenericCAO::m_attachment_child_ids
private

◆ m_attachment_parent_id

object_t GenericCAO::m_attachment_parent_id = 0
private

◆ m_attachment_position

v3f GenericCAO::m_attachment_position
private

◆ m_attachment_rotation

v3f GenericCAO::m_attachment_rotation
private

◆ m_bone_override

BoneOverrideMap GenericCAO::m_bone_override
private

Referenced by processMessage(), and updateBones().

◆ m_client

◆ m_current_texture_modifier

std::string GenericCAO::m_current_texture_modifier = ""
private

◆ m_enable_shaders

bool GenericCAO::m_enable_shaders = false
private

◆ m_force_visible

bool GenericCAO::m_force_visible = false
private

◆ m_hp

u16 GenericCAO::m_hp = 1
private

◆ m_initial_tx_basepos_set

bool GenericCAO::m_initial_tx_basepos_set = false
private

Referenced by processMessage().

◆ m_is_local_player

◆ m_is_player

bool GenericCAO::m_is_player = false
private

◆ m_is_visible

bool GenericCAO::m_is_visible = false
private

◆ m_last_light

video::SColor GenericCAO::m_last_light = video::SColor(0xFFFFFFFF)
private

Referenced by addToScene(), and updateLight().

◆ m_marker

MinimapMarker* GenericCAO::m_marker = nullptr
private

Referenced by removeFromScene(), and updateMarker().

◆ m_material_type

video::E_MATERIAL_TYPE GenericCAO::m_material_type
private

Referenced by addToScene(), and updateTextures().

◆ m_material_type_param

f32 GenericCAO::m_material_type_param
private

Referenced by addToScene(), and updateTextures().

◆ m_matrixnode

scene::IDummyTransformationSceneNode* GenericCAO::m_matrixnode = nullptr
private

◆ m_meshnode

scene::IMeshSceneNode* GenericCAO::m_meshnode = nullptr
private

◆ m_name

std::string GenericCAO::m_name = ""
private

◆ m_nametag

Nametag* GenericCAO::m_nametag = nullptr
private

Referenced by removeFromScene(), and updateNametag().

◆ m_position

v3f GenericCAO::m_position = v3f(0.0f, 10.0f * BS, 0)
private

◆ m_previous_texture_modifier

std::string GenericCAO::m_previous_texture_modifier = ""
private

◆ m_prop

◆ m_reset_textures_timer

float GenericCAO::m_reset_textures_timer = -1.0f
private

◆ m_rotation

v3f GenericCAO::m_rotation
private

◆ m_selection_box

aabb3f GenericCAO::m_selection_box = aabb3f(-BS/3.,-BS/3.,-BS/3., BS/3.,BS/3.,BS/3.)
private

Referenced by getSelectionBox(), and processMessage().

◆ m_smgr

scene::ISceneManager* GenericCAO::m_smgr = nullptr
private

◆ m_spritenode

scene::IBillboardSceneNode* GenericCAO::m_spritenode = nullptr
private

◆ m_step_distance_counter

float GenericCAO::m_step_distance_counter = 0.0f
private

Referenced by step().

◆ m_tx_basepos

v2s16 GenericCAO::m_tx_basepos
private

Referenced by processMessage(), and updateTexturePos().

◆ m_tx_select_horiz_by_yawpitch

bool GenericCAO::m_tx_select_horiz_by_yawpitch = false
private

Referenced by processMessage(), and updateTexturePos().

◆ m_tx_size

v2f GenericCAO::m_tx_size = v2f(1,1)
private

Referenced by processMessage(), and updateTexturePos().

◆ m_velocity

v3f GenericCAO::m_velocity
private

Referenced by getVelocity(), processMessage(), and step().

◆ m_visuals_expired

bool GenericCAO::m_visuals_expired = false
private

Referenced by addToScene(), expireVisuals(), and step().

◆ m_wield_meshnode

WieldMeshSceneNode* GenericCAO::m_wield_meshnode = nullptr
private

◆ pos_translator

SmoothTranslator<v3f> GenericCAO::pos_translator
private

◆ rot_translator

SmoothTranslatorWrappedv3f GenericCAO::rot_translator
private

The documentation for this class was generated from the following files: