Change player position to be at the feet, rather than the head
Note: This breaks the visualization of the other players (PlayerBox).
This commit is contained in:
parent
101df11c14
commit
89a1520d7c
@ -40,7 +40,7 @@ ClientPlayer::ClientPlayer(gk::Camera &camera) : m_camera(camera) {
|
||||
// FIXME: Warning: Duplicated in ServerCommandHandler.hpp
|
||||
m_x = 14;
|
||||
m_y = 14;
|
||||
m_z = 20;
|
||||
m_z = 18;
|
||||
|
||||
m_viewAngleH = -90.;
|
||||
m_viewAngleV = 0.01;
|
||||
@ -118,7 +118,7 @@ void ClientPlayer::processInputs() {
|
||||
}
|
||||
|
||||
void ClientPlayer::updatePosition(const ClientWorld &world) {
|
||||
ClientChunk *chunk = (ClientChunk *)world.getChunkAtBlockPos(m_x, m_y, m_z - 0.2);
|
||||
ClientChunk *chunk = (ClientChunk *)world.getChunkAtBlockPos(m_x, m_y, m_z);
|
||||
if (!Config::isFlyModeEnabled && chunk && chunk->isInitialized()) {
|
||||
m_velocity.z -= m_gravity; // Gravity
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "Player.hpp"
|
||||
|
||||
Player::Player() {
|
||||
m_hitbox = gk::FloatBox{-0.2, -0.2, -1.8, 0.4, 0.4, 1.8};
|
||||
m_hitbox = gk::FloatBox{-0.3125, -0.3125, 0, 0.625, 0.625, 1.75};
|
||||
}
|
||||
|
||||
void Player::serialize(sf::Packet &packet) const {
|
||||
|
@ -65,7 +65,7 @@ class ServerCommandHandler {
|
||||
Registry &m_registry;
|
||||
|
||||
// FIXME: Warning: Duplicated in ClientPlayer.cpp
|
||||
gk::Vector3<s32> m_spawnPosition{14, 14, 20};
|
||||
gk::Vector3<s32> m_spawnPosition{14, 14, 18};
|
||||
};
|
||||
|
||||
#endif // SERVERCOMMANDHANDLER_HPP_
|
||||
|
Loading…
x
Reference in New Issue
Block a user