Fix Station industries_near incorrect after removing part moved sign

RecomputeCatchment was being called before moving the sign tile
instead of afterwards

See: https://github.com/OpenTTD/OpenTTD/issues/9937
pull/407/head
Jonathan G Rennison 2 years ago
parent 91e0529a39
commit 6150edd3b4

@ -828,7 +828,6 @@ static void DeleteStationIfEmpty(BaseStation *st)
void Station::AfterStationTileSetChange(bool adding, StationType type)
{
this->UpdateVirtCoord();
this->RecomputeCatchment();
DirtyCompanyInfrastructureWindows(this->owner);
if (adding) InvalidateWindowData(WC_STATION_LIST, this->owner, 0);
@ -849,10 +848,12 @@ void Station::AfterStationTileSetChange(bool adding, StationType type)
}
if (adding) {
this->RecomputeCatchment();
UpdateStationAcceptance(this, false);
InvalidateWindowData(WC_SELECT_STATION, 0, 0);
} else {
DeleteStationIfEmpty(this);
this->RecomputeCatchment();
}
}

Loading…
Cancel
Save