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/particles.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/particles.cpp') diff --git a/src/particles.cpp b/src/particles.cpp index ebb54a49a..8150e19ac 100644 --- a/src/particles.cpp +++ b/src/particles.cpp @@ -131,14 +131,12 @@ void Particle::step(float dtime) core::aabbox3d box = m_collisionbox; v3f p_pos = m_pos*BS; v3f p_velocity = m_velocity*BS; - v3f p_acceleration = m_acceleration*BS; collisionMoveSimple(m_env, m_gamedef, BS*0.5, box, 0, dtime, - p_pos, p_velocity, p_acceleration); + &p_pos, &p_velocity, m_acceleration * BS); m_pos = p_pos/BS; m_velocity = p_velocity/BS; - m_acceleration = p_acceleration/BS; } else { -- cgit v1.2.3