1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 01:12:39 +01:00

Codechange: Pass the max-distance as parameter to VehiclesNearTileXY.

This commit is contained in:
frosch
2025-04-26 15:23:14 +02:00
committed by frosch
parent 2df1233f1f
commit 3a70d1e2f7
4 changed files with 25 additions and 18 deletions

View File

@@ -3228,7 +3228,7 @@ static bool CheckTrainCollision(Train *v)
num_victims += CheckTrainCollision(u, v);
}
} else {
for (Vehicle *u : VehiclesNearTileXY(v->x_pos, v->y_pos)) {
for (Vehicle *u : VehiclesNearTileXY(v->x_pos, v->y_pos, 6)) {
num_victims += CheckTrainCollision(u, v);
}
}