From 4e93ba06a749fa2503786bf8d7dbda3d1e36a65a Mon Sep 17 00:00:00 2001 From: est31 Date: Mon, 25 Jan 2016 00:06:01 +0100 Subject: Don't pass non-const references to collision methods Non const references cause a lot of confusion with behaviour of code, and are disallowed by minetest style guide. --- src/localplayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/localplayer.cpp') diff --git a/src/localplayer.cpp b/src/localplayer.cpp index fd781f940..60aec95d4 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -214,8 +214,8 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d, v3f accel_f = v3f(0,0,0); collisionMoveResult result = collisionMoveSimple(env, m_gamedef, - pos_max_d, m_collisionbox, player_stepheight, dtime, - position, m_speed, accel_f); + pos_max_d, m_collisionbox, player_stepheight, dtime, + &position, &m_speed, accel_f); /* If the player's feet touch the topside of any node, this is -- cgit v1.2.3