1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Remove obsolete eye_height related workaround

This was added a long time ago in 42bbd5c9ae
and meant to fix prevent the view becoming black when jumping into a
ceiling, this no longer happens today.
This commit is contained in:
sfan5 2022-05-21 19:27:35 +02:00
parent 6a6b579c54
commit 5f3af7d18b
2 changed files with 1 additions and 23 deletions

View file

@ -426,16 +426,6 @@ void LocalPlayer::move(f32 dtime, Environment *env, f32 pos_max_d,
camera_impact = getSpeed().Y * -1;
}
{
camera_barely_in_ceiling = false;
v3s16 camera_np = floatToInt(getEyePosition(), BS);
MapNode n = map->getNode(camera_np);
if (n.getContent() != CONTENT_IGNORE) {
if (nodemgr->get(n).walkable && nodemgr->get(n).solidness == 2)
camera_barely_in_ceiling = true;
}
}
/*
Check properties of the node on which the player is standing
*/
@ -696,8 +686,7 @@ v3s16 LocalPlayer::getLightPosition() const
v3f LocalPlayer::getEyeOffset() const
{
float eye_height = camera_barely_in_ceiling ? m_eye_height - 0.125f : m_eye_height;
return v3f(0.0f, BS * eye_height, 0.0f);
return v3f(0.0f, BS * m_eye_height, 0.0f);
}
ClientActiveObject *LocalPlayer::getParent() const
@ -1025,16 +1014,6 @@ void LocalPlayer::old_move(f32 dtime, Environment *env, f32 pos_max_d,
camera_impact = getSpeed().Y * -1.0f;
}
{
camera_barely_in_ceiling = false;
v3s16 camera_np = floatToInt(getEyePosition(), BS);
MapNode n = map->getNode(camera_np);
if (n.getContent() != CONTENT_IGNORE) {
if (nodemgr->get(n).walkable && nodemgr->get(n).solidness == 2)
camera_barely_in_ceiling = true;
}
}
/*
Update the node last under the player
*/