[GameState] Now using a 70° FOV.
This commit is contained in:
parent
758f55647e
commit
b9ec32ec71
@ -45,7 +45,7 @@ class GameState : public gk::ApplicationState {
|
||||
|
||||
gk::Shader m_shader;
|
||||
|
||||
gk::Camera m_camera{FOV, DIST_NEAR, DIST_FAR};
|
||||
gk::Camera m_camera{70.0f, DIST_NEAR, DIST_FAR};
|
||||
ClientPlayer m_player{m_camera};
|
||||
|
||||
Client m_client;
|
||||
|
@ -85,6 +85,9 @@ void GameState::onEvent(const SDL_Event &event) {
|
||||
void GameState::update() {
|
||||
m_world.update();
|
||||
|
||||
if (m_camera.getFieldOfView() != Config::cameraFOV)
|
||||
m_camera.setFieldOfView(Config::cameraFOV);
|
||||
|
||||
if (m_clientCommandHandler.isRegistryInitialized()) {
|
||||
if (&m_stateStack->top() == this) {
|
||||
m_player.processInputs();
|
||||
|
@ -22,8 +22,6 @@ namespace {
|
||||
constexpr float SCREEN_WIDTH = 1600;
|
||||
constexpr float SCREEN_HEIGHT = 1050;
|
||||
|
||||
constexpr float FOV = 45.0f;
|
||||
|
||||
constexpr float DIST_NEAR = 0.1f;
|
||||
constexpr float DIST_FAR = 1000.0f;
|
||||
|
||||
@ -47,6 +45,7 @@ namespace Config {
|
||||
extern bool isAmbientOcclusionEnabled;
|
||||
extern bool isWireframeModeEnabled;
|
||||
extern u16 renderDistance;
|
||||
extern float cameraFOV;
|
||||
}
|
||||
|
||||
#endif // CONFIG_HPP_
|
||||
|
@ -25,4 +25,5 @@ bool Config::isSunSmoothLightingEnabled = true;
|
||||
bool Config::isAmbientOcclusionEnabled = false;
|
||||
bool Config::isWireframeModeEnabled = false;
|
||||
u16 Config::renderDistance = 8;
|
||||
float Config::cameraFOV = 70.0f;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user