]> git.lizzy.rs Git - minetest.git/blobdiff - src/localplayer.h
Overlays for wield and inventory images (#6107)
[minetest.git] / src / localplayer.h
index 67b22b65636eecc1f3d1eef96c9c356ff513000a..c64e0042aac35b13dddbcaf7d1554d6678315b15 100644 (file)
@@ -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<CollisionInfo> *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