camera_impact = getSpeed().Y * -1;
}
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
*/
/*
Check properties of the node on which the player is standing
*/
v3f LocalPlayer::getEyeOffset() 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
}
ClientActiveObject *LocalPlayer::getParent() const
camera_impact = getSpeed().Y * -1.0f;
}
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
*/
/*
Update the node last under the player
*/
u16 m_breath = PLAYER_MAX_BREATH_DEFAULT;
f32 m_yaw = 0.0f;
f32 m_pitch = 0.0f;
u16 m_breath = PLAYER_MAX_BREATH_DEFAULT;
f32 m_yaw = 0.0f;
f32 m_pitch = 0.0f;
- bool camera_barely_in_ceiling = false;
aabb3f m_collisionbox = aabb3f(-BS * 0.30f, 0.0f, -BS * 0.30f, BS * 0.30f,
BS * 1.75f, BS * 0.30f);
float m_eye_height = 1.625f;
aabb3f m_collisionbox = aabb3f(-BS * 0.30f, 0.0f, -BS * 0.30f, BS * 0.30f,
BS * 1.75f, BS * 0.30f);
float m_eye_height = 1.625f;