From f0b24af3f12d02e5c97aa9c2c050afc907960bcf Mon Sep 17 00:00:00 2001 From: Erik Hofman Date: Sun, 15 Nov 2020 09:31:26 +0100 Subject: [PATCH] Fix an off by one problem which is left from a failed attempt to interpolatre between classes --- src/Environment/climate.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Environment/climate.cxx b/src/Environment/climate.cxx index 84411c748..a0ee78974 100644 --- a/src/Environment/climate.cxx +++ b/src/Environment/climate.cxx @@ -183,11 +183,8 @@ void FGClimate::update(double dt) double rxs = round(xs); double ryt = round(yt); - int xoffs = (rxs < xs) ? -1 : 1; - int yoffs = (ryt < yt) ? -1 : 1; - - int s = static_cast(rxs + xoffs); - int t = static_cast(ryt + yoffs); + int s = static_cast(rxs); + int t = static_cast(ryt); color = image->getColor(s, t); // convert from color shades to koppen-classicfication