equal
deleted
inserted
replaced
1219 old_player = _current_player; |
1219 old_player = _current_player; |
1220 _current_player = v->owner; |
1220 _current_player = v->owner; |
1221 |
1221 |
1222 st = DEREF_STATION(last_visited = v->last_station_visited); |
1222 st = DEREF_STATION(last_visited = v->last_station_visited); |
1223 |
1223 |
1224 for(;;) { |
1224 for (; v != NULL; v = v->next) { |
1225 if (v->cargo_cap == 0) |
1225 if (v->cargo_cap == 0) continue; |
1226 goto next_vehicle; |
|
1227 |
1226 |
1228 ge = &st->goods[v->cargo_type]; |
1227 ge = &st->goods[v->cargo_type]; |
1229 |
1228 |
1230 /* unload? */ |
1229 /* unload? */ |
1231 if (v->cargo_count != 0) { |
1230 if (v->cargo_count != 0) { |
1259 if (v->cargo_count != 0) |
1258 if (v->cargo_count != 0) |
1260 completely_empty = false; |
1259 completely_empty = false; |
1261 } |
1260 } |
1262 |
1261 |
1263 /* don't pick up goods that we unloaded */ |
1262 /* don't pick up goods that we unloaded */ |
1264 if (u->next_order & OF_UNLOAD) |
1263 if (u->next_order & OF_UNLOAD) continue; |
1265 goto next_vehicle; |
|
1266 |
1264 |
1267 /* update stats */ |
1265 /* update stats */ |
1268 ge->days_since_pickup = 0; |
1266 ge->days_since_pickup = 0; |
1269 t = u->max_speed; |
1267 t = u->max_speed; |
1270 if (u->type == VEH_Road) t >>=1; |
1268 if (u->type == VEH_Road) t >>=1; |
1299 v->cargo_source = ge->enroute_from; |
1297 v->cargo_source = ge->enroute_from; |
1300 v->cargo_days = ge->enroute_time; |
1298 v->cargo_days = ge->enroute_time; |
1301 result |= 2; |
1299 result |= 2; |
1302 st->last_vehicle = v->index; |
1300 st->last_vehicle = v->index; |
1303 } |
1301 } |
1304 |
|
1305 next_vehicle:; |
|
1306 if (!(v = v->next)) |
|
1307 break; |
|
1308 } |
1302 } |
1309 |
1303 |
1310 v = u; |
1304 v = u; |
1311 |
1305 |
1312 if (v->type == VEH_Train) { |
1306 if (v->type == VEH_Train) { |