mirror of https://github.com/OpenTTD/OpenTTD
Fix d84b67e5: Station rating effects affecting too large area
parent
58c8ff456e
commit
3fcb240f8e
|
@ -3858,7 +3858,7 @@ void StationMonthlyLoop()
|
||||||
void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius)
|
void ModifyStationRatingAround(TileIndex tile, Owner owner, int amount, uint radius)
|
||||||
{
|
{
|
||||||
ForAllStationsRadius(tile, radius, [&](Station *st) {
|
ForAllStationsRadius(tile, radius, [&](Station *st) {
|
||||||
if (st->owner == owner) {
|
if (st->owner == owner && DistanceManhattan(tile, st->xy) <= radius) {
|
||||||
for (CargoID i = 0; i < NUM_CARGO; i++) {
|
for (CargoID i = 0; i < NUM_CARGO; i++) {
|
||||||
GoodsEntry *ge = &st->goods[i];
|
GoodsEntry *ge = &st->goods[i];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue