economy.c
changeset 1561 e1e58de5f24a
parent 1540 6eef12dab5bf
child 1634 2d30b94f6b5d
equal deleted inserted replaced
1560:d040e4763f45 1561:e1e58de5f24a
  1345 
  1345 
  1346 	assert(v->current_order.type == OT_LOADING);
  1346 	assert(v->current_order.type == OT_LOADING);
  1347 
  1347 
  1348 	v->cur_speed = 0;
  1348 	v->cur_speed = 0;
  1349 
  1349 
       
  1350 	old_player = _current_player;
       
  1351 	_current_player = v->owner;
       
  1352 
  1350 	st = GetStation(last_visited = v->last_station_visited);
  1353 	st = GetStation(last_visited = v->last_station_visited);
  1351 
  1354 
  1352 	for (; v != NULL; v = v->next) {
  1355 	for (; v != NULL; v = v->next) {
  1353 		if (v->cargo_cap == 0) continue;
  1356 		if (v->cargo_cap == 0) continue;
  1354 
  1357 
  1451 
  1454 
  1452 	if (completely_empty) {
  1455 	if (completely_empty) {
  1453 		TriggerVehicle(v, VEHICLE_TRIGGER_EMPTY);
  1456 		TriggerVehicle(v, VEHICLE_TRIGGER_EMPTY);
  1454 	}
  1457 	}
  1455 
  1458 
  1456 	old_player = _current_player;
       
  1457 	_current_player = v->owner;
       
  1458 
       
  1459 	if (result != 0) {
  1459 	if (result != 0) {
  1460 		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
  1460 		InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
  1461 
  1461 
  1462 		if (result & 2)
  1462 		if (result & 2)
  1463 			InvalidateWindow(WC_STATION_VIEW, last_visited);
  1463 			InvalidateWindow(WC_STATION_VIEW, last_visited);