diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-18 19:58:18 +0000 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-18 19:58:18 +0000 |
commit | 858a4f56c3899798fea179eb275b4fcbf55e601f (patch) | |
tree | 1dc2513a03911eff6db127b8e3b2cec71241a85a /src | |
parent | b0cb2054fae07a688174d6b78fd310c986233de3 (diff) |
Change how the view size is calculated.
The old way could result in very large fields of view if the window was
made very thin.
Diffstat (limited to 'src')
-rw-r--r-- | src/game/interface.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/interface.cpp b/src/game/interface.cpp index d125392..67f5482 100644 --- a/src/game/interface.cpp +++ b/src/game/interface.cpp @@ -32,8 +32,8 @@ void state_t::tick(double dt) { float view_scale; - view_scale = 3 * exp(camera.zoom * 0.12); - if (size.x > size.y) { + view_scale = 4.5 * exp(camera.zoom * 0.12); + if (size.x < size.y) { view_size.y = view_scale; view_size.x = view_scale * size.x / size.y; } else { |