mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r15326) -Fix: Old-ai-ishm when refitting vehicles.
This commit is contained in:
parent
ff2720c56e
commit
9c4c0ff3a1
|
@ -570,7 +570,7 @@ CommandCost CmdRefitAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
|
|||
_returned_refit_capacity = pass;
|
||||
|
||||
CommandCost cost;
|
||||
if (IsHumanCompany(v->owner) && new_cid != v->cargo_type) {
|
||||
if (new_cid != v->cargo_type) {
|
||||
cost = GetRefitCost(v->engine_type);
|
||||
}
|
||||
|
||||
|
|
|
@ -2071,7 +2071,7 @@ CommandCost CmdRefitRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
|
|||
|
||||
total_capacity += capacity;
|
||||
|
||||
if (IsHumanCompany(v->owner) && new_cid != v->cargo_type) {
|
||||
if (new_cid != v->cargo_type) {
|
||||
cost.AddCost(GetRefitCost(v->engine_type));
|
||||
}
|
||||
|
||||
|
|
|
@ -933,7 +933,7 @@ CommandCost CmdRefitShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, con
|
|||
}
|
||||
_returned_refit_capacity = capacity;
|
||||
|
||||
if (IsHumanCompany(v->owner) && new_cid != v->cargo_type) {
|
||||
if (new_cid != v->cargo_type) {
|
||||
cost = GetRefitCost(v->engine_type);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue