diff --git a/README.md b/README.md index 145900f1f..8c22f4e9b 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - Movement: WASD - Inventory: E - Jump: Space +- Sprint: Left Ctrl - Jetpack: X - Exit: Escape diff --git a/client/include/world/ClientWorld.hpp b/client/include/world/ClientWorld.hpp index 45c6e99f7..242d49a29 100644 --- a/client/include/world/ClientWorld.hpp +++ b/client/include/world/ClientWorld.hpp @@ -39,9 +39,9 @@ class ClientWorld : public gk::IDrawable { void draw(gk::RenderTarget &target, gk::RenderStates states) const override; // FIXME: Duplicated with those in ServerWorld - const s32 m_width = 32; + const s32 m_width = 64; const s32 m_height = 4; - const s32 m_depth = 32; + const s32 m_depth = 64; std::vector> m_chunks; diff --git a/client/source/world/Player.cpp b/client/source/world/Player.cpp index fbb519708..0e5357b12 100644 --- a/client/source/world/Player.cpp +++ b/client/source/world/Player.cpp @@ -92,6 +92,11 @@ void Player::processInputs() { if (gk::GamePad::isKeyPressed(GameKey::Right) && gk::GamePad::isKeyPressed(GameKey::Up)) move(45.0f); if (gk::GamePad::isKeyPressed(GameKey::Left) && gk::GamePad::isKeyPressed(GameKey::Down)) move(-135.0f); if (gk::GamePad::isKeyPressed(GameKey::Right) && gk::GamePad::isKeyPressed(GameKey::Down)) move(135.0f); + + if (gk::GamePad::isKeyPressed(GameKey::Sprint)) { + m_velocity.x *= 1.5; + m_velocity.z *= 1.5; + } } void Player::updatePosition(const ClientWorld &world) { diff --git a/common/include/core/input/GameKey.hpp b/common/include/core/input/GameKey.hpp index 454b52567..99607a24d 100644 --- a/common/include/core/input/GameKey.hpp +++ b/common/include/core/input/GameKey.hpp @@ -24,6 +24,7 @@ namespace GameKey { Jump, Fly, Sneak, + Sprint, Dig, Use, diff --git a/common/source/core/input/KeyboardHandler.cpp b/common/source/core/input/KeyboardHandler.cpp index 25328e510..685de051d 100644 --- a/common/source/core/input/KeyboardHandler.cpp +++ b/common/source/core/input/KeyboardHandler.cpp @@ -43,6 +43,7 @@ KeyboardHandler::KeyboardHandler() { addKey(GameKey::Jump, "Jump"); addKey(GameKey::Fly, "Fly"); addKey(GameKey::Sneak, "Sneak"); + addKey(GameKey::Sprint, "Sprint"); addKey(GameKey::Dig, "Dig"); addKey(GameKey::Use, "Use"); diff --git a/resources/config/keys.xml b/resources/config/keys.xml index 16161d006..bf07dbf84 100644 --- a/resources/config/keys.xml +++ b/resources/config/keys.xml @@ -8,6 +8,7 @@ + diff --git a/server/include/world/ServerWorld.hpp b/server/include/world/ServerWorld.hpp index 34c9c1644..d79f8b80f 100644 --- a/server/include/world/ServerWorld.hpp +++ b/server/include/world/ServerWorld.hpp @@ -39,9 +39,9 @@ class ServerWorld { private: // FIXME: Duplicated with those in ClientWorld - const s32 m_width = 32; + const s32 m_width = 64; const s32 m_height = 4; - const s32 m_depth = 32; + const s32 m_depth = 64; std::vector> m_chunks; };