mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix formula used for acceleration (#12353)
This commit is contained in:
parent
11905a6db6
commit
1317cd12d7
7 changed files with 29 additions and 16 deletions
|
@ -175,8 +175,7 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
|
|||
m_velocity = p_velocity;
|
||||
m_acceleration = p_acceleration;
|
||||
} else {
|
||||
m_base_position += dtime * m_velocity + 0.5 * dtime
|
||||
* dtime * m_acceleration;
|
||||
m_base_position += (m_velocity + m_acceleration * 0.5f * dtime) * dtime;
|
||||
m_velocity += dtime * m_acceleration;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue