diff options
author | tron <tron@openttd.org> | 2006-06-27 21:25:53 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-27 21:25:53 +0000 |
commit | 2b27073156f40df263cf653263488b8d72a76236 (patch) | |
tree | 1bfdb9c99b43fdc3b07ac13cbed4259a06d34f6f /disaster_cmd.c | |
parent | c126ce110ee33bffe07dac5283d8a1648dc662b7 (diff) | |
download | openttd-2b27073156f40df263cf653263488b8d72a76236.tar.xz |
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
Diffstat (limited to 'disaster_cmd.c')
-rw-r--r-- | disaster_cmd.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/disaster_cmd.c b/disaster_cmd.c index e0fc51b04..2b1488bb9 100644 --- a/disaster_cmd.c +++ b/disaster_cmd.c @@ -599,8 +599,9 @@ static void DisasterTick_4(Vehicle *v) } while (tile != tile_org); v->dest_tile = tile; v->age = 0; - } else + } else { return; + } } // The plane which will shoot down the UFO @@ -664,8 +665,7 @@ static void DisasterTick_5_and_6(Vehicle *v) return; } - if (!(v->tick_counter&1)) - return; + if (!(v->tick_counter & 1)) return; tile = v->tile + TileOffsByDir(DirToDiagDir(v->direction)); if (IsValidTile(tile) && @@ -715,11 +715,9 @@ static void Disaster0_Init(void) Station *st; int x; - if (v == NULL) - return; + if (v == NULL) return; - /* Pick a random place, unless we find - a small airport */ + /* Pick a random place, unless we find a small airport */ x = TileX(Random()) * TILE_SIZE + TILE_SIZE / 2; FOR_ALL_STATIONS(st) { @@ -747,8 +745,7 @@ static void Disaster1_Init(void) Vehicle *v = ForceAllocateSpecialVehicle(), *u; int x; - if (v == NULL) - return; + if (v == NULL) return; x = TileX(Random()) * TILE_SIZE + TILE_SIZE / 2; @@ -776,17 +773,15 @@ static void Disaster2_Init(void) FOR_ALL_INDUSTRIES(i) { if (i->xy != 0 && i->type == IT_OIL_REFINERY && - (found==NULL || CHANCE16(1,2))) { + (found == NULL || CHANCE16(1, 2))) { found = i; } } - if (found == NULL) - return; + if (found == NULL) return; v = ForceAllocateSpecialVehicle(); - if (v == NULL) - return; + if (v == NULL) return; x = (MapSizeX() + 9) * TILE_SIZE - 1; y = TileY(found->xy) * TILE_SIZE + 37; @@ -817,12 +812,10 @@ static void Disaster3_Init(void) } } - if (found == NULL) - return; + if (found == NULL) return; v = ForceAllocateSpecialVehicle(); - if (v == NULL) - return; + if (v == NULL) return; x = -16 * TILE_SIZE; y = TileY(found->xy) * TILE_SIZE + 37; |