From 6d86927105cb4d30b350c3c535d92501bc8acef5 Mon Sep 17 00:00:00 2001 From: Xenomedes of Gimhae Date: Fri, 31 Jan 2020 04:54:32 +0900 Subject: [PATCH 1/3] Duck-tape ms_to_omt_copy --- src/vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 6b142c947a075..31ef0eb9bd544 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -4583,7 +4583,7 @@ int vehicle::total_solar_epower_w() const int vehicle::total_wind_epower_w() const { - const oter_id &cur_om_ter = overmap_buffer.ter( g->m.getabs( global_pos3() ) ); + const oter_id &cur_om_ter = overmap_buffer.ter( ms_to_omt_copy( g->m.getabs( global_pos3() ) ) ); const w_point weatherPoint = *g->weather.weather_precise; int epower_w = 0; for( int part : wind_turbines ) { From 20d786916575e0af9344ccb49ca5da8ff60850be Mon Sep 17 00:00:00 2001 From: Xenomedes of Gimhae Date: Fri, 31 Jan 2020 17:26:59 +0900 Subject: [PATCH 2/3] Duck-tape another ms_to_omt_copy --- src/weather.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/weather.cpp b/src/weather.cpp index 2cdbac5932c84..634174c0327de 100644 --- a/src/weather.cpp +++ b/src/weather.cpp @@ -158,7 +158,7 @@ weather_sum sum_conditions( const time_point &start, const time_point &end, weather_type wtype = current_weather( location, t ); proc_weather_sum( wtype, data, t, tick_size ); - data.wind_amount += get_local_windpower( g->weather.windspeed, overmap_buffer.ter( location ), + data.wind_amount += get_local_windpower( g->weather.windspeed, overmap_buffer.ter( ms_to_omt_copy( location ) ), location, g->weather.winddirection, false ) * to_turns( tick_size ); } From f345f667ce8a8885c4d38327e6d0717220d22692 Mon Sep 17 00:00:00 2001 From: Xenomedes of Gimhae Date: Fri, 31 Jan 2020 17:39:52 +0900 Subject: [PATCH 3/3] Fix typo in comments --- src/coordinate_conversions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coordinate_conversions.h b/src/coordinate_conversions.h index d1de308e567c8..472fa8823a6cc 100644 --- a/src/coordinate_conversions.h +++ b/src/coordinate_conversions.h @@ -49,7 +49,7 @@ @endcode * Functions ending with _copy return the translated coordinates, * other functions change the parameters itself and don't return anything. - * Functions ending with _remain return teh translated coordinates and + * Functions ending with _remain return the translated coordinates and * store the remainder in the parameters. */