Skip to content

Commit

Permalink
Fix a few wrong coordinate conversions that cause generation of meani…
Browse files Browse the repository at this point in the history
…ngless overmaps (#37581)

* Duck-tape ms_to_omt_copy

* Duck-tape another ms_to_omt_copy

* Fix typo in comments
  • Loading branch information
park66665 committed Jan 31, 2020
1 parent d3354dd commit 1eb07c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/coordinate_conversions.h
Expand Up @@ -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.
*/

Expand Down
2 changes: 1 addition & 1 deletion src/vehicle.cpp
Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/weather.cpp
Expand Up @@ -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<int>( tick_size );
}
Expand Down

0 comments on commit 1eb07c7

Please sign in to comment.