1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 09:05:19 +02:00

Add support for setting stepheight for entities

This commit is contained in:
sapier
2013-07-22 18:54:30 +02:00
committed by PilzAdam
parent ff7c380d0e
commit 251e3e01c7
7 changed files with 12 additions and 5 deletions

View File

@@ -505,14 +505,14 @@ void LuaEntitySAO::step(float dtime, bool send_recommended)
box.MaxEdge *= BS;
collisionMoveResult moveresult;
f32 pos_max_d = BS*0.25; // Distance per iteration
f32 stepheight = 0; // Maximum climbable step height
v3f p_pos = m_base_position;
v3f p_velocity = m_velocity;
v3f p_acceleration = m_acceleration;
moveresult = collisionMoveSimple(m_env,m_env->getGameDef(),
pos_max_d, box, stepheight, dtime,
pos_max_d, box, m_prop.stepheight, dtime,
p_pos, p_velocity, p_acceleration,
this, m_prop.collideWithObjects);
// Apply results
m_base_position = p_pos;
m_velocity = p_velocity;