![]() |
Botcraft 1.21.4
|
#include <LocalPlayer.hpp>
Public Member Functions | |
LocalPlayer () | |
virtual | ~LocalPlayer () |
Vector3< double > | GetFrontVector () const |
Vector3< double > | GetXZVector () const |
Vector3< double > | GetRightVector () const |
GameType | GetGameMode () const |
char | GetAbilitiesFlags () const |
bool | GetInvulnerable () const |
bool | GetFlying () const |
bool | GetMayFly () const |
bool | GetInstabuild () const |
If true, the player can break any block in no time (creative mode) | |
bool | GetMayBuild () const |
float | GetFlyingSpeed () const |
float | GetWalkingSpeed () const |
float | GetHealth () const |
int | GetFood () const |
float | GetFoodSaturation () const |
bool | GetDirtyInputs () const |
bool | IsClimbing () const |
bool | IsInWater () const |
bool | IsInLava () const |
bool | IsInFluid () const |
void | SetGameMode (const GameType game_mode_) |
void | SetAbilitiesFlags (const char abilities_flags_) |
void | SetFlyingSpeed (const float flying_speed_) |
void | SetWalkingSpeed (const float walking_speed_) |
void | SetHealth (const float health_) |
void | SetFood (const int food_) |
void | SetFoodSaturation (const float food_saturation_) |
void | SetDirtyInputs () |
virtual void | SetPosition (const Vector3< double > &pos) override |
virtual void | SetX (const double x) override |
virtual void | SetY (const double y) override |
virtual void | SetZ (const double z) override |
virtual void | SetYaw (const float yaw_) override |
Set Yaw angle (horizontal plane orientation) | |
virtual void | SetPitch (const float pitch_) override |
Set Pitch angle (look up is -90°, look down is 90°) | |
void | SetInputsForward (const float f) |
void | AddInputsForward (const float f) |
void | SetInputsLeft (const float f) |
void | AddInputsLeft (const float f) |
void | SetInputsJump (const bool b) |
void | SetInputsSneak (const bool b) |
void | SetInputsSprint (const bool b) |
void | SetInputs (const PlayerInputs &inputs_) |
virtual bool | IsLocalPlayer () const override |
virtual bool | IsRemotePlayer () const override |
void | LookAt (const Vector3< double > &pos, const bool set_pitch=false) |
![]() | |
PlayerEntity () | |
virtual | ~PlayerEntity () |
virtual std::string | GetName () const override |
Get the name of this entity TYPE as a string. For player name see NetworkManager::GetMyName() | |
virtual EntityType | GetType () const override |
AABB | GetCollider (const Pose pose) const |
double | GetHeight (const Pose pose) const |
double | GetWidth (const Pose pose) const |
double | GetEyeHeight () const |
virtual ProtocolCraft::Json::Value | Serialize () const override |
virtual void | SetMetadataValue (const int index, const std::any &value) override |
float | GetDataPlayerAbsorptionId () const |
int | GetDataScoreId () const |
char | GetDataPlayerModeCustomisation () const |
char | GetDataPlayerMainHand () const |
ProtocolCraft::NBT::Value | GetDataShoulderLeft () const |
ProtocolCraft::NBT::Value | GetDataShoulderRight () const |
void | SetDataPlayerAbsorptionId (const float data_player_absorption_id) |
void | SetDataScoreId (const int data_score_id) |
void | SetDataPlayerModeCustomisation (const char data_player_mode_customisation) |
void | SetDataPlayerMainHand (const char data_player_main_hand) |
void | SetDataShoulderLeft (const ProtocolCraft::NBT::Value &data_shoulder_left) |
void | SetDataShoulderRight (const ProtocolCraft::NBT::Value &data_shoulder_right) |
double | GetAttributeAttackDamageValue () const |
double | GetAttributeAttackSpeedValue () const |
double | GetAttributeLuckValue () const |
double | GetAttributePlayerBlockInteractionRangeValue () const |
double | GetAttributePlayerEntityInteractionRangeValue () const |
double | GetAttributePlayerBlockBreakSpeedValue () const |
double | GetAttributePlayerSubmergedMiningSpeedValue () const |
double | GetAttributePlayerSneakingSpeedValue () const |
double | GetAttributePlayerMiningEfficiencyValue () const |
double | GetAttributePlayerSweepingDamageRatioValue () const |
AABB | GetCollider () const |
double | GetHeight () const |
double | GetWidth () const |
![]() | |
LivingEntity () | |
virtual | ~LivingEntity () |
virtual bool | IsLivingEntity () const override |
char | GetDataLivingEntityFlags () const |
float | GetDataHealthId () const |
std::vector< ProtocolCraft::Particle > | GetDataEffectParticles () const |
bool | GetDataEffectAmbienceId () const |
int | GetDataArrowCountId () const |
int | GetDataStingerCountId () const |
std::optional< Position > | GetSleepingPosId () const |
void | SetDataLivingEntityFlags (const char data_living_entity_flags) |
void | SetDataHealthId (const float data_health_id) |
void | SetDataEffectParticles (const std::vector< ProtocolCraft::Particle > &data_effect_particles) |
void | SetDataEffectAmbienceId (const bool data_effect_ambience_id) |
void | SetDataArrowCountId (const int data_arrow_count_id) |
void | SetDataStingerCountId (const int data_stinger_count_id) |
void | SetSleepingPosId (const std::optional< Position > &sleeping_pos_id) |
std::optional< EntityAttribute > | GetAttribute (const EntityAttribute::Type type) const |
void | SetAttributeBaseValue (const EntityAttribute::Type type, const double value) |
void | RemoveAttributeModifier (const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key) |
void | SetAttributeModifier (const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key, const EntityAttribute::Modifier &modifier) |
void | ClearModifiers (const EntityAttribute::Type type) |
void | AddAttribute (const EntityAttribute &attribute) |
double | GetAttributeMaxHealthValue () const |
double | GetAttributeKnockbackResistanceValue () const |
double | GetAttributeMovementSpeedValue () const |
double | GetAttributeArmorValue () const |
double | GetAttributeArmorToughnessValue () const |
double | GetAttributeMaxAbsorptionValue () const |
double | GetAttributeStepHeightValue () const |
double | GetAttributeScaleValue () const |
double | GetAttributeGravityValue () const |
double | GetAttributeSafeFallDistanceValue () const |
double | GetAttributeFallDamageMultiplierValue () const |
double | GetAttributeJumpStrengthValue () const |
double | GetAttributeOxygenBonusValue () const |
double | GetAttributeBurningTimeValue () const |
double | GetAttributeExplosionKnockbackResistanceValue () const |
double | GetAttributeWaterMovementEfficiencyValue () const |
double | GetAttributeMovementEfficiencyValue () const |
double | GetAttributeAttackKnockbackValue () const |
![]() | |
Entity () | |
virtual | ~Entity () |
AABB | GetCollider () const |
double | GetWidth () const |
double | GetHeight () const |
void | LoadMetadataFromRawArray (const std::vector< unsigned char > &data) |
char | GetDataSharedFlagsId () const |
bool | GetDataSharedFlagsId (const EntitySharedFlagsId id) const |
int | GetDataAirSupplyId () const |
std::optional< ProtocolCraft::Chat > | GetDataCustomName () const |
bool | GetDataCustomNameVisible () const |
bool | GetDataSilent () const |
bool | GetDataNoGravity () const |
Pose | GetDataPose () const |
int | GetDataTicksFrozen () const |
void | SetDataSharedFlagsId (const char data_shared_flags_id) |
void | SetDataSharedFlagsId (const EntitySharedFlagsId id, const bool b) |
void | SetDataAirSupplyId (const int data_air_supply_id) |
void | SetDataCustomName (const std::optional< ProtocolCraft::Chat > &data_custom_name) |
void | SetDataCustomNameVisible (const bool data_custom_name_visible) |
void | SetDataSilent (const bool data_silent) |
void | SetDataNoGravity (const bool data_no_gravity) |
void | SetDataPose (const Pose data_pose) |
void | SetDataTicksFrozen (const int data_ticks_frozen) |
int | GetEntityID () const |
ProtocolCraft::UUID | GetUUID () const |
Vector3< double > | GetPosition () const |
double | GetX () const |
double | GetY () const |
double | GetZ () const |
float | GetYaw () const |
float | GetPitch () const |
Vector3< double > | GetSpeed () const |
double | GetSpeedX () const |
double | GetSpeedY () const |
double | GetSpeedZ () const |
bool | GetOnGround () const |
std::map< EquipmentSlot, ProtocolCraft::Slot > | GetEquipments () const |
ProtocolCraft::Slot | GetEquipment (const EquipmentSlot slot) const |
std::vector< EntityEffect > | GetEffects () const |
std::vector< Renderer::Face > | GetFaces (const bool reset_uptodate_status) |
bool | GetAreRenderedFacesUpToDate () const |
void | SetEntityID (const int entity_id_) |
void | SetUUID (const ProtocolCraft::UUID &uuid_) |
void | SetSpeed (const Vector3< double > &speed_) |
void | SetSpeedX (const double speed_x_) |
void | SetSpeedY (const double speed_y_) |
void | SetSpeedZ (const double speed_z_) |
void | SetOnGround (const bool on_ground_) |
void | SetEquipment (const EquipmentSlot slot, const ProtocolCraft::Slot &item) |
void | SetEffects (const std::vector< EntityEffect > &effects_) |
void | AddEffect (const EntityEffect &effect) |
void | RemoveEffect (const EntityEffectType type) |
void | SetAreRenderedFacesUpToDate (const bool are_rendered_faces_up_to_date_) |
virtual bool | IsAbstractArrow () const |
virtual bool | IsAnimal () const |
virtual bool | IsAmbientCreature () const |
virtual bool | IsMonster () const |
virtual bool | IsDisplay () const |
virtual bool | IsVehicle () const |
virtual bool | IsTamableAnimal () const |
virtual bool | IsAbstractSchoolingFish () const |
virtual bool | IsWaterAnimal () const |
virtual bool | IsAbstractChestedHorse () const |
virtual bool | IsAbstractHurtingProjectile () const |
virtual bool | IsMob () const |
virtual bool | IsSpellcasterIllager () const |
virtual bool | IsProjectile () const |
virtual bool | IsFlyingMob () const |
virtual bool | IsAbstractHorse () const |
virtual bool | IsAbstractGolem () const |
virtual bool | IsHangingEntity () const |
virtual bool | IsFireball () const |
virtual bool | IsAbstractMinecart () const |
virtual bool | IsAbstractMinecartContainer () const |
virtual bool | IsShoulderRidingEntity () const |
virtual bool | IsAbstractPiglin () const |
virtual bool | IsAbstractIllager () const |
virtual bool | IsAbstractFish () const |
virtual bool | IsRaider () const |
virtual bool | IsAbstractSkeleton () const |
virtual bool | IsThrowableItemProjectile () const |
virtual bool | IsAbstractVillager () const |
virtual bool | IsAgeableMob () const |
virtual bool | IsPathfinderMob () const |
virtual bool | IsPatrollingMonster () const |
virtual bool | IsThrowableProjectile () const |
virtual bool | IsAbstractWindCharge () const |
virtual bool | IsBlockAttachedEntity () const |
virtual bool | IsAbstractBoat () const |
virtual bool | IsAbstractChestBoat () const |
virtual bool | IsAgeableWaterCreature () const |
virtual bool | IsBoat () const |
virtual bool | IsChestBoat () const |
virtual bool | IsChestRaft () const |
virtual bool | IsRaft () const |
Private Member Functions | |
void | UpdateVectors () |
void | ResetInputs () |
void | SetAbilitiesFlagsImpl (const char abilities_flags_) |
void | UpdateAbilitiesFlagsImpl () |
Friends | |
class | PhysicsManager |
Additional Inherited Members | |
![]() | |
static std::string | GetClassName () |
static EntityType | GetClassType () |
![]() | |
static std::shared_ptr< Entity > | CreateEntity (const EntityType type) |
![]() | |
static const std::string | speed_modifier_powder_snow_key = "minecraft:powder_snow" |
static const std::string | speed_modifier_sprinting_key = "minecraft:sprinting" |
![]() | |
virtual double | GetEyeHeightImpl () const |
virtual double | GetWidthImpl () const override |
virtual double | GetHeightImpl () const override |
AABB | GetColliderImpl (const Pose pose) const |
double | GetAttributePlayerSneakingSpeedValueImpl () const |
AABB | GetColliderImpl () const |
![]() | |
double | GetAttributeMovementSpeedValueImpl () const |
void | RemoveAttributeModifierImpl (const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key) |
void | SetAttributeModifierImpl (const EntityAttribute::Type type, const EntityAttribute::ModifierKey &key, const EntityAttribute::Modifier &modifier) |
char | GetDataLivingEntityFlagsImpl () const |
std::optional< Position > | GetSleepingPosIdImpl () const |
double | GetAttributeStepHeightValueImpl () const |
double | GetAttributeGravityValueImpl () const |
double | GetAttributeJumpStrengthValueImpl () const |
double | GetAttributeWaterMovementEfficiencyValueImpl () const |
double | GetAttributeMovementEfficiencyValueImpl () const |
![]() | |
virtual void | InitializeFaces () |
void | OnSizeUpdated () |
char | GetDataSharedFlagsIdImpl () const |
bool | GetDataSharedFlagsIdImpl (const EntitySharedFlagsId id) const |
void | SetDataSharedFlagsIdImpl (const char data_shared_flags_id) |
void | SetDataSharedFlagsIdImpl (const EntitySharedFlagsId id, const bool b) |
Pose | GetDataPoseImpl () const |
void | SetDataPoseImpl (const Pose data_pose) |
AABB | GetColliderImpl () const |
![]() | |
std::map< EntityAttribute::Type, EntityAttribute > | attributes |
![]() | |
std::shared_mutex | entity_mutex |
int | entity_id |
ProtocolCraft::UUID | uuid |
Vector3< double > | position |
float | yaw |
float | pitch |
Vector3< double > | speed |
bool | on_ground |
std::map< EquipmentSlot, ProtocolCraft::Slot > | equipments |
Items on this entity. | |
std::vector< EntityEffect > | effects |
std::map< std::string, std::any > | metadata |
std::vector< FaceDescriptor > | face_descriptors |
std::vector< Renderer::Face > | faces |
bool | are_rendered_faces_up_to_date |
![]() | |
static constexpr int | metadata_count = 6 |
static const std::array< std::string, metadata_count > | metadata_names |
static constexpr int | hierarchy_metadata_count = LivingEntity::metadata_count + LivingEntity::hierarchy_metadata_count |
![]() | |
static constexpr int | metadata_count = 7 |
static const std::array< std::string, metadata_count > | metadata_names |
static constexpr int | hierarchy_metadata_count = Entity::metadata_count + Entity::hierarchy_metadata_count |
![]() | |
static constexpr int | metadata_count = 8 |
static const std::array< std::string, metadata_count > | metadata_names |
static constexpr int | hierarchy_metadata_count = 0 |
Definition at line 18 of file LocalPlayer.hpp.
Botcraft::LocalPlayer::LocalPlayer | ( | ) |
Definition at line 8 of file LocalPlayer.cpp.
References crouching, dirty_inputs, Botcraft::Entity::entity_mutex, fly_jump_trigger_time, flying, flying_speed, food, food_saturation, front_vector, game_mode, health, horizontal_collision, in_lava, in_water, inputs, instabuild, invulnerable, jump_delay, last_sent_inputs, may_build, may_fly, Botcraft::None, on_climbable, on_ground_without_supporting_block, Botcraft::Entity::position, previous_forward, previous_horizontal_collision, previous_jump, previous_on_ground, previous_pitch, previous_position, previous_shift_key_down, previous_sneak, previous_sprinting, previous_yaw, right_vector, sprint_double_tap_trigger_time, stuck_speed_multiplier, supporting_block_pos, under_water, UpdateAbilitiesFlagsImpl(), and walking_speed.
|
virtual |
Definition at line 62 of file LocalPlayer.cpp.
void Botcraft::LocalPlayer::AddInputsForward | ( | const float | f | ) |
Definition at line 290 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::Entity::entity_mutex, Botcraft::PlayerInputs::forward_axis, and inputs.
void Botcraft::LocalPlayer::AddInputsLeft | ( | const float | f | ) |
Definition at line 304 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::Entity::entity_mutex, inputs, and Botcraft::PlayerInputs::left_axis.
char Botcraft::LocalPlayer::GetAbilitiesFlags | ( | ) | const |
Definition at line 93 of file LocalPlayer.cpp.
References abilities_flags, and Botcraft::Entity::entity_mutex.
bool Botcraft::LocalPlayer::GetDirtyInputs | ( | ) | const |
Definition at line 159 of file LocalPlayer.cpp.
References dirty_inputs, and Botcraft::Entity::entity_mutex.
bool Botcraft::LocalPlayer::GetFlying | ( | ) | const |
Definition at line 105 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and flying.
float Botcraft::LocalPlayer::GetFlyingSpeed | ( | ) | const |
Definition at line 129 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and flying_speed.
int Botcraft::LocalPlayer::GetFood | ( | ) | const |
Definition at line 147 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and food.
float Botcraft::LocalPlayer::GetFoodSaturation | ( | ) | const |
Definition at line 153 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and food_saturation.
Vector3< double > Botcraft::LocalPlayer::GetFrontVector | ( | ) | const |
Definition at line 68 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and front_vector.
GameType Botcraft::LocalPlayer::GetGameMode | ( | ) | const |
Definition at line 87 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and game_mode.
float Botcraft::LocalPlayer::GetHealth | ( | ) | const |
Definition at line 141 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and health.
bool Botcraft::LocalPlayer::GetInstabuild | ( | ) | const |
If true, the player can break any block in no time (creative mode)
Definition at line 117 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and instabuild.
bool Botcraft::LocalPlayer::GetInvulnerable | ( | ) | const |
Definition at line 99 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and invulnerable.
bool Botcraft::LocalPlayer::GetMayBuild | ( | ) | const |
Definition at line 123 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and may_build.
bool Botcraft::LocalPlayer::GetMayFly | ( | ) | const |
Definition at line 111 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and may_fly.
Vector3< double > Botcraft::LocalPlayer::GetRightVector | ( | ) | const |
Definition at line 80 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and right_vector.
float Botcraft::LocalPlayer::GetWalkingSpeed | ( | ) | const |
Definition at line 135 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and walking_speed.
Vector3< double > Botcraft::LocalPlayer::GetXZVector | ( | ) | const |
Definition at line 74 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and xz_vector.
bool Botcraft::LocalPlayer::IsClimbing | ( | ) | const |
Definition at line 165 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and on_climbable.
bool Botcraft::LocalPlayer::IsInFluid | ( | ) | const |
Definition at line 183 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, in_lava, and in_water.
bool Botcraft::LocalPlayer::IsInLava | ( | ) | const |
Definition at line 177 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and in_lava.
bool Botcraft::LocalPlayer::IsInWater | ( | ) | const |
Definition at line 171 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and in_water.
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Definition at line 339 of file LocalPlayer.cpp.
|
overridevirtual |
Reimplemented from Botcraft::PlayerEntity.
Definition at line 344 of file LocalPlayer.cpp.
void Botcraft::LocalPlayer::LookAt | ( | const Vector3< double > & | pos, |
const bool | set_pitch = false |
||
) |
Definition at line 349 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, Botcraft::PlayerEntity::GetEyeHeightImpl(), Botcraft::Vector3< T >::Normalize(), Botcraft::Entity::pitch, Botcraft::Entity::position, UpdateVectors(), Botcraft::Vector3< T >::x, Botcraft::Vector3< T >::y, Botcraft::Entity::yaw, and Botcraft::Vector3< T >::z.
|
private |
Definition at line 394 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::PlayerInputs::forward_axis, inputs, Botcraft::PlayerInputs::jump, Botcraft::PlayerInputs::left_axis, Botcraft::PlayerInputs::sneak, and Botcraft::PlayerInputs::sprint.
void Botcraft::LocalPlayer::SetAbilitiesFlags | ( | const char | abilities_flags_ | ) |
Definition at line 196 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and SetAbilitiesFlagsImpl().
|
private |
Definition at line 404 of file LocalPlayer.cpp.
References abilities_flags, flying, instabuild, invulnerable, may_build, and may_fly.
Referenced by SetAbilitiesFlags().
void Botcraft::LocalPlayer::SetDirtyInputs | ( | ) |
Definition at line 232 of file LocalPlayer.cpp.
References dirty_inputs, and Botcraft::Entity::entity_mutex.
void Botcraft::LocalPlayer::SetFlyingSpeed | ( | const float | flying_speed_ | ) |
Definition at line 202 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and flying_speed.
void Botcraft::LocalPlayer::SetFood | ( | const int | food_ | ) |
Definition at line 220 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and food.
void Botcraft::LocalPlayer::SetFoodSaturation | ( | const float | food_saturation_ | ) |
Definition at line 226 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and food_saturation.
void Botcraft::LocalPlayer::SetGameMode | ( | const GameType | game_mode_ | ) |
Definition at line 190 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and game_mode.
void Botcraft::LocalPlayer::SetHealth | ( | const float | health_ | ) |
Definition at line 214 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and health.
void Botcraft::LocalPlayer::SetInputs | ( | const PlayerInputs & | inputs_ | ) |
Definition at line 332 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::Entity::entity_mutex, and inputs.
void Botcraft::LocalPlayer::SetInputsForward | ( | const float | f | ) |
Definition at line 283 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::Entity::entity_mutex, Botcraft::PlayerInputs::forward_axis, and inputs.
void Botcraft::LocalPlayer::SetInputsJump | ( | const bool | b | ) |
Definition at line 311 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::Entity::entity_mutex, inputs, and Botcraft::PlayerInputs::jump.
void Botcraft::LocalPlayer::SetInputsLeft | ( | const float | f | ) |
Definition at line 297 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::Entity::entity_mutex, inputs, and Botcraft::PlayerInputs::left_axis.
void Botcraft::LocalPlayer::SetInputsSneak | ( | const bool | b | ) |
Definition at line 318 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::Entity::entity_mutex, inputs, and Botcraft::PlayerInputs::sneak.
void Botcraft::LocalPlayer::SetInputsSprint | ( | const bool | b | ) |
Definition at line 325 of file LocalPlayer.cpp.
References dirty_inputs, Botcraft::Entity::entity_mutex, inputs, and Botcraft::PlayerInputs::sprint.
|
overridevirtual |
Set Pitch angle (look up is -90°, look down is 90°)
pitch_ | New pitch, in degree |
Reimplemented from Botcraft::Entity.
Definition at line 273 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, Botcraft::Entity::pitch, and UpdateVectors().
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Definition at line 239 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and Botcraft::Entity::position.
void Botcraft::LocalPlayer::SetWalkingSpeed | ( | const float | walking_speed_ | ) |
Definition at line 208 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, and walking_speed.
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Definition at line 245 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, Botcraft::Entity::position, and Botcraft::Vector3< T >::x.
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Definition at line 251 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, Botcraft::Entity::position, and Botcraft::Vector3< T >::y.
|
overridevirtual |
Set Yaw angle (horizontal plane orientation)
yaw_ | New yaw, in degree |
Reimplemented from Botcraft::Entity.
Definition at line 263 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, UpdateVectors(), and Botcraft::Entity::yaw.
|
overridevirtual |
Reimplemented from Botcraft::Entity.
Definition at line 257 of file LocalPlayer.cpp.
References Botcraft::Entity::entity_mutex, Botcraft::Entity::position, and Botcraft::Vector3< T >::z.
|
private |
Definition at line 414 of file LocalPlayer.cpp.
References abilities_flags, flying, instabuild, invulnerable, may_build, and may_fly.
Referenced by LocalPlayer().
|
private |
Definition at line 374 of file LocalPlayer.cpp.
References front_vector, Botcraft::Entity::pitch, right_vector, Botcraft::Vector3< T >::x, xz_vector, Botcraft::Vector3< T >::y, Botcraft::Entity::yaw, and Botcraft::Vector3< T >::z.
Referenced by LookAt(), SetPitch(), and SetYaw().
|
friend |
Definition at line 20 of file LocalPlayer.hpp.
|
private |
Definition at line 107 of file LocalPlayer.hpp.
Referenced by GetAbilitiesFlags(), SetAbilitiesFlagsImpl(), and UpdateAbilitiesFlagsImpl().
|
private |
Definition at line 127 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 103 of file LocalPlayer.hpp.
Referenced by AddInputsForward(), AddInputsLeft(), GetDirtyInputs(), LocalPlayer(), ResetInputs(), SetDirtyInputs(), SetInputs(), SetInputsForward(), SetInputsJump(), SetInputsLeft(), SetInputsSneak(), and SetInputsSprint().
|
private |
Definition at line 132 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Flying in creative/spectator.
Definition at line 110 of file LocalPlayer.hpp.
Referenced by GetFlying(), LocalPlayer(), SetAbilitiesFlagsImpl(), and UpdateAbilitiesFlagsImpl().
|
private |
Definition at line 116 of file LocalPlayer.hpp.
Referenced by GetFlyingSpeed(), LocalPlayer(), and SetFlyingSpeed().
|
private |
Definition at line 120 of file LocalPlayer.hpp.
Referenced by GetFood(), LocalPlayer(), and SetFood().
|
private |
Definition at line 121 of file LocalPlayer.hpp.
Referenced by GetFoodSaturation(), LocalPlayer(), and SetFoodSaturation().
|
private |
Definition at line 98 of file LocalPlayer.hpp.
Referenced by GetFrontVector(), LocalPlayer(), and UpdateVectors().
|
private |
Definition at line 105 of file LocalPlayer.hpp.
Referenced by GetGameMode(), LocalPlayer(), and SetGameMode().
|
private |
Definition at line 119 of file LocalPlayer.hpp.
Referenced by GetHealth(), LocalPlayer(), and SetHealth().
|
private |
Definition at line 128 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 125 of file LocalPlayer.hpp.
Referenced by IsInFluid(), IsInLava(), and LocalPlayer().
|
private |
Definition at line 124 of file LocalPlayer.hpp.
Referenced by IsInFluid(), IsInWater(), and LocalPlayer().
|
private |
Definition at line 102 of file LocalPlayer.hpp.
Referenced by AddInputsForward(), AddInputsLeft(), LocalPlayer(), ResetInputs(), SetInputs(), SetInputsForward(), SetInputsJump(), SetInputsLeft(), SetInputsSneak(), and SetInputsSprint().
|
private |
Insta break blocks in creative.
Definition at line 114 of file LocalPlayer.hpp.
Referenced by GetInstabuild(), LocalPlayer(), SetAbilitiesFlagsImpl(), and UpdateAbilitiesFlagsImpl().
|
private |
Definition at line 108 of file LocalPlayer.hpp.
Referenced by GetInvulnerable(), LocalPlayer(), SetAbilitiesFlagsImpl(), and UpdateAbilitiesFlagsImpl().
|
private |
Definition at line 131 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 148 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 115 of file LocalPlayer.hpp.
Referenced by GetMayBuild(), LocalPlayer(), SetAbilitiesFlagsImpl(), and UpdateAbilitiesFlagsImpl().
|
private |
If this player can fly in creative/spectator.
Definition at line 112 of file LocalPlayer.hpp.
Referenced by GetMayFly(), LocalPlayer(), SetAbilitiesFlagsImpl(), and UpdateAbilitiesFlagsImpl().
|
private |
Definition at line 129 of file LocalPlayer.hpp.
Referenced by IsClimbing(), and LocalPlayer().
|
private |
Definition at line 135 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 145 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 147 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 143 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 142 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 141 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 139 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 138 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 144 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 137 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 140 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 100 of file LocalPlayer.hpp.
Referenced by GetRightVector(), LocalPlayer(), and UpdateVectors().
|
private |
Definition at line 133 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 130 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 134 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 126 of file LocalPlayer.hpp.
Referenced by LocalPlayer().
|
private |
Definition at line 117 of file LocalPlayer.hpp.
Referenced by GetWalkingSpeed(), LocalPlayer(), and SetWalkingSpeed().
|
private |
Definition at line 99 of file LocalPlayer.hpp.
Referenced by GetXZVector(), and UpdateVectors().