diff options
author | truelight <truelight@openttd.org> | 2004-12-30 10:03:35 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-30 10:03:35 +0000 |
commit | 546fcfa3ec6828dba8ebedac449a96284bfd7e06 (patch) | |
tree | a0f5b3a24386860688abd056c31bfa80700cf377 /disaster_cmd.c | |
parent | 32c3fbd18ea40c46717aa6dfa35235aa5b66fe07 (diff) | |
download | openttd-546fcfa3ec6828dba8ebedac449a96284bfd7e06.tar.xz |
(svn r1301) -Codechange: _industries finally has FOR_ALL_INDUSTRIES too
Diffstat (limited to 'disaster_cmd.c')
-rw-r--r-- | disaster_cmd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/disaster_cmd.c b/disaster_cmd.c index a1bf71644..7ea7f747c 100644 --- a/disaster_cmd.c +++ b/disaster_cmd.c @@ -755,7 +755,9 @@ static void Disaster2_Init() Vehicle *v,*u; int x,y; - for(found=NULL,i=_industries; i != endof(_industries); i++) { + found = NULL; + + FOR_ALL_INDUSTRIES(i) { if (i->xy != 0 && i->type == IT_OIL_REFINERY && (found==NULL || CHANCE16(1,2))) { @@ -789,7 +791,9 @@ static void Disaster3_Init() Vehicle *v,*u,*w; int x,y; - for(found=NULL,i=_industries; i != endof(_industries); i++) { + found = NULL; + + FOR_ALL_INDUSTRIES(i) { if (i->xy != 0 && i->type == IT_FACTORY && (found==NULL || CHANCE16(1,2))) { @@ -896,7 +900,7 @@ static void Disaster7_Init() int index = Random() & 0xF; do { - for(i=_industries; i != endof(_industries); i++) { + FOR_ALL_INDUSTRIES(i) { if (i->xy != 0 && i->type == IT_COAL_MINE && --index < 0) { SetDParam(0, i->town->index); |