mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
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.
This commit is contained in:
parent
ad884f23d4
commit
4e93ba06a7
7 changed files with 98 additions and 108 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue