(svn r21516) -Codechange: Add IsGroundVehicle function to the Vehicle class.

This commit is contained in:
terkhen
2010-12-14 21:26:03 +00:00
parent 96b98b392a
commit 79e2b3153d
9 changed files with 27 additions and 18 deletions

View File

@@ -506,7 +506,7 @@ static bool DisasterTick_Big_Ufo(DisasterVehicle *v)
Vehicle *target;
FOR_ALL_VEHICLES(target) {
if (target->type == VEH_TRAIN || target->type == VEH_ROAD) {
if (target->IsGroundVehicle()) {
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;