summaryrefslogtreecommitdiff
path: root/economy.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-02-02 16:16:43 +0000
committertruelight <truelight@openttd.org>2005-02-02 16:16:43 +0000
commitab3ed5c43121cc8adefc0c6bbcf9ef0d1203d3ff (patch)
tree76125ad531fb31d62d879d3f5541edf39532e2d5 /economy.c
parent944bba10312022f14ae47e6e89fb8456db0f4af3 (diff)
downloadopenttd-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/economy.c b/economy.c
index cc92b64db..7513fe8a4 100644
--- a/economy.c
+++ b/economy.c
@@ -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