summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-10-04 20:33:18 +0000
committerfrosch <frosch@openttd.org>2009-10-04 20:33:18 +0000
commitb243f6ca9761d75d3e5e957aa02a29500021b7d3 (patch)
tree980395eb85fe52ceec26d6da44b70d948780b030 /src/newgrf.cpp
parent5ff6053326c060c0c717a0b5745423dda92d7af9 (diff)
downloadopenttd-b243f6ca9761d75d3e5e957aa02a29500021b7d3.tar.xz
(svn r17700) -Codechange: Integrate ShipVehicleInfo::refittable into EngineInfo::refit_mask during initialisation.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index ae49f1da4..6257d09c9 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -888,7 +888,7 @@ static ChangeInfoResult ShipVehicleChangeInfo(uint engine, int numinfo, int prop
} break;
case 0x09: // Refittable
- svi->refittable = (grf_load_byte(&buf) != 0);
+ svi->old_refittable = (grf_load_byte(&buf) != 0);
break;
case PROP_SHIP_COST_FACTOR: // 0x0A Cost factor
@@ -5756,6 +5756,9 @@ static void CalculateRefitMasks()
* cargo type. Finally disable the vehicle, if there is still no cargo. */
if (ei->cargo_type == CT_INVALID && ei->refit_mask != 0) ei->cargo_type = (CargoID)FindFirstBit(ei->refit_mask);
if (ei->cargo_type == CT_INVALID) ei->climates = 0x80;
+
+ /* Clear refit_mask for not refittable ships */
+ if (e->type == VEH_SHIP && !e->u.ship.old_refittable) ei->refit_mask = 0;
}
}