aboutsummaryrefslogtreecommitdiff
path: root/src/particles.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-01-25 00:06:01 +0100
committerest31 <MTest31@outlook.com>2016-01-29 15:53:54 +0100
commit4e93ba06a749fa2503786bf8d7dbda3d1e36a65a (patch)
treea694b86c85ab9b14e59ae060ea51eba6c44c8ce9 /src/particles.cpp
parentad884f23d4e73d38ce0f529de49591dd66cee44d (diff)
downloadminetest-4e93ba06a749fa2503786bf8d7dbda3d1e36a65a.tar.gz
minetest-4e93ba06a749fa2503786bf8d7dbda3d1e36a65a.tar.bz2
minetest-4e93ba06a749fa2503786bf8d7dbda3d1e36a65a.zip
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.
Diffstat (limited to 'src/particles.cpp')
-rw-r--r--src/particles.cpp4
1 files changed, 1 insertions, 3 deletions
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<f32> 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
{