summaryrefslogtreecommitdiff
path: root/ship_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-11-29 22:29:59 +0000
committerpeter1138 <peter1138@openttd.org>2005-11-29 22:29:59 +0000
commitfde99748c0972e137952b118f8b651d725ad37dc (patch)
tree0f74bc18a32d47dcd8443ec9fb7a992a9e350615 /ship_cmd.c
parent4191adb92cbd9a1cb02b7a913fa90d62ee32ec31 (diff)
downloadopenttd-fde99748c0972e137952b118f8b651d725ad37dc.tar.xz
(svn r3248) - Codechange: Change interface of CanRefitTo() to supply the engine type directly instead of getting it from a vehicle. This allows the function to be used before vehicles are involved.
Diffstat (limited to 'ship_cmd.c')
-rw-r--r--ship_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ship_cmd.c b/ship_cmd.c
index c029a04b6..be6b2aee8 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -1056,7 +1056,7 @@ int32 CmdRefitShip(int x, int y, uint32 flags, uint32 p1, uint32 p2)
/* Check cargo */
if (!ShipVehInfo(v->engine_type)->refittable) return CMD_ERROR;
- if (new_cid > NUM_CARGO || !CanRefitTo(v, new_cid)) return CMD_ERROR;
+ if (new_cid > NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_SHIP_RUN);