Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
LocalPlayer Class Reference

#include <localplayer.h>

+ Inheritance diagram for LocalPlayer:
+ Collaboration diagram for LocalPlayer:

Public Member Functions

 LocalPlayer (Client *client, const char *name)
 
virtual ~LocalPlayer ()
 
void move (f32 dtime, Environment *env, f32 pos_max_d)
 
void move (f32 dtime, Environment *env, f32 pos_max_d, std::vector< CollisionInfo > *collision_info)
 
void old_move (f32 dtime, Environment *env, f32 pos_max_d, std::vector< CollisionInfo > *collision_info)
 
void applyControl (float dtime, Environment *env)
 
v3s16 getStandingNodePos ()
 
v3s16 getFootstepNodePos ()
 
GenericCAOgetCAO () const
 
ClientActiveObjectgetParent () const
 
void setCAO (GenericCAO *toset)
 
u32 maxHudId () const
 
u16 getBreath () const
 
void setBreath (u16 breath)
 
v3s16 getLightPosition () const
 
void setYaw (f32 yaw)
 
f32 getYaw () const
 
void setPitch (f32 pitch)
 
f32 getPitch () const
 
void setPosition (const v3f &position)
 
void addPosition (const v3f &added_pos)
 
v3f getPosition () const
 
v3f getEyePosition () const
 
v3f getEyeOffset () const
 
void setEyeHeight (float eye_height)
 
void setCollisionbox (const aabb3f &box)
 
const aabb3fgetCollisionbox () const
 
float getZoomFOV () const
 
void setZoomFOV (float zoom_fov)
 
bool getAutojump () const
 
bool isDead () const
 
void addVelocity (const v3f &vel)
 
LightinggetLighting ()
 
PlayerSettingsgetPlayerSettings ()
 
- Public Member Functions inherited from Player
 Player (const char *name, IItemDefManager *idef)
 
virtual ~Player ()=0
 
 DISABLE_CLASS_COPY (Player)
 
virtual void move (f32 dtime, Environment *env, f32 pos_max_d)
 
virtual void move (f32 dtime, Environment *env, f32 pos_max_d, std::vector< CollisionInfo > *collision_info)
 
void setSpeed (v3f speed)
 
v3f getSpeed () const
 
const char * getName () const
 
u32 getFreeHudID ()
 
const PlayerControlgetPlayerControl ()
 
ItemStackgetWieldedItem (ItemStack *selected, ItemStack *hand) const
 
void setWieldIndex (u16 index)
 
u16 getWieldIndex () const
 
bool setFov (const PlayerFovSpec &spec)
 
const PlayerFovSpecgetFov () const
 
HudElementgetHud (u32 id)
 
void hudApply (std::function< void(const std::vector< HudElement * > &)> f)
 
u32 addHud (HudElement *hud)
 
HudElementremoveHud (u32 id)
 
void clearHud ()
 

Public Attributes

u16 hp = 0
 
bool touching_ground = false
 
bool in_liquid = false
 
bool in_liquid_stable = false
 
u8 move_resistance = 0
 
bool is_climbing = false
 
bool swimming_vertical = false
 
bool swimming_pitch = false
 
f32 gravity = 0
 
v3f last_position
 
v3f last_speed
 
float last_pitch = 0.0f
 
float last_yaw = 0.0f
 
u32 last_keyPressed = 0
 
u8 last_camera_fov = 0
 
u8 last_wanted_range = 0
 
bool last_camera_inverted = false
 
float camera_impact = 0.0f
 
bool makes_footstep_sound = true
 
LocalPlayerAnimation last_animation = LocalPlayerAnimation::NO_ANIM
 
float last_animation_speed = 0.0f
 
std::string hotbar_image = ""
 
std::string hotbar_selected_image = ""
 
video::SColor light_color = video::SColor(255, 255, 255, 255)
 
float hurt_tilt_timer = 0.0f
 
float hurt_tilt_strength = 0.0f
 
- Public Attributes inherited from Player
v3f eye_offset_first
 
v3f eye_offset_third
 
v3f eye_offset_third_front
 
Inventory inventory
 
f32 movement_acceleration_default
 
f32 movement_acceleration_air
 
f32 movement_acceleration_fast
 
f32 movement_speed_walk
 
f32 movement_speed_crouch
 
f32 movement_speed_fast
 
f32 movement_speed_climb
 
f32 movement_speed_jump
 
f32 movement_liquid_fluidity
 
f32 movement_liquid_fluidity_smooth
 
f32 movement_liquid_sink
 
f32 movement_gravity
 
v2s32 local_animations [4]
 
float local_animation_speed
 
std::string inventory_formspec
 
std::string formspec_prepend
 
PlayerControl control
 
PlayerPhysicsOverride physics_override
 
u32 hud_flags
 
s32 hud_hotbar_itemcount
 

Private Member Functions

void accelerate (const v3f &target_speed, const f32 max_increase_H, const f32 max_increase_V, const bool use_pitch)
 
bool updateSneakNode (Map *map, const v3f &position, const v3f &sneak_max)
 
float getSlipFactor (Environment *env, const v3f &speedH)
 
void handleAutojump (f32 dtime, Environment *env, const collisionMoveResult &result, const v3f &position_before_move, const v3f &speed_before_move, f32 pos_max_d)
 

Private Attributes

v3f m_position
 
v3s16 m_standing_node
 
v3s16 m_sneak_node = v3s16(32767, 32767, 32767)
 
aabb3f m_sneak_node_bb_top = aabb3f(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)
 
bool m_sneak_node_exists = false
 
bool m_sneak_ladder_detected = false
 
f32 m_sneak_node_bb_ymax = 0.0f
 
bool m_need_to_get_new_sneak_node = true
 
v3s16 m_old_node_below = v3s16(32767, 32767, 32767)
 
std::string m_old_node_below_type = "air"
 
bool m_can_jump = false
 
bool m_disable_jump = false
 
bool m_disable_descend = false
 
u16 m_breath = PLAYER_MAX_BREATH_DEFAULT
 
f32 m_yaw = 0.0f
 
f32 m_pitch = 0.0f
 
aabb3f m_collisionbox
 
float m_eye_height = 1.625f
 
float m_zoom_fov = 0.0f
 
bool m_autojump = false
 
float m_autojump_time = 0.0f
 
v3f m_added_velocity = v3f(0.0f)
 
GenericCAOm_cao = nullptr
 
Clientm_client
 
PlayerSettings m_player_settings
 
Lighting m_lighting
 

Additional Inherited Members

- Protected Attributes inherited from Player
char m_name [PLAYERNAME_SIZE]
 
v3f m_speed
 
u16 m_wield_index = 0
 
PlayerFovSpec m_fov_override_spec = { 0.0f, false, 0.0f }
 
std::vector< HudElement * > hud
 

Constructor & Destructor Documentation

◆ LocalPlayer()

LocalPlayer::LocalPlayer ( Client client,
const char *  name 
)

References m_player_settings, PlayerSettings::readGlobalSettings(), and PlayerSettings::registerSettingsCallback().

+ Here is the call graph for this function:

◆ ~LocalPlayer()

LocalPlayer::~LocalPlayer ( )
virtual

References PlayerSettings::deregisterSettingsCallback(), and m_player_settings.

+ Here is the call graph for this function:

Member Function Documentation

◆ accelerate()

void LocalPlayer::accelerate ( const v3f target_speed,
const f32  max_increase_H,
const f32  max_increase_V,
const bool  use_pitch 
)
private

References getPitch(), getYaw(), and Player::m_speed.

Referenced by applyControl().

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

◆ addPosition()

void LocalPlayer::addPosition ( const v3f added_pos)
inline

References m_position, and m_sneak_node_exists.

Referenced by Client::handleCommand_MovePlayerRel().

+ Here is the caller graph for this function:

◆ addVelocity()

void LocalPlayer::addVelocity ( const v3f vel)
inline

References m_added_velocity.

Referenced by Client::handleCommand_PlayerSpeed().

+ Here is the caller graph for this function:

◆ applyControl()

void LocalPlayer::applyControl ( float  dtime,
Environment env 
)

References accelerate(), PlayerPhysicsOverride::acceleration_air, PlayerPhysicsOverride::acceleration_default, PlayerPhysicsOverride::acceleration_fast, PlayerSettings::always_fly_fast, PlayerControl::aux1, PlayerSettings::aux1_descends, BS, Client::checkLocalPrivilege(), Player::control, PlayerSettings::fast_move, PlayerSettings::free_move, Client::getEventManager(), getParent(), getPlayerSettings(), getSlipFactor(), Player::getSpeed(), in_liquid, in_liquid_stable, is_climbing, PlayerControl::jump, PlayerPhysicsOverride::jump, m_autojump, m_autojump_time, m_can_jump, m_client, m_disable_descend, m_disable_jump, Player::movement_acceleration_air, Player::movement_acceleration_default, Player::movement_acceleration_fast, PlayerControl::movement_direction, PlayerControl::movement_speed, Player::movement_speed_climb, Player::movement_speed_crouch, Player::movement_speed_fast, Player::movement_speed_jump, Player::movement_speed_walk, Player::physics_override, PlayerControl::pitch, PlayerSettings::pitch_move, MtEvent::PLAYER_JUMP, MtEventManager::put(), setPitch(), Player::setSpeed(), setYaw(), PlayerControl::sneak, PlayerPhysicsOverride::speed, PlayerPhysicsOverride::speed_climb, PlayerPhysicsOverride::speed_crouch, PlayerPhysicsOverride::speed_fast, PlayerPhysicsOverride::speed_walk, swimming_pitch, swimming_vertical, touching_ground, and PlayerControl::yaw.

Referenced by ClientEnvironment::step().

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

◆ getAutojump()

bool LocalPlayer::getAutojump ( ) const
inline

References m_autojump.

Referenced by Game::updatePlayerControl().

+ Here is the caller graph for this function:

◆ getBreath()

u16 LocalPlayer::getBreath ( ) const
inline

References m_breath.

Referenced by LuaLocalPlayer::l_get_breath().

+ Here is the caller graph for this function:

◆ getCAO()

GenericCAO * LocalPlayer::getCAO ( ) const
inline

References m_cao.

Referenced by collisionMoveSimple(), Game::handleClientEvent_PlayerDamage(), isDead(), LuaLocalPlayer::l_get_armor_groups(), LuaCamera::l_set_camera_mode(), Game::openInventory(), ClientEnvironment::step(), Camera::update(), and Game::updateCamera().

+ Here is the caller graph for this function:

◆ getCollisionbox()

const aabb3f & LocalPlayer::getCollisionbox ( ) const
inline

References m_collisionbox.

Referenced by collisionMoveSimple().

+ Here is the caller graph for this function:

◆ getEyeOffset()

v3f LocalPlayer::getEyeOffset ( ) const

References BS, and m_eye_height.

Referenced by getEyePosition(), LuaCamera::l_get_offset(), and Camera::update().

+ Here is the caller graph for this function:

◆ getEyePosition()

v3f LocalPlayer::getEyePosition ( ) const
inline

References getEyeOffset(), and m_position.

+ Here is the call graph for this function:

◆ getFootstepNodePos()

v3s16 LocalPlayer::getFootstepNodePos ( )

References BS, floatToInt(), getPosition(), in_liquid_stable, m_collisionbox, and touching_ground.

Referenced by Game::updateSound().

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

◆ getLighting()

Lighting & LocalPlayer::getLighting ( )
inline

References m_lighting.

Referenced by Client::handleCommand_SetLighting(), and GameGlobalShaderConstantSetter::onSetConstants().

+ Here is the caller graph for this function:

◆ getLightPosition()

v3s16 LocalPlayer::getLightPosition ( ) const

References BS, floatToInt(), and m_position.

Referenced by ClientEnvironment::step().

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

◆ getParent()

ClientActiveObject * LocalPlayer::getParent ( ) const

References GenericCAO::getParent(), and m_cao.

Referenced by applyControl(), collisionMoveSimple(), LuaLocalPlayer::l_is_attached(), move(), old_move(), Camera::update(), and Game::updateSound().

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

◆ getPitch()

f32 LocalPlayer::getPitch ( ) const
inline

References m_pitch.

Referenced by accelerate(), LuaCamera::l_get_look_vertical(), Client::sendPlayerPos(), Camera::update(), Game::updateFrame(), and writePlayerPos().

+ Here is the caller graph for this function:

◆ getPlayerSettings()

PlayerSettings & LocalPlayer::getPlayerSettings ( )
inline

References m_player_settings.

Referenced by applyControl(), handleAutojump(), move(), old_move(), and Game::updatePlayerControl().

+ Here is the caller graph for this function:

◆ getPosition()

v3f LocalPlayer::getPosition ( ) const
inline

◆ getSlipFactor()

float LocalPlayer::getSlipFactor ( Environment env,
const v3f speedH 
)
private

References NodeDefManager::get(), Environment::getGameDef(), Environment::getMap(), Map::getNode(), getStandingNodePos(), ContentFeatures::groups, itemgroup_get(), IGameDef::ndef(), and ContentFeatures::walkable.

Referenced by applyControl().

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

◆ getStandingNodePos()

v3s16 LocalPlayer::getStandingNodePos ( )

References m_sneak_node, m_sneak_node_exists, and m_standing_node.

Referenced by Hud::drawBlockBounds(), getSlipFactor(), Game::nodePlacement(), and old_move().

+ Here is the caller graph for this function:

◆ getYaw()

f32 LocalPlayer::getYaw ( ) const
inline

References m_yaw.

Referenced by accelerate(), LuaCamera::l_get_look_horizontal(), Client::sendPlayerPos(), GenericCAO::step(), Camera::update(), Game::updateFrame(), and writePlayerPos().

+ Here is the caller graph for this function:

◆ getZoomFOV()

float LocalPlayer::getZoomFOV ( ) const
inline

References m_zoom_fov.

Referenced by Game::checkZoomEnabled(), and Camera::update().

+ Here is the caller graph for this function:

◆ handleAutojump()

void LocalPlayer::handleAutojump ( f32  dtime,
Environment env,
const collisionMoveResult result,
const v3f position_before_move,
const v3f speed_before_move,
f32  pos_max_d 
)
private

References PlayerSettings::autojump, BS, COLLISION_NODE, collisionMoveSimple(), collisionMoveResult::collisions, CONTENT_IGNORE, Player::control, floatToInt(), NodeDefManager::get(), MapNode::getContent(), Environment::getGameDef(), Environment::getMap(), Map::getNode(), getPlayerSettings(), gravity, PlayerControl::isMoving(), PlayerControl::jump, PlayerPhysicsOverride::jump, m_autojump, m_autojump_time, m_can_jump, m_client, m_collisionbox, m_position, Player::movement_speed_jump, IGameDef::ndef(), Player::physics_override, PlayerControl::sneak, and ContentFeatures::walkable.

Referenced by move(), and old_move().

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

◆ isDead()

bool LocalPlayer::isDead ( ) const

References FATAL_ERROR_IF, getCAO(), hp, and GenericCAO::isImmortal().

Referenced by Client::sendPlayerPos(), and Game::updatePlayerControl().

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

◆ maxHudId()

u32 LocalPlayer::maxHudId ( ) const
inline

References Player::hud.

Referenced by Hud::drawLuaElements(), and Hud::hasElementOfType().

+ Here is the caller graph for this function:

◆ move() [1/2]

void LocalPlayer::move ( f32  dtime,
Environment env,
f32  pos_max_d 
)
virtual

Reimplemented from Player.

References move().

Referenced by move(), and ClientEnvironment::step().

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

◆ move() [2/2]

void LocalPlayer::move ( f32  dtime,
Environment env,
f32  pos_max_d,
std::vector< CollisionInfo > *  collision_info 
)
virtual

Reimplemented from Player.

References BS, camera_impact, Client::checkLocalPrivilege(), ContentFeatures::climbable, collisionMoveResult::collides, COLLISION_AXIS_Y, COLLISION_NODE, collisionMoveSimple(), collisionMoveResult::collisions, Player::control, floatToInt(), PlayerSettings::free_move, NodeDefManager::get(), MapNode::getContent(), Client::getEventManager(), Environment::getMap(), Map::getNode(), getParent(), getPlayerSettings(), getPosition(), GenericCAO::getPosition(), Player::getSpeed(), GenericCAO::getStepHeight(), gravity, ContentFeatures::groups, handleAutojump(), in_liquid, in_liquid_stable, intToFloat(), is_climbing, itemgroup_get(), PlayerControl::jump, PlayerPhysicsOverride::jump, ContentFeatures::liquid_move_physics, m_added_velocity, m_can_jump, m_cao, m_client, m_collisionbox, m_disable_descend, m_disable_jump, m_position, m_sneak_ladder_detected, m_sneak_node, m_sneak_node_bb_top, m_sneak_node_exists, Player::m_speed, m_standing_node, move_resistance, ContentFeatures::move_resistance, Player::movement_speed_jump, IGameDef::ndef(), PlayerPhysicsOverride::new_move, CollisionInfo::new_speed, PlayerSettings::noclip, CollisionInfo::node_p, old_move(), CollisionInfo::old_speed, Player::physics_override, MtEvent::PLAYER_REGAIN_GROUND, MtEventManager::put(), rangelim, sanity_check, setPosition(), Player::setSpeed(), PlayerControl::sneak, PlayerPhysicsOverride::sneak, PlayerPhysicsOverride::sneak_glitch, collisionMoveResult::standing_on_object, touching_ground, collisionMoveResult::touching_ground, and updateSneakNode().

+ Here is the call graph for this function:

◆ old_move()

void LocalPlayer::old_move ( f32  dtime,
Environment env,
f32  pos_max_d,
std::vector< CollisionInfo > *  collision_info 
)

References BS, camera_impact, Client::checkLocalPrivilege(), ContentFeatures::climbable, collisionMoveResult::collides, COLLISION_AXIS_Y, collisionMoveSimple(), collisionMoveResult::collisions, Player::control, floatToInt(), PlayerSettings::free_move, NodeDefManager::get(), MapNode::getCollisionBoxes(), MapNode::getContent(), Client::getEventManager(), Environment::getMap(), Map::getNode(), getParent(), getPlayerSettings(), getPosition(), GenericCAO::getPosition(), Player::getSpeed(), getStandingNodePos(), gravity, ContentFeatures::groups, handleAutojump(), in_liquid, in_liquid_stable, intToFloat(), is_climbing, itemgroup_get(), PlayerControl::jump, PlayerPhysicsOverride::jump, ContentFeatures::liquid_move_physics, m_added_velocity, m_can_jump, m_cao, m_client, m_collisionbox, m_disable_descend, m_disable_jump, m_need_to_get_new_sneak_node, m_old_node_below, m_old_node_below_type, m_position, m_sneak_node, m_sneak_node_bb_ymax, m_sneak_node_exists, Player::m_speed, m_standing_node, move_resistance, ContentFeatures::move_resistance, Player::movement_speed_jump, MYMAX, ContentFeatures::name, IGameDef::ndef(), PlayerSettings::noclip, p(), Player::physics_override, MtEvent::PLAYER_REGAIN_GROUND, MtEventManager::put(), rangelim, sanity_check, setPosition(), Player::setSpeed(), PlayerControl::sneak, PlayerPhysicsOverride::sneak, PlayerPhysicsOverride::sneak_glitch, collisionMoveResult::standing_on_object, touching_ground, collisionMoveResult::touching_ground, and ContentFeatures::walkable.

Referenced by move().

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

◆ setBreath()

void LocalPlayer::setBreath ( u16  breath)
inline

References m_breath.

Referenced by Client::handleCommand_Breath().

+ Here is the caller graph for this function:

◆ setCAO()

void LocalPlayer::setCAO ( GenericCAO toset)
inline

References m_cao.

Referenced by GenericCAO::processInitData().

+ Here is the caller graph for this function:

◆ setCollisionbox()

void LocalPlayer::setCollisionbox ( const aabb3f box)
inline

References m_collisionbox.

Referenced by GenericCAO::processMessage().

+ Here is the caller graph for this function:

◆ setEyeHeight()

void LocalPlayer::setEyeHeight ( float  eye_height)
inline

References m_eye_height.

Referenced by GenericCAO::processMessage().

+ Here is the caller graph for this function:

◆ setPitch()

void LocalPlayer::setPitch ( f32  pitch)
inline

References m_pitch.

Referenced by applyControl().

+ Here is the caller graph for this function:

◆ setPosition()

void LocalPlayer::setPosition ( const v3f position)
inline

References m_position, and m_sneak_node_exists.

Referenced by Client::handleCommand_AuthAccept(), Client::handleCommand_MovePlayer(), move(), and old_move().

+ Here is the caller graph for this function:

◆ setYaw()

void LocalPlayer::setYaw ( f32  yaw)
inline

References m_yaw.

Referenced by applyControl().

+ Here is the caller graph for this function:

◆ setZoomFOV()

void LocalPlayer::setZoomFOV ( float  zoom_fov)
inline

References m_zoom_fov.

Referenced by GenericCAO::processMessage().

+ Here is the caller graph for this function:

◆ updateSneakNode()

bool LocalPlayer::updateSneakNode ( Map map,
const v3f position,
const v3f sneak_max 
)
private

References BS, floatToInt(), NodeDefManager::get(), MapNode::getCollisionBoxes(), Map::getNode(), getNodeBoundingBox(), intToFloat(), m_client, m_collisionbox, m_sneak_ladder_detected, m_sneak_node, m_sneak_node_bb_top, m_sneak_node_exists, IGameDef::ndef(), p(), Player::physics_override, PlayerPhysicsOverride::sneak_glitch, and ContentFeatures::walkable.

Referenced by move().

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

Member Data Documentation

◆ camera_impact

float LocalPlayer::camera_impact = 0.0f

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

◆ gravity

f32 LocalPlayer::gravity = 0

◆ hotbar_image

std::string LocalPlayer::hotbar_image = ""

◆ hotbar_selected_image

std::string LocalPlayer::hotbar_selected_image = ""

◆ hp

◆ hurt_tilt_strength

◆ hurt_tilt_timer

◆ in_liquid

◆ in_liquid_stable

◆ is_climbing

bool LocalPlayer::is_climbing = false

◆ last_animation

LocalPlayerAnimation LocalPlayer::last_animation = LocalPlayerAnimation::NO_ANIM

◆ last_animation_speed

float LocalPlayer::last_animation_speed = 0.0f

Referenced by GenericCAO::step().

◆ last_camera_fov

u8 LocalPlayer::last_camera_fov = 0

Referenced by Client::sendPlayerPos().

◆ last_camera_inverted

bool LocalPlayer::last_camera_inverted = false

Referenced by Client::sendPlayerPos().

◆ last_keyPressed

u32 LocalPlayer::last_keyPressed = 0

Referenced by Client::sendPlayerPos().

◆ last_pitch

float LocalPlayer::last_pitch = 0.0f

◆ last_position

v3f LocalPlayer::last_position

◆ last_speed

v3f LocalPlayer::last_speed

◆ last_wanted_range

u8 LocalPlayer::last_wanted_range = 0

Referenced by Client::sendPlayerPos().

◆ last_yaw

float LocalPlayer::last_yaw = 0.0f

◆ light_color

video::SColor LocalPlayer::light_color = video::SColor(255, 255, 255, 255)

◆ m_added_velocity

v3f LocalPlayer::m_added_velocity = v3f(0.0f)
private

Referenced by addVelocity(), move(), and old_move().

◆ m_autojump

bool LocalPlayer::m_autojump = false
private

◆ m_autojump_time

float LocalPlayer::m_autojump_time = 0.0f
private

Referenced by applyControl(), and handleAutojump().

◆ m_breath

u16 LocalPlayer::m_breath = PLAYER_MAX_BREATH_DEFAULT
private

Referenced by getBreath(), and setBreath().

◆ m_can_jump

bool LocalPlayer::m_can_jump = false
private

◆ m_cao

GenericCAO* LocalPlayer::m_cao = nullptr
private

Referenced by getCAO(), getParent(), move(), old_move(), and setCAO().

◆ m_client

Client* LocalPlayer::m_client
private

◆ m_collisionbox

aabb3f LocalPlayer::m_collisionbox
private
Initial value:
= aabb3f(-BS * 0.30f, 0.0f, -BS * 0.30f, BS * 0.30f,
BS * 1.75f, BS * 0.30f)
#define BS
Definition: constants.h:76
core::aabbox3d< f32 > aabb3f
Definition: irr_aabb3d.h:26

Referenced by getCollisionbox(), getFootstepNodePos(), handleAutojump(), move(), old_move(), setCollisionbox(), and updateSneakNode().

◆ m_disable_descend

bool LocalPlayer::m_disable_descend = false
private

Referenced by applyControl(), move(), and old_move().

◆ m_disable_jump

bool LocalPlayer::m_disable_jump = false
private

Referenced by applyControl(), move(), and old_move().

◆ m_eye_height

float LocalPlayer::m_eye_height = 1.625f
private

Referenced by getEyeOffset(), and setEyeHeight().

◆ m_lighting

Lighting LocalPlayer::m_lighting
private

Referenced by getLighting().

◆ m_need_to_get_new_sneak_node

bool LocalPlayer::m_need_to_get_new_sneak_node = true
private

Referenced by old_move().

◆ m_old_node_below

v3s16 LocalPlayer::m_old_node_below = v3s16(32767, 32767, 32767)
private

Referenced by old_move().

◆ m_old_node_below_type

std::string LocalPlayer::m_old_node_below_type = "air"
private

Referenced by old_move().

◆ m_pitch

f32 LocalPlayer::m_pitch = 0.0f
private

Referenced by getPitch(), and setPitch().

◆ m_player_settings

PlayerSettings LocalPlayer::m_player_settings
private

◆ m_position

◆ m_sneak_ladder_detected

bool LocalPlayer::m_sneak_ladder_detected = false
private

Referenced by move(), and updateSneakNode().

◆ m_sneak_node

v3s16 LocalPlayer::m_sneak_node = v3s16(32767, 32767, 32767)
private

◆ m_sneak_node_bb_top

aabb3f LocalPlayer::m_sneak_node_bb_top = aabb3f(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)
private

Referenced by move(), and updateSneakNode().

◆ m_sneak_node_bb_ymax

f32 LocalPlayer::m_sneak_node_bb_ymax = 0.0f
private

Referenced by old_move().

◆ m_sneak_node_exists

bool LocalPlayer::m_sneak_node_exists = false
private

◆ m_standing_node

v3s16 LocalPlayer::m_standing_node
private

Referenced by getStandingNodePos(), move(), and old_move().

◆ m_yaw

f32 LocalPlayer::m_yaw = 0.0f
private

Referenced by getYaw(), and setYaw().

◆ m_zoom_fov

float LocalPlayer::m_zoom_fov = 0.0f
private

Referenced by getZoomFOV(), and setZoomFOV().

◆ makes_footstep_sound

bool LocalPlayer::makes_footstep_sound = true

◆ move_resistance

u8 LocalPlayer::move_resistance = 0

◆ swimming_pitch

bool LocalPlayer::swimming_pitch = false

◆ swimming_vertical

bool LocalPlayer::swimming_vertical = false

◆ touching_ground


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