summaryrefslogtreecommitdiff
path: root/game/geoData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/geoData.cpp')
-rw-r--r--game/geoData.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index 78f753f..781b41e 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -25,8 +25,8 @@ GeoData::loadFromAsciiGrid(const std::filesystem::path & input)
vertices.reserve(ncols * nrows);
GeoData mesh;
mesh.lowerExtent = {xllcorner, yllcorner, std::numeric_limits<float>::max()};
- mesh.upperExtent
- = {xllcorner + (cellsize * ncols), yllcorner + (cellsize * nrows), std::numeric_limits<float>::min()};
+ mesh.upperExtent = {xllcorner + (cellsize * (ncols - 1)), yllcorner + (cellsize * (nrows - 1)),
+ std::numeric_limits<float>::min()};
for (size_t row = 0; row < nrows; ++row) {
for (size_t col = 0; col < ncols; ++col) {
float height = 0;