summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2018-05-13 10:15:35 +0200
committerSmallJoker <mk939@ymail.com>2018-06-03 17:32:00 +0200
commite660b05523326bdd1ee4c6d5ae4c4002711e4582 (patch)
tree1652ed8b8481e163b611b1f4f5e1a7f25112be55 /src/localplayer.cpp
parent14d20f58275e15fa9e81a82f3db475b0d5c22a2d (diff)
downloadminetest-e660b05523326bdd1ee4c6d5ae4c4002711e4582.tar.gz
minetest-e660b05523326bdd1ee4c6d5ae4c4002711e4582.tar.bz2
minetest-e660b05523326bdd1ee4c6d5ae4c4002711e4582.zip
Fix C++03 compiling due to C++11 initialization issues in backport
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp12
1 files changed, 9 insertions, 3 deletions
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),