disaster_cmd.c
changeset 830 8114845804c9
parent 679 e959706a3e4d
child 863 8d09f9331a80
--- a/disaster_cmd.c	Thu Dec 30 09:46:40 2004 +0000
+++ b/disaster_cmd.c	Thu Dec 30 10:03:35 2004 +0000
@@ -755,7 +755,9 @@
 	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 @@
 	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 @@
 	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);