diff options
author | truelight <truelight@openttd.org> | 2005-02-02 16:16:43 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-02-02 16:16:43 +0000 |
commit | ab3ed5c43121cc8adefc0c6bbcf9ef0d1203d3ff (patch) | |
tree | 76125ad531fb31d62d879d3f5541edf39532e2d5 /economy.c | |
parent | 944bba10312022f14ae47e6e89fb8456db0f4af3 (diff) | |
download | openttd-ab3ed5c43121cc8adefc0c6bbcf9ef0d1203d3ff.tar.xz |
(svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id
(and should be an uint16, not uint8)
Diffstat (limited to 'economy.c')
-rw-r--r-- | economy.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1208,7 +1208,7 @@ static bool CheckSubsidised(Station *from, Station *to, byte cargo_type) return false; } -static int32 DeliverGoods(int num_pieces, byte cargo_type, byte source, byte dest, byte days_in_transit) +static int32 DeliverGoods(int num_pieces, byte cargo_type, uint16 source, uint16 dest, byte days_in_transit) { bool subsidised; Station *s_from, *s_to; @@ -1335,7 +1335,7 @@ int LoadUnloadVehicle(Vehicle *v) int unloading_time = 20; Vehicle *u = v; int result = 0; - int last_visited; + uint16 last_visited; Station *st; GoodsEntry *ge; int t; @@ -1358,7 +1358,7 @@ int LoadUnloadVehicle(Vehicle *v) /* unload? */ if (v->cargo_count != 0) { - if (v->cargo_source != (byte)last_visited && ge->waiting_acceptance & 0x8000) { + if (v->cargo_source != last_visited && ge->waiting_acceptance & 0x8000) { // deliver goods to the station unloading_time += v->cargo_count; /* TTDBUG: bug in original TTD */ profit += DeliverGoods(v->cargo_count, v->cargo_type, v->cargo_source, last_visited, v->cargo_days); @@ -1376,7 +1376,7 @@ int LoadUnloadVehicle(Vehicle *v) // Goods already waiting at station. Set counters to the worst value. if (v->cargo_days >= ge->enroute_time) ge->enroute_time = v->cargo_days; - if ((byte)last_visited != ge->enroute_from) + if (last_visited != ge->enroute_from) ge->enroute_from = v->cargo_source; } // Update amount of waiting cargo |