Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few wrong coordinate conversions that cause generation of meaningless overmaps #37581

Merged
merged 3 commits into from
Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coordinate_conversions.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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