ai/trolly/trolly.c
changeset 3338 7cff208f0446
parent 3315 c9d989783c55
child 3344 fc86351d4641
equal deleted inserted replaced
3337:3a9b086c6369 3338:7cff208f0446
   615 						// Check how much cargo there is left in the station
   615 						// Check how much cargo there is left in the station
   616 						if ((st->goods[p->ainew.cargo].waiting_acceptance & 0xFFF) > RoadVehInfo(i)->capacity * AI_STATION_REUSE_MULTIPLER) {
   616 						if ((st->goods[p->ainew.cargo].waiting_acceptance & 0xFFF) > RoadVehInfo(i)->capacity * AI_STATION_REUSE_MULTIPLER) {
   617 							if (AiNew_CheckVehicleStation(p, st)) {
   617 							if (AiNew_CheckVehicleStation(p, st)) {
   618 								// We did found a station that was good enough!
   618 								// We did found a station that was good enough!
   619 								new_tile = st->xy;
   619 								new_tile = st->xy;
   620 								// Cheap way to get the direction of the station...
   620 								direction = GetRoadStationDir(st->xy);
   621 								//  Bus stations save it as 0x47 .. 0x4A, so decrease it with 0x47, and tada!
       
   622 								direction = _m[st->xy].m5 - 0x47;
       
   623 								break;
   621 								break;
   624 							}
   622 							}
   625 						}
   623 						}
   626 						count++;
   624 						count++;
   627 					}
   625 					}