summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-04-23 09:52:40 +0200
committerGitHub <noreply@github.com>2017-04-23 09:52:40 +0200
commit91a9382c25328075d1a27593b22b0a75863951e1 (patch)
treec0806621a7af000f31360a78d486d8e25f3bf52f /src/localplayer.h
parent0c34fe20a101f3e9297b3ffab4e8b736a55a558f (diff)
downloadminetest-91a9382c25328075d1a27593b22b0a75863951e1.tar.gz
minetest-91a9382c25328075d1a27593b22b0a75863951e1.tar.bz2
minetest-91a9382c25328075d1a27593b22b0a75863951e1.zip
Pass clang-format on various cpp/header files (#5559)
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index 01e859bf0..d8d2f310b 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -30,7 +30,13 @@ class GenericCAO;
class ClientActiveObject;
class IGameDef;
-enum LocalPlayerAnimations {NO_ANIM, WALK_ANIM, DIG_ANIM, WD_ANIM}; // no local animation, walking, digging, both
+enum LocalPlayerAnimations
+{
+ NO_ANIM,
+ WALK_ANIM,
+ DIG_ANIM,
+ WD_ANIM
+}; // no local animation, walking, digging, both
class LocalPlayer : public Player
{
@@ -97,12 +103,11 @@ public:
float hurt_tilt_timer;
float hurt_tilt_strength;
- GenericCAO* getCAO() const {
- return m_cao;
- }
+ GenericCAO *getCAO() const { return m_cao; }
- void setCAO(GenericCAO* toset) {
- assert( m_cao == NULL ); // Pre-condition
+ void setCAO(GenericCAO *toset)
+ {
+ assert(m_cao == NULL); // Pre-condition
m_cao = toset;
}
@@ -113,28 +118,20 @@ public:
v3s16 getLightPosition() const;
- void setYaw(f32 yaw)
- {
- m_yaw = yaw;
- }
+ void setYaw(f32 yaw) { m_yaw = yaw; }
f32 getYaw() const { return m_yaw; }
- void setPitch(f32 pitch)
- {
- m_pitch = pitch;
- }
+ void setPitch(f32 pitch) { m_pitch = pitch; }
f32 getPitch() const { return m_pitch; }
- void setPosition(const v3f &position)
- {
- m_position = position;
- }
+ void setPosition(const v3f &position) { m_position = position; }
v3f getPosition() const { return m_position; }
v3f getEyePosition() const { return m_position + getEyeOffset(); }
v3f getEyeOffset() const;
+
private:
void accelerateHorizontal(const v3f &target_speed, const f32 max_increase);
void accelerateVertical(const v3f &target_speed, const f32 max_increase);
@@ -169,9 +166,8 @@ private:
bool camera_barely_in_ceiling;
aabb3f m_collisionbox;
- GenericCAO* m_cao;
+ GenericCAO *m_cao;
Client *m_client;
};
#endif
-