1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

(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.

This commit is contained in:
2005-11-29 22:29:59 +00:00
parent 4191adb92c
commit fde99748c0
5 changed files with 8 additions and 8 deletions

View File

@@ -1717,7 +1717,7 @@ int32 CmdRefitRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2)
/* XXX: We also refit all the attached wagons en-masse if they
* can be refitted. This is how TTDPatch does it. TODO: Have
* some nice [Refit] button near each wagon. --pasky */
if (!CanRefitTo(v, new_cid)) continue;
if (!CanRefitTo(v->engine_type, new_cid)) continue;
if (v->cargo_cap != 0) {
const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);