Exclude virtual trains from various vehicle list iterations

This commit is contained in:
Jonathan G Rennison
2019-05-27 17:56:41 +01:00
parent 3c2ebc4588
commit 96f000226e
9 changed files with 17 additions and 14 deletions

View File

@@ -556,7 +556,7 @@ static bool DisasterTick_Big_Ufo(DisasterVehicle *v)
Vehicle *target;
FOR_ALL_VEHICLES(target) {
if (target->IsGroundVehicle()) {
if (target->IsGroundVehicle() && !HasBit(target->subtype, GVSF_VIRTUAL)) {
if (Delta(target->x_pos, v->x_pos) + Delta(target->y_pos, v->y_pos) <= 12 * (int)TILE_SIZE) {
target->breakdown_ctr = 5;
target->breakdown_delay = 0xF0;