Loading

Revision differences

Old revision #pzk83sgm1New revision #pzkhn4386
1        /* This station can be used, add it to st1/st2 */  1        /* This station can be used, add it to st1/st2 */  
2        if (st1 == NULL) {  2        if (st1 == NULL) {  
3            st1 = st; best_rating1 = st->goods[type].rating;  3            st1 = st; best_rating1 = st->goods[type].rating;  
4        } else {  4        } else if (owner == MAX_COMPANIES || st1->owner == OWNER_NONE || st->owner == OWNER_NONE || (st->owner == owner && st->owner == st1->owner) || (st->owner != owner && st1->owner != owner)) {
5            if (owner == MAX_COMPANIES || st1->owner == OWNER_NONE || st->owner == OWNER_NONE || (st->owner == owner && st->owner == st1->owner) || (st->owner != owner && st1->owner != owner)) {  5            if (st->goods[type].rating >= best_rating1) {
6                if (st->goods[type].rating >= best_rating1) {  6                st2 = st1; best_rating2 = best_rating1; st1 = st; best_rating1 = st->goods[type].rating;
7                    st2 = st1; best_rating2 = best_rating1; st1 = st; best_rating1 = st->goods[type].rating;  7            } else if (st2 == NULL || st->goods[type].rating >= best_rating2 || (owner != MAX_COMPANIES && st2->owner != OWNER_NONE && st2->owner != st->owner)) {
8                } else {  8                st2 = st; best_rating2 = st->goods[type].rating;
9                    if (st2 == NULL || st->goods[type].rating >= best_rating2 || (owner != MAX_COMPANIES && st2->owner != OWNER_NONE && st2->owner != st->owner)) {    
10                        st2 = st; best_rating2 = st->goods[type].rating;    
11                    }    
12                }    
13            } else {    
14                if (st1->owner != owner && st->owner == owner) {    
15                    st2 = NULL; best_rating2 = 0; st1 = st; best_rating1 = st->goods[type].rating;    
16                }    
17            }  9            }  
  10        } else if (st1->owner != owner && st->owner == owner) {  
  11            st2 = NULL; best_rating2 = 0; st1 = st; best_rating1 = st->goods[type].rating;  
18        }  12        }  
19    } 13    }