X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flocalplayer.h;h=c64e0042aac35b13dddbcaf7d1554d6678315b15;hb=f6a33a1a7a298cb7d3fb18818bae97bd1b89d633;hp=67b22b65636eecc1f3d1eef96c9c356ff513000a;hpb=2ea26e655d90be538c75aad5cc7ede2c5709179f;p=minetest.git diff --git a/src/localplayer.h b/src/localplayer.h index 67b22b656..c64e0042a 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef LOCALPLAYER_HEADER -#define LOCALPLAYER_HEADER +#pragma once #include "player.h" #include "environment.h" @@ -44,7 +43,7 @@ class LocalPlayer : public Player { public: LocalPlayer(Client *client, const char *name); - virtual ~LocalPlayer(); + virtual ~LocalPlayer() = default; ClientActiveObject *parent = nullptr; @@ -79,7 +78,7 @@ class LocalPlayer : public Player void old_move(f32 dtime, Environment *env, f32 pos_max_d, std::vector *collision_info); - void applyControl(float dtime, ClientEnvironment *env); + void applyControl(float dtime, Environment *env); v3s16 getStandingNodePos(); v3s16 getFootstepNodePos(); @@ -144,8 +143,9 @@ class LocalPlayer : public Player void setCollisionbox(const aabb3f &box) { m_collisionbox = box; } private: - void accelerateHorizontal(const v3f &target_speed, - const f32 max_increase, bool slippery); + // clang-format off + void accelerateHorizontal(const v3f &target_speed, f32 max_increase, bool slippery); + // clang-format on void accelerateVertical(const v3f &target_speed, const f32 max_increase); bool updateSneakNode(Map *map, const v3f &position, const v3f &sneak_max); @@ -182,5 +182,3 @@ class LocalPlayer : public Player GenericCAO *m_cao = nullptr; Client *m_client; }; - -#endif