mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-21 01:59:44 +00:00
committed by
Peter Nelson
parent
79bf008514
commit
f8e0a8a4eb
+4
-2
@@ -3233,8 +3233,10 @@ static uint CheckTrainCollision(Vehicle *v, Train *t)
|
||||
/* Happens when there is a train under bridge next to bridge head */
|
||||
if (abs(v->z_pos - t->z_pos) > 5) return 0;
|
||||
|
||||
/* crash both trains */
|
||||
return TrainCrashed(t) + TrainCrashed(coll);
|
||||
/* Crash both trains. Two statements required to guarantee execution
|
||||
* order because RandomRange() is involved. */
|
||||
uint num_victims = TrainCrashed(t);
|
||||
return num_victims + TrainCrashed(coll);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user