Skip to content
Snippets Groups Projects
Commit e5379486 authored by Perttu Ahola's avatar Perttu Ahola
Browse files

LocalPlayer::getStandingNodePos()

parent 8c2f3bb3
No related merge requests found
......@@ -759,5 +759,13 @@ void LocalPlayer::applyControl(float dtime)
// Accelerate to target speed with maximum increment
accelerate(speed, inc);
}
v3s16 LocalPlayer::getStandingNodePos()
{
if(m_sneak_node_exists)
return m_sneak_node;
return floatToInt(getPosition(), BS);
}
#endif
......@@ -236,6 +236,8 @@ class LocalPlayer : public Player
void move(f32 dtime, Map &map, f32 pos_max_d);
void applyControl(float dtime);
v3s16 getStandingNodePos();
PlayerControl control;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment