From e660b05523326bdd1ee4c6d5ae4c4002711e4582 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sun, 13 May 2018 10:15:35 +0200 Subject: Fix C++03 compiling due to C++11 initialization issues in backport --- src/localplayer.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 9000888bf..ea2da15da 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -34,7 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc., LocalPlayer::LocalPlayer(Client *client, const char *name): Player(name, client->idef()), - parent(0), + parent(NULL), hp(PLAYER_MAX_HP), isAttached(false), touching_ground(false), @@ -53,8 +53,8 @@ LocalPlayer::LocalPlayer(Client *client, const char *name): overridePosition(v3f(0,0,0)), last_position(v3f(0,0,0)), last_speed(v3f(0,0,0)), - last_pitch(0), - last_yaw(0), + last_pitch(0.0f), + last_yaw(0.0f), last_keyPressed(0), last_camera_fov(0), last_wanted_range(0), @@ -67,6 +67,12 @@ LocalPlayer::LocalPlayer(Client *client, const char *name): hurt_tilt_timer(0.0f), hurt_tilt_strength(0.0f), m_position(0,0,0), + m_sneak_node(32767, 32767, 32767), + m_sneak_node_bb_top(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f), + m_sneak_node_exists(false), + m_sneak_ladder_detected(false), + m_sneak_node_bb_ymax(0.0f), + m_need_to_get_new_sneak_node(true), m_old_node_below(32767,32767,32767), m_old_node_below_type("air"), m_can_jump(false), -- cgit v1.2.3