LocalPlayer::getStandingNodePos()
This commit is contained in:
parent
8c2f3bb378
commit
e53794868e
|
@ -759,5 +759,13 @@ void LocalPlayer::applyControl(float dtime)
|
||||||
// Accelerate to target speed with maximum increment
|
// Accelerate to target speed with maximum increment
|
||||||
accelerate(speed, inc);
|
accelerate(speed, inc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v3s16 LocalPlayer::getStandingNodePos()
|
||||||
|
{
|
||||||
|
if(m_sneak_node_exists)
|
||||||
|
return m_sneak_node;
|
||||||
|
return floatToInt(getPosition(), BS);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -236,6 +236,8 @@ public:
|
||||||
void move(f32 dtime, Map &map, f32 pos_max_d);
|
void move(f32 dtime, Map &map, f32 pos_max_d);
|
||||||
|
|
||||||
void applyControl(float dtime);
|
void applyControl(float dtime);
|
||||||
|
|
||||||
|
v3s16 getStandingNodePos();
|
||||||
|
|
||||||
PlayerControl control;
|
PlayerControl control;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue